Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » 4DIAC - Framework for Distributed Industrial Automation and Control » OPC-UA open62541 missing .dll(4diac FORTE OPC-UA OPC-UA communication)
OPC-UA open62541 missing .dll [message #1844814] Mon, 27 September 2021 02:10 Go to next message
Ricardo Rech is currently offline Ricardo RechFriend
Messages: 21
Registered: September 2021
Junior Member
Hi all,

I'm studing 4diac for a while and I would like to use OPC-UA for one project. I followed the steps at the tutorial below:
https://www.eclipse.org/4diac/en_help.php?helppage=html/communication/opc_ua_version1.html

It seems everything was correct, it built the source files of FORTE and for the open62541 as well. But if I try to launch FORTE it stops immediately. If I execute the forte.exe I got an error informing the libopen62541.dll is missing (see image attached).
At the tutorial I notice that the file is named "open62541.dll". However in my case the file was created with the name libopen62541.dll. At CMake I inserted the path and the name acording to my case.

FORTE_COM_OPC_UA_INCLUDE_DIR=C:\Users\USER\4diac\open62541\build
FORTE_OPC_UA_LIB=libopen62541.dll
FORTE_COM_OPC_UA_LIB_DIR=C:\Users\USER\4diac\open62541\build\bin

Does anyone have any clue how to solve this? Any help will be highly appreciated.
thanks in advance

Rech
Re: OPC-UA open62541 missing .dll [message #1844842 is a reply to message #1844814] Mon, 27 September 2021 18:33 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1585
Registered: January 2014
Senior Member

Hi,

normally the dll has to be either on the path or in the same directory as your forte.exe.

BR,
Alois
Re: OPC-UA open62541 missing .dll [message #1844991 is a reply to message #1844842] Sat, 02 October 2021 02:11 Go to previous messageGo to next message
Ricardo Rech is currently offline Ricardo RechFriend
Messages: 21
Registered: September 2021
Junior Member
Great!
add the .dll files to the forte.exe path and now it is running fine.

Thanks a lot Alois!


BR
Rech
Re: OPC-UA open62541 missing .dll [message #1845023 is a reply to message #1844991] Sun, 03 October 2021 15:04 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1585
Registered: January 2014
Senior Member

You are welcome! There should also be ways to statically link open62541 to forte. The docker container based build is doing that. Then you don't need to take care about this.
Re: OPC-UA open62541 missing .dll [message #1847042 is a reply to message #1845023] Wed, 13 October 2021 02:06 Go to previous messageGo to next message
Ricardo Rech is currently offline Ricardo RechFriend
Messages: 21
Registered: September 2021
Junior Member
Hi Alois and friends,

Sory to disturb you again, but I'm stuck in another point with 4diac.
For my research I'll have to develop some FBs, and I've done it successfuly with the FORTE v1.9.1.
Some data of the "homemade FBs" shall be publish/subscribe through OPC-UA. I've compiled open62541 and add it to FORTE v1.9.1. Then add the .dll's to the same repository forte.exe is.
All seems to be ok. Forte can be launch and deployed. However I got an error at UA expert:

Connected Event: ERROR 0x80050000


Is it possible to add OPC-UA (and other protocols) to a common FORTE release? Or is it needed a special version of FORTE to run each comm protocol?

On the other hand I've tryed to develop the FBs at the FORTE version that ran OPC-UA. But in this case I have an error while trying to generate the bin file with CMake:

CMake Error at src/modules/newFBs/CMakeLists.txt:9 (forte_add_module):
forte_add_module Macro invoked with incorrect arguments for macro named:
forte_add_module


Is it possible to generate FBs with the FORTE version done to run OPC-UA?


Thanks in advance for any help;

B.R.
Rech
Re: OPC-UA open62541 missing .dll [message #1847051 is a reply to message #1847042] Wed, 13 October 2021 07:17 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1585
Registered: January 2014
Senior Member

Hi,

definitely using the latest 4diac FORTE version with OPC UA is a good idea. I know that Jose and Kirill fixed many things in our OPC UA implementation. However we changed the CMake configuration method for modules. It now has an option if it should be per default on. This reduces some effort. Furthermore Ernst created a special module method which will use the folder name as module name and add all cpp and h files in the directory automatically. The type exporter can automatically generate such a Cmake file. I hope this helps you.

Please also note that we are in the final phase of the 4diac 2.0.0 release bringing again some very interesting fixes for 4diac FORTE and full set of new features to 4diac IDE.

Cheers,
Alois
Re: OPC-UA open62541 missing .dll [message #1847511 is a reply to message #1847051] Sat, 30 October 2021 01:43 Go to previous messageGo to next message
Ricardo Rech is currently offline Ricardo RechFriend
Messages: 21
Registered: September 2021
Junior Member
Hi all,

Many thanks for all the support so far. I'm trying to use 4diac v2.0.0, but it seems to be a little instable yet (see attached image, for instance). So, I didn't get much progress with OPC-UA.
Could be due to Java version?
Currently I'm using v "16.0.2" 2021-07-20

However, for this moment my research doesn't require nothing sophisticate. In short, I must do two things:
- develop my own FBs
- distribute the control and communicate through OPC-UA

Is there any version of 4diac IDE and FORTE that I could accomplish this two simultaneously?



B.R
Rech
Re: OPC-UA open62541 missing .dll [message #1847522 is a reply to message #1847511] Sat, 30 October 2021 13:36 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1585
Registered: January 2014
Senior Member

Hi Rech,

I'm very sorry that this issue slipped as through in the final phase of 4diac 2.0.0. However the good news are it is already fixed [1] and will be part of the 2.0.1 maintenance release planned for the coming week. We already have 8 mostly minor issues fixed for that [2].

Therefore I can only ask for your patience and suggest you stay with the 2.0.0. As soon as we release 2.0.1 4diac IDE should inform you with an update notification pop-up.

A final point: Please when you get issues like the on in the screenshot above please copy the text and post us the text. This greatly reduces the effort on our side for finding the root cause. For that the Error Report dialog should offer a context menu copy.

Cheers,
Alois

PS: what I totally forgot to write. 4diac IDE comes with its own Java version. So the Java version is definitely not the problem.


[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=576676
[2] https://bugs.eclipse.org/bugs/buglist.cgi?component=4DIAC-IDE&list_id=21040398&product=4DIAC&query_format=advanced&target_milestone=2.0.1
Re: OPC-UA open62541 missing .dll [message #1847542 is a reply to message #1847522] Sun, 31 October 2021 21:08 Go to previous messageGo to next message
Ricardo Rech is currently offline Ricardo RechFriend
Messages: 21
Registered: September 2021
Junior Member
Hi Alois,

Thanks once again for the fast feedbacks. Looking forward for v 20.0.1. But while it is not released I'm testing some other versions of FORTE and with the 1.14.0 the OPC-UA ran and was also possible to compile some of my FBs. However, the FBs that use internal var at the ECC do not compile. See error message below (also available at the attached image).
Is there some way to correct it? I think that with this solved I'll have the needed environment to carry on with my research.

**********************************************************************
[ 50%] Building CXX object src/CMakeFiles/FORTE_LITE.dir/modules/myFBs/test.cpp.obj
In file included from C:\4diac\FORTE_1.14.0\src\modules\myFBs\test.cpp:12:
C:\4diac\FORTE_1.14.0\src\modules\myFBs\test.h: In constructor 'FORTE_test::FORTE_test(CStringDictionary::TStringId, CResource*)':
C:\4diac\FORTE_1.14.0\src\modules\myFBs\test.h:73:75: error: 'scm_stInternalVars' was not declared in this scope
CBasicFB(pa_poSrcRes, &scm_stFBInterfaceSpec, pa_nInstanceNameId, &scm_stInternalVars, m_anFBConnData, m_anFBVarsData) {
^~~~~~~~~~~~~~~~~~
C:\4diac\FORTE_1.14.0\src\modules\myFBs\test.h:73:75: note: suggested alternative:
getInternalVar'
CBasicFB(pa_poSrcRes, &scm_stFBInterfaceSpec, pa_nInstanceNameId, &scm_stInternalVars, m_anFBConnData, m_anFBVarsData) {
^~~~~~~~~~~~~~~~~~
getInternalVar
mingw32-make[2]: *** [src\CMakeFiles\FORTE_LITE.dir\build.make:6475: src/CMakeFiles/FORTE_LITE.dir/modules/myFBs/test.cpp.obj] Error 1
mingw32-make[1]: *** [CMakeFiles\Makefile2:2024: src/CMakeFiles/FORTE_LITE.dir/all] Error 2
mingw32-make: *** [Makefile:129: all] Error 2
Re: OPC-UA open62541 missing .dll [message #1847551 is a reply to message #1847542] Mon, 01 November 2021 10:33 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1585
Registered: January 2014
Senior Member

Hi Ricardo,

please don't use 4diac FORTE 1.14.0 any more. There are some important fixes in 4diac FORTE 2.0.0. I did miss in your messages above any issues you had with 4diac FORTE 2.0.0 and OPC UA. We didn't change anything on the OPC UA code and our test builds run against OPC UA so 4diac FORTE should work just fine with with 4diac FORTE 2.0.0.

Cheers,
Alois
Re: OPC-UA open62541 missing .dll [message #1847588 is a reply to message #1847551] Tue, 02 November 2021 02:20 Go to previous messageGo to next message
Ricardo Rech is currently offline Ricardo RechFriend
Messages: 21
Registered: September 2021
Junior Member
Hi Alois,

I did not test OPC-UA with FORTE 2.0 yet, but I'm pretty sure it will work, as it seems to have the same files as the v 1.14.0 which I already tested and is running fine.

However, I don't manage to generate my own FBs on v2.0.0. See message from CMake below, and log attached. Because of that I switched to older versions of FORTE. Actually, version 1.9.1 is the only one that was possible to compile the FBs I need, as the 1.12.0 and 1.14.0 have an issue with FBs that use internal var at ECC. I also tried to compile open62541 into FORTE 1.9.1, but it does not work, I guess because this version is missing some implementations on OPC-UA.

In short, FORTE 1.12.0 and above seems to run OPC-UA but don't compile user FBs. Version 1.9.1 compile my FBs, but don't run OPC-UA.



FORTE_MODULE_DIR: C:/4diac/forte_2.0.0/src/modules/
FORTE_MODULE_DIR: C:/4diac/forte_2.0.0/src/com/
FORTE_MODULE_DIR: C:/4diac/forte_2.0.0/src/modules/myFBs/
CMake Error at src/modules/myFBs/CMakeLists.txt:2 (forte_add_module):
forte_add_module Macro invoked with incorrect arguments for macro named:
forte_add_module


Building executable
Configuring incomplete, errors occurred!
See also "C:/4diac/forte_2.0.0/bin/win32/CMakeFiles/CMakeOutput.log".
Re: OPC-UA open62541 missing .dll [message #1847595 is a reply to message #1847588] Tue, 02 November 2021 07:24 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1585
Registered: January 2014
Senior Member

Hi Ricardo,

we introduced an additional parameter into our cmake function forte_add_module that allows to enable it per default. In order to fix this problem you need to add an additional ON or OFF to your forte_add_module. I think I posted this in another forum post already. May need to update our documentation on that.

See for example the I2C-dev module: forte_add_module(I2C-Dev OFF "Interacting with GPIOs of Linux-based devices via I2C using i2c-dev")

Regarding your internal vars problem: can you share one of our FBs with us? you can also send it to me privately if you don't want to put it here on the forum. But having one of your FBs that make problems would really help us.

Cheers,
Alois
Re: OPC-UA open62541 missing .dll [message #1847647 is a reply to message #1847595] Wed, 03 November 2021 00:37 Go to previous messageGo to next message
Ricardo Rech is currently offline Ricardo RechFriend
Messages: 21
Registered: September 2021
Junior Member
Hi Alois,

I'll test the FORTE the 2.0 and post the results as soon as possible.
I've used the FB attached to test internal var issue in all FORTE versions.

Thanks once again for all support!


BR
Ricardo Rech
  • Attachment: myFBs.zip
    (Size: 2.12KB, Downloaded 75 times)
Re: OPC-UA open62541 missing .dll [message #1847656 is a reply to message #1847647] Wed, 03 November 2021 06:45 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1585
Registered: January 2014
Senior Member

Hi Ricardo,
sorry I think I was not clear enough. I would like to have the fbt file to use the C++ code generator from 4diac IDE 2.0.0.

BR,
Alois
Re: OPC-UA open62541 missing .dll [message #1847658 is a reply to message #1847656] Wed, 03 November 2021 06:52 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1585
Registered: January 2014
Senior Member

BTW we now have an option to generate a CMakeList.txt file which will take the foldername as module name and include all cpp files in the folder. This is very handy for FB modules.
Re: OPC-UA open62541 missing .dll [message #1847745 is a reply to message #1847656] Thu, 04 November 2021 23:13 Go to previous messageGo to next message
Ricardo Rech is currently offline Ricardo RechFriend
Messages: 21
Registered: September 2021
Junior Member
Hi Alois,

please find attached the test.fbt
  • Attachment: test.fbt
    (Size: 1.49KB, Downloaded 49 times)
Re: OPC-UA open62541 missing .dll [message #1847753 is a reply to message #1847745] Fri, 05 November 2021 14:52 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1585
Registered: January 2014
Senior Member

Hi Ricardo,

just used 4diac IDE 2.0.0 and regenerated the C++ files for your FB. The generated c++ files should now be fine. But as said you need to update the CMakeList.txt to: forte_add_module(myFBs OFF "FBs")
Re: OPC-UA open62541 missing .dll [message #1847758 is a reply to message #1847753] Sat, 06 November 2021 02:43 Go to previous messageGo to next message
Ricardo Rech is currently offline Ricardo RechFriend
Messages: 21
Registered: September 2021
Junior Member
Hi Alois,

Great! Internal Var issue is solved with 4diac IED 2.0.0. Forgot to mention that I did all previously tests with 4diac IDE 1.12.0.
Also the OPC-UA lib is compiled fine using FORTE 2.0.0.

Now I'm facing some challenge to deploy the App (sorry to disturb you with all this questions). After launch FORTE and give the Deploy command I got an error informing "Could not connect to the device" (see attached image).

Did some further testes and if forte.exe is executed manually and then Deploy command it seems to work, however "Monitor System" don't work.

Any clue how to solve this?

Thanks for your patience

B.R.
Ricardo
Re: OPC-UA open62541 missing .dll [message #1847764 is a reply to message #1847758] Sat, 06 November 2021 20:38 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1585
Registered: January 2014
Senior Member

Hi,

just to clarify: Deploy is not automatically starting a 4diac FORTE. This would be not the typical use case. The typical use case is that 4diac FORTE is running on the devices, and 4diac IDE would connect to these and deploy on them.

Regarding your monitoring issue. Can you give more info what is not working. Also for clarification when you enable monitoring 4diac IDE is not automatically showing any values. The reason for that is that you could have a highly distributed system with many devices and monitoring everything could put quite some load on the network. Therefore in 4diac IDE you have to select the FBs and pins you would like to watch and select add watch from the context or debug menu.

I'm happy to help. Sorry the 4diac is giving you such a hard time.

Cheers,
Alois
Re: OPC-UA open62541 missing .dll [message #1847837 is a reply to message #1847764] Wed, 10 November 2021 01:43 Go to previous messageGo to next message
Ricardo Rech is currently offline Ricardo RechFriend
Messages: 21
Registered: September 2021
Junior Member
Hi Alois,

For these first tests using 4diac and FORTE version 2.0.0 I'm running with FORTE_PC locally (no distributed automation yet).
In short, I want to be sure that both OPC-UA and FBs with internal var will run at the same framework. So, my app is the OPC-UA tutorial together with FB test.fbt I've sent previously here in the forum.

I believe the video below with the error when deploying FORTE shall clarify a bit:

https://www.youtube.com/watch?v=1C9L9vTiVrs


Also find attached the erros logs.


B.R.
Ricardo
Re: OPC-UA open62541 missing .dll [message #1847842 is a reply to message #1847837] Wed, 10 November 2021 07:32 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1585
Registered: January 2014
Senior Member

Hi,

thx for letting us know. I'm not very happy with the current state of the simulated device manager. I'm not perfectly sure what the exact problem is here. However the Simulated device manager tries to stop all runtimes when you close it. I think for your experiments it makes more sense that you run your 4diac FORTEs without it directly from the console. If you just run forte.exe it will be bound to port 61499 if you want to specify a port you can do this with a parameter '-c: localhost:61500' without the single quotes.

I have some ideas to improve the simulated device manager. But they are currently not my top priority.
Re: OPC-UA open62541 missing .dll [message #1852283 is a reply to message #1844814] Sun, 08 May 2022 14:50 Go to previous messageGo to next message
Ricardo Rech is currently offline Ricardo RechFriend
Messages: 21
Registered: September 2021
Junior Member
Hi Alois and 4diac community,

Many thanks for the reply.
But where exactly should I enter the parameter '-c: localhost:61500'?

Also, I've tryed to Build a 4diac FORTE docker image, as the tutorial below:

https://www.eclipse.org/4diac/en_help.php?helppage=html/installation/docker.html

But I got the error below (see complete description on the image):
ERROR [fortebuilder 2/7] RUN apk add --no-cache bash ca-certificates cmake g++ git gcc

Does anyone got a similar error?

index.php/fa/42048/0/



Re: OPC-UA open62541 missing .dll [message #1852286 is a reply to message #1852283] Sun, 08 May 2022 21:05 Go to previous message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1585
Registered: January 2014
Senior Member

Hi Ricardo,

when you start 4diac FORTE from the command line you can give this as command line parameter. However I just noticed I made a slight mistake. Correct would be
 ./forte -c localhost:61500


Cheers,
Alois
Previous Topic:4Diac Forte and Bacnet
Next Topic:Other IEC Process Control FBD standards
Goto Forum:
  


Current Time: Sat Apr 27 21:58:43 GMT 2024

Powered by FUDForum. Page generated in 0.05357 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top