Recent

Author Topic: OPC client with Lazarus  (Read 51398 times)

denny.chou

  • New Member
  • *
  • Posts: 11
Re: OPC client with Lazarus
« Reply #60 on: November 24, 2021, 04:17:58 am »

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

Thank you for your valuable response

denny.chou

  • New Member
  • *
  • Posts: 11
Re: OPC client with Lazarus
« Reply #61 on: November 24, 2021, 06:57:33 am »
"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? thanks!

OPCtypes.pas(37,69) Error: Data element too large

avra

  • Hero Member
  • *****
  • Posts: 2368
    • Additional info
Re: OPC client with Lazarus
« Reply #62 on: November 24, 2021, 09:14:46 am »
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.
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

denny.chou

  • New Member
  • *
  • Posts: 11
Re: OPC client with Lazarus
« Reply #63 on: November 26, 2021, 04:18:40 am »
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.

Thank you very much for your suggestion. The author has assisted with this issue.

tt

  • Jr. Member
  • **
  • Posts: 79
Re: OPC client with Lazarus
« Reply #64 on: July 06, 2022, 12:36:12 pm »
Hello,
I just downloaded the free pascal wrapper from https://github.com/fluisgirardi/fpopen62541 but if I run the test application, when I try to add the variable, it fails with error BADNODEATTRIBUTESINVALID.
I am running free pascal/lazarus under linux and compiled open62541 under linux from sources.


I use open62541 version 1.2.3, maybe is no longer supported?

What version of open62541 has to be used to make sure it works?
« Last Edit: July 06, 2022, 01:41:30 pm by tt »

LacaK

  • Hero Member
  • *****
  • Posts: 664
Re: OPC client with Lazarus
« Reply #65 on: July 23, 2022, 01:29:48 pm »
According to sources on https://github.com/fluisgirardi/fpopen62541 the version there should be compatible with open62541 version 1.2
(originial test application was developed and tested against version 1.1. Header files for version 1.1 you can find in this discussion earlier if you want test them)

yus

  • Jr. Member
  • **
  • Posts: 52
Re: OPC client with Lazarus
« Reply #66 on: July 26, 2022, 08:02:08 pm »

ruedi

  • Newbie
  • Posts: 1
Re: OPC client with Lazarus
« Reply #67 on: August 02, 2022, 02:35:32 pm »
Hallo,
It is possible to insert several monitored items in one subscription.
I would like to subscribe to several variables.

tt

  • Jr. Member
  • **
  • Posts: 79
Re: OPC client with Lazarus
« Reply #68 on: August 25, 2022, 10:13:51 am »
Hello everybody,
I tried running the TestOpcUa demo bundled with the free pascal open62541 wrapper.

I use library version 1.2.3 located in same dir as application.

When I try starting the server with the <start> button I get this:

user@debian:~/Documents/dev/3rd-party/fpopen62541-main$ LD_LIBRARY_PATH=. ./TestOpcUa

[...]
[2022-08-25 10:11:59.161 (UTC+0200)] warn/server        AccessControl: Unconfigured AccessControl. Users have all permissions.
[2022-08-25 10:11:59.161 (UTC+0200)] info/server        AccessControl: Anonymous login is enabled
[2022-08-25 10:11:59.161 (UTC+0200)] warn/server        Username/Password configured, but no encrypting SecurityPolicy. This can leak credentials on the network.
[2022-08-25 10:11:59.161 (UTC+0200)] warn/userland      AcceptAll Certificate Verification. Any remote certificate will be accepted.
[2022-08-25 10:11:59.161 (UTC+0200)] info/network       TCP network layer listening on opc.tcp://debian:4840/
[2022-08-25 10:11:59.212 (UTC+0200)] info/network       Shutting down the TCP network layer


Last line in log is the problem. It seems that server is started and immedialy stopped, as if the "running" variable passed to control server execution is not read correclty, despite in TestOpcUa is set correctly before passing to run method.

I tried to create another C program to call the library directly and once started it does not show the above red line:

user@debian:~/dev/open62541-v1.2.3/build/bin/custom$ LD_LIBRARY_PATH=. ./custom-OpcServer

[...]
[2022-08-25 10:09:36.109 (UTC+0200)] warn/server   AccessControl: Unconfigured AccessControl. Users have all permissions.
[2022-08-25 10:09:36.109 (UTC+0200)] info/server   AccessControl: Anonymous login is enabled
[2022-08-25 10:09:36.109 (UTC+0200)] warn/server   Username/Password configured, but no encrypting SecurityPolicy. This can leak credentials on the network.
[2022-08-25 10:09:36.109 (UTC+0200)] warn/userland   AcceptAll Certificate Verification. Any remote certificate will be accepted.
[2022-08-25 10:09:36.109 (UTC+0200)] info/network   TCP network layer listening on opc.tcp://debian:4840/


Any ideas?
Thank you

« Last Edit: August 25, 2022, 10:27:33 am by tt »

tt

  • Jr. Member
  • **
  • Posts: 79
Re: OPC client with Lazarus
« Reply #69 on: August 25, 2022, 10:33:44 am »
Hi again,
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.

Any ideas?
« Last Edit: August 25, 2022, 10:55:53 am by tt »

LacaK

  • Hero Member
  • *****
  • Posts: 664
Re: OPC client with Lazarus
« Reply #70 on: August 26, 2022, 01:58:51 pm »
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 ?

tt

  • Jr. Member
  • **
  • Posts: 79
Re: OPC client with Lazarus
« Reply #71 on: August 26, 2022, 02:20:01 pm »
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 ?

Done.
Thank you.

 

TinyPortal © 2005-2018