I think it will be better to release server/client for OPC UA. It is multi-platform . Do not need COM/DCOM.OPC UA specification is not free and available only to members. There isn't any free implementation even for Delphi. The day it shows for either Delphi or Lazarus will make me very happy. Till then, OPC DA is quite fine and working with current OPC servers.
Anyway mostly it better use MODBUS TCP to communicate with PCL and HMI devices. PascalScada project support it.That is all right if your device is also talking MODBUS. Although MODBUS is one of most widely used protocols there are thousands of others, and if you make your application OPC client instead of just MODBUS client, then you will be able to talk to almost any device (not just ones with MODBUS) since OPC servers exist for virtually all of them.
It has been 2 years and lots of new solutions are using OPC UA, just want to check with you guys if there's any endeavor on OPC-UA Client along the likes of the opcdelphi project?There isn't FPC/LAZ solution yet. The good thing is that that there is now an open source solution in C at http://open62541.org. The bad thing is that no one with free time seams to be interested enough to convert it into Pascal. There is another C solution at http://www.openopcua.org, but unfortunately author allowed using it only as a library from Pascal - which makes it a worse candidate.
https://sourceforge.net/projects/myopcclient/?source=directory
OPC components now exist for Lazarus, too. Unfortunately GPL.
It's only OPC DA, still no UA.I am happy anyway, because I will be able to get rid of D7 in few of my old projects. Unfortunately because of GPL I will not be able to use the component, but since OPCDA headers are not under GPL I can use just them. It will save me some time at least.
I have created pascal wrapper to open source http://open62541.orgI am so happy :D :P :D. THANK YOU!!!
Could you tell me where should I look for 64 bit libgcc_s_sjlj-1.dll?
Thanks! I hope it's a match.QuoteCould you tell me where should I look for 64 bit libgcc_s_sjlj-1.dll?
Afaik, you may find it in FPC/3.3.1/bin/x86_64-win64/
I hope it's a match.
You may also download + install last version of mingw-w64, libgcc_s_sjlj-1.dll is included.I didn't want exe setup so I ended up at win-builds.org looking for plain DLLs - but got lost in all those txz files where I could find only DLL needed for threading.
http://mingw-w64.org/doku.php/download
I didn't want exe setup so I ended up at win-builds.org looking for plain DLLs - but got lost in all those txz files where I could find only DLL needed for threading.
Your attachment is more preferred then setup exe. I didn't test it yet.QuoteI didn't want exe setup so I ended up at win-builds.org looking for plain DLLs - but got lost in all those txz files where I could find only DLL needed for threading.
Is the attachment of my previous post not working?
1) Do you plan to include some examples other then client example inside of open62541.pas?Yes I can, no problem ... I will inform when it happens
2) Do you intend to put your wrapper in some repository like github so others can contribute?No, I have no account on github and I have no free time to maintain it in long term. I created this wrapper as I neded it for one of my work projects (so only subset of API is translated). On other side I provide it as freeware (public doman) so anybody interested can do it.
3) Is your wrapper for official open62541 v1.0?I think that yes. I created it in April 2020 from github sources so this time 1.0 was already released
4) Did you test it only on win32? Have you tried it on win64, linux, or even arm?Only on Win32, I can test it also on Win64
5) I was able to find 64 bit version of libopen62541.dll on official site, and libwinpthread-1.dll inside of http://win-builds.org/1.5.0/packages/windows_64/winpthreads-v3.3.0-2-x86_64-w64-mingw32.txz. Could you tell me where should I look for 64 bit libgcc_s_sjlj-1.dll?Already answered ;-) I remember that searching for win32 libraries was also for me complicated job ...
I have added demo application and Win64 DLLs: http://lacak.users.sourceforge.net/Thank you for the effort. It is really appreciated.
I have created pascal wrapper to open source http://open62541.org.
You can look at http://lacak.users.sourceforge.net/ for headers and Windows DLL
There are also implementations of other industrial communication protocols like Modbus TCP or EtherNet/IP
Updated headers and Windows DLLs to version 1.1 (open62541 released 06/2020)
(https://github.com/open62541/open62541/releases/tag/v1.1)
at http://lacak.users.sourceforge.net/#open62541
Updated headers and Windows DLLs to version 1.1 (open62541 released 06/2020)Thank you!
Access violation error
sorry sir UA_ClientConfig_setDefaultEncryption function is a problem for me
What happened to UA_ClientState in wrapper for v1.1?As far as I can cee from sources, this enumeration was removed and also function UA_Client_getState was changed.
Is there a chance for getting a server part wrapper sometime in the future?I do not need server part in my project, so I do not plan do it. If you need some very limited subset of functions I can add them ...
Strange, since I can still find it in official v1.1 open62541.h at https://github.com/open62541/open62541/releases/tag/v1.1.What happened to UA_ClientState in wrapper for v1.1?As far as I can cee from sources, this enumeration was removed and also function UA_Client_getState was changed.
(it is backward incompatible change)
That would be fantastic! I looked at server examples and the one with the smallest number of methods and structures (but still having at least one tag) seams to be server.cpp. Whatever you can implement from there would be a jump start for me to try.Is there a chance for getting a server part wrapper sometime in the future?I do not need server part in my project, so I do not plan do it. If you need some very limited subset of functions I can add them ...
Currently unresolved problems are:My plan is to translate some original examples and do some testing needed for my use case, but because of the deadlines I currently have, it does not seam to be possible before the end of August (or even beginning of September since new ct4laz will be needed for Laz 2.0.10 with FPC 3.2.0).
- Win64 client has problem while UA_Client_delete() is called
- UA_Client_connectUsername() does not work for me (may be that my testing OPC UA Server does not support it, or there is any problem)
Has somebody any feedback on these two problems?
Yes it is strange in https://github.com/open62541/open62541/releases/download/v1.1/open62541.h there is present, but in headers included in https://github.com/open62541/open62541/releases/download/v1.1/open62541-win32.zip is removed.Strange, since I can still find it in official v1.1 open62541.h at https://github.com/open62541/open62541/releases/tag/v1.1.What happened to UA_ClientState in wrapper for v1.1?As far as I can cee from sources, this enumeration was removed and also function UA_Client_getState was changed.
(it is backward incompatible change)
Yes it is strange in https://github.com/open62541/open62541/releases/download/v1.1/open62541.h there is present, but in headers included in https://github.com/open62541/open62541/releases/download/v1.1/open62541-win32.zip is removed.It seams that UA_ClientState is really gone. New v1.1 of client_async.c and client_subscription_loop.c no longer reference it.
I have added some server side functions to:That would be fantastic! I looked at server examples and the one with the smallest number of methods and structures (but still having at least one tag) seams to be server.cpp. Whatever you can implement from there would be a jump start for me to try.Is there a chance for getting a server part wrapper sometime in the future?I do not need server part in my project, so I do not plan do it. If you need some very limited subset of functions I can add them ...
I have added some server side functionsTHANK YOU !!! :D 8-) :D
Finally, I changed to Lazarus's development platform to implement it, and none of the three issues mentioned above exist... :(
But there is a problem with the implementation of stateCallback, as long as UA_Client_connect is executed, an error will be reported:
... raised exception class'External:SIGSEGV'
why?
Found the fault in open62541.pas wrapper: record UA_ConnectionConfig was enhanced 24. Jan. 2020 to
UA_ConnectionConfig = record
protocolVersion: UA_UInt32;
recvBufferSize: UA_UInt32;
sendBufferSize: UA_UInt32;
localMaxMessageSize: UA_UInt32; (* (0 = unbounded) *)
remoteMaxMessageSize: UA_UInt32; (* (0 = unbounded) *)
localMaxChunkCount: UA_UInt32; (* (0 = unbounded) *)
remoteMaxChunkCount: UA_UInt32; (* (0 = unbounded) *)
end;
Hello, can this also be used to connect opc-da?Normally not, but there are OPC-UA to OPC-DA gateways which allow that.
Normally not, but there are OPC-UA to OPC-DA gateways which allow that.
For direct OPC-DA access you can use something like this: https://github.com/seryal/OPCComponent
What should I do if such an error message appears when installing this component?Contact author or open a github issue? I haven't used that coponent for a while, so maybe trying older Lazarus like 2.0.x might be worth trying.
Contact author or open a github issue? I haven't used that coponent for a while, so maybe trying older Lazarus like 2.0.x might be worth trying.
I did same test with library version 1.1.0 and seems to work correctly, probably something was changed in open62541 and wrapper does not support newer versions.Try report it on https://github.com/fluisgirardi/fpopen62541 ?
I did same test with library version 1.1.0 and seems to work correctly, probably something was changed in open62541 and wrapper does not support newer versions.Try report it on https://github.com/fluisgirardi/fpopen62541 ?
Yes that was my first troubleshooting test, I used a OPC test client based on python and it worked perfectly so I know Ignition is configured and operating correctly.You confirmed step 2, but not a word about step 1. Do you have libopen62541.so on your system? Did you follow https://www.open62541.org/doc/1.3/installing.html#installing instructions? Can you compile some open62541 server and client examples? If for instance you compile some example like gcc -std=c99 -o server tutorials_server_firststeps.c -lopen62541 and after that you execute objdump -p server | grep NEEDED or ldd server you will see that something like libopen62541.so.1 is needed for execution.
I tried to compile the test example that is shipped with fpopen62541 but it does not compile, there is an issue with an identifier 'memberTypeIndex' so I cannot run the TestOPCUa to test it. Do you have a pascal client I can use to test with so I can confirm open62541 is workingTry this older version compatible with open62541 v1.2:
When I first tried to compile and run I got the message could not open open libopen62541.so. I check the fedora repo's and it was there for install both implementation and dev packages so no I did not compile libopen62541.so I just installed them. After that the application runs but just no connection is happening, as its version 1.3.4 , maybe its just incompatible with the wrapper at this stage.If you do not compile and test some open62541 server and client, or at least server and test it with some external client, we will not know if problem is in open62541 or fpopen62541 part.
Three months ago ver 1.3 was added to fpopen62541 and there has been commits since but maybe its incomplete at this time. I will attempt to compile and install ver 1.2.6 and see how I go. Thanks :-)I suggest you to first compile just demo from old fpopen62541 version I gave you with open62541 1.3 you already have. I can compile similar version locally. Only if that Lazarus demo compiles but does not execute well, you should try to uninstall open62541 1.3 and install 1.2.
UA_Client_Subscriptions_delete: function(client: PUA_Client; const request: UA_DeleteSubscriptionsRequest): UA_DeleteSubscriptionsResponse; cdecl;
should be replaced by UA_Client_Subscriptions_delete: function(client: PUA_Client; request: UA_DeleteSubscriptionsRequest): UA_DeleteSubscriptionsResponse; cdecl;
Hello,
I have a strange issue with fpopen and Linux.
open62541 v1.3.3 library built with MSVS 2022 on Windows 10 and everything works fine. I can connect to OPC UA server, read and write values. I use built-in fpopen example.
Can it be that there is a name clash at play here?
fpopen is a fpc function in the unix rtl... from baseunix.fpopen? --> resolves to unix open.