EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  <2024 Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  <2024
<== Date ==> <== Thread ==>

Subject: Re: OPC UA build problem
From: "Knap, Giles \(DLSLtd,RAL,LSCI\) via Tech-talk" <tech-talk at aps.anl.gov>
To: EPICS Tech Talk <tech-talk at aps.anl.gov>, Ralph Lange <ralph.lange at gmx.de>
Date: Fri, 26 Jan 2024 16:59:47 +0000
Hello Vivien, Ralph,

I have successfully built the opcua support module with the open62541 client library and made an IOC instance that connects to an Omron PLC.

I'm sharing the container I used to do this so you can see the build options and also immediately experiment with pre-built code. This is a Generic IOC as discussed in another thread but it has an example instance embedded in it. To use:

  • quick and dirty method:
    • docker run -it --rm --net host ghcr.io/epics-containers/ioc-opcua-linux-developer:2024.1.1
    • cd /epics/ioc
    • vim config/st.cmd and edit to your needs
    • ./start.sh
  • the beautiful method:
    • git clone --recursive git at github.com:epics-containers/ioc-opcua.git
    • open the project in vscode
    • ctrl-shift-p reopen in container
    • open a vscode terminal
    • cd /epics/ioc
    • make
    • edit /epics/ioc/config/st.cmd to your needs
    • ./start.sh

To read more about the epics-containers framework that built this and perhaps to make some IOC instances that use it see:

Regards,
giles



From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of Ralph Lange via Tech-talk <tech-talk at aps.anl.gov>
Sent: 11 January 2024 08:04
To: EPICS Tech Talk <tech-talk at aps.anl.gov>
Subject: Re: OPC UA build problem
 
Dear Vivien,

On Wed, 10 Jan 2024 at 16:02, LORIOT Vivien via Tech-talk <tech-talk at aps.anl.gov> wrote:

 

c++  -D_GNU_SOURCE -D_DEFAULT_SOURCE          -D_X86_64_ -DUNIX  -Dlinux      -O3   -Wall    -DEPICS_NO_CALLBACK -DHAS_XMLPARSER -std=c++11 -fdiagnostics-color=always -mtune=generic     -m64  -fPIC -I. -I../O.Common -I. -I. -I.. -I../../devOpcuaSup -I../../devOpcuaSup/open62541 -I../../include/compiler/gcc -I../../include/os/Linux -I../../include -I/nix/store/3jdcplbpdj2177csm7nbw3prjlaq1bdn-epics-base-7.0.7/include/compiler/gcc -I/nix/store/3jdcplbpdj2177csm7nbw3prjlaq1bdn-epics-base-7.0.7/include/os/Linux -I/nix/store/3jdcplbpdj2177csm7nbw3prjlaq1bdn-epics-base-7.0.7/include    -I../../devOpcuaSup/open62541 -I/usr/include/libxml2 -I/volatile/home/vl276037/Top/open62541-1.3.9/install/include    -c ../opcuaItemRecord.cpp

../opcuaItemRecord.cpp:186:6: warning: ‘rset’ is deprecated [-Wdeprecated-declarations]

  186 | rset opcuaItemRSET = {

      |      ^~~~~~~~~~~~~

In file included from /nix/store/3jdcplbpdj2177csm7nbw3prjlaq1bdn-epics-base-7.0.7/include/dbBase.h:22,

                 from /nix/store/3jdcplbpdj2177csm7nbw3prjlaq1bdn-epics-base-7.0.7/include/dbAccess.h:20,

                 from ../opcuaItemRecord.cpp:19:

/nix/store/3jdcplbpdj2177csm7nbw3prjlaq1bdn-epics-base-7.0.7/include/recSup.h:89:21: note: declared here

   89 | typedef struct rset rset EPICS_DEPRECATED;

      |                     ^~~~

../opcuaItemRecord.cpp:190:20: error: invalid conversion from ‘long int (*)(dbCommon*, int)’ to ‘long int (*)()’ [-fpermissive]

  190 |     RECSUPFUN_CAST(init_record),

      |                    ^~~~~~~~~~~

      |                    |

      |                    long int (*)(dbCommon*, int)

../opcuaItemRecord.cpp:43:31: note: in definition of macro ‘RECSUPFUN_CAST’

   43 | #    define RECSUPFUN_CAST(F) F


In the OPC UA Device Support module, CONFIG_SITE defines '-DUSE_TYPED_RSET' for C++ compilation. [1]
That definition is missing on the compile line you are showing above - it probably slipped your migration to the Nix build system.

In case you are supporting Secure OPC UA: Other users are having issues with recent Linuxes (new API of openssl) and the Open62541 release 1.3, which show as crashes when the IOC starts. If you get it working, I'd be interested to know the details of your setup.

Cheers,
~Ralph


 

-- 

This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail.
Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd.
Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message.
Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom
 


References:
OPC UA build problem LORIOT Vivien via Tech-talk
Re: OPC UA build problem Ralph Lange via Tech-talk

Navigate by Date:
Prev: Re: [EXTERNAL] OpenSSL vulnerability epics Hartman, Steven via Tech-talk
Next: Re: areaDetector monthly meeting Marco A. Barra Montevechi Filho via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  <2024
Navigate by Thread:
Prev: Re: OPC UA build problem Ralph Lange via Tech-talk
Next: GNU/Linux and GigE camera settings for high-throughput with ADAravis Henrique F. Simoes via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  <2024
ANJ, 26 Jan 2024 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·