Recent

Author Topic: A few demos on how to use seryal/OPCComponent please  (Read 1421 times)

TheMouseAUS

  • New Member
  • *
  • Posts: 47
A few demos on how to use seryal/OPCComponent please
« on: January 30, 2023, 11:27:12 pm »
I am new to Lazarus, previously I was using Delphi 2007 with OPCSimpleClient and never had a problem. But thats very old now and probably not a good idea for use with modern OS's. I have installed syOPCDAClient (I believe is based on OPCSimpleClient), dropped the component onto the form but I cannot get any form of connection and the supplied demo really does not help me much. Can anyone point me in the right direction? Once I get a connection and can read my groups/topics I will be away. I am using Kepware as the OPC server. I know I should be using OPC UA but that has me even more lost. Any demo code to help would be appreciated. Thanks :-)

jamie

  • Hero Member
  • *****
  • Posts: 6091
Re: A few demos on how to use seryal/OPCComponent please
« Reply #1 on: January 31, 2023, 12:00:25 am »
I assume you have an app running the equivalent Server ?
The only true wisdom is knowing you know nothing

avra

  • Hero Member
  • *****
  • Posts: 2514
    • Additional info
Re: A few demos on how to use seryal/OPCComponent please
« Reply #2 on: January 31, 2023, 01:31:52 am »
OPC DA client:
https://github.com/seryal/OPCComponent
https://sourceforge.net/projects/myopcclient/

OPC UA client and server:
https://github.com/fluisgirardi/fpopen62541

OPC DA, XML, AE, HDA and OPC UA client (commercial):
https://www.kassl.de/opc/delphi.shtml

Discussion:
https://forum.lazarus.freepascal.org/index.php/topic,9912.0.html

Although it does not yet support OPC, this might be also interesting to you:
https://www.pascalscada.com (it is best to use OPM to download it)
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

TheMouseAUS

  • New Member
  • *
  • Posts: 47
Re: A few demos on how to use seryal/OPCComponent please
« Reply #3 on: January 31, 2023, 01:48:36 am »
Thanks for the reply. The OPC test app connects to the server fine and shows all available tags. Delphi 2007 works fine OPC client and the kepware server.

I tried calling syOPCDAClient1.connect('localhost','Kepware.KEPServerEX.6') that comes back with invalid typecast
syOPCDAClient1.connect('Local Machine','Kepware.KEPServerEX.6') thinks for bit then comes back with EOLESysError RPC not available

Thats why a simple demo code will help me so I understand how to use it

TheMouseAUS

  • New Member
  • *
  • Posts: 47
Re: A few demos on how to use seryal/OPCComponent please
« Reply #4 on: January 31, 2023, 01:52:22 am »
OPC DA client:
https://github.com/seryal/OPCComponent
https://sourceforge.net/projects/myopcclient/

OPC UA client and server:
https://github.com/fluisgirardi/fpopen62541

OPC DA, XML, AE, HDA and OPC UA client (commercial):
https://www.kassl.de/opc/delphi.shtml

Discussion:
https://forum.lazarus.freepascal.org/index.php/topic,9912.0.html

Although it does not yet support OPC, this might be also interesting to you:
https://www.pascalscada.com (it is best to use OPM to download it)

I have already been through all these except https://sourceforge.net/projects/myopcclient/ I will check it out thanks :-)

TheMouseAUS

  • New Member
  • *
  • Posts: 47
Re: A few demos on how to use seryal/OPCComponent please
« Reply #5 on: January 31, 2023, 03:07:22 am »
OPC DA client:

https://sourceforge.net/projects/myopcclient/


OK Thats works a bit more like I would expect, only I cannot read some of it as its in another language will see ifs its easy enough to change

Thaddy

  • Hero Member
  • *****
  • Posts: 14210
  • Probably until I exterminate Putin.
Re: A few demos on how to use seryal/OPCComponent please
« Reply #6 on: January 31, 2023, 06:47:29 am »
Yes, it is in Russian, but quite easy to translate. There should not be any problems using a translator, because it is well defined and clear language. (I speak some not perfect Russian, just enough for a programmer, but my wife is fluent in Russian, so if the translator does not work I can help you a bit)
« Last Edit: January 31, 2023, 06:53:06 am by Thaddy »
Specialize a type, not a var.

TheMouseAUS

  • New Member
  • *
  • Posts: 47
Re: A few demos on how to use seryal/OPCComponent please
« Reply #7 on: January 31, 2023, 11:46:45 am »
Yes, it is in Russian, but quite easy to translate. There should not be any problems using a translator, because it is well defined and clear language. (I speak some not perfect Russian, just enough for a programmer, but my wife is fluent in Russian, so if the translator does not work I can help you a bit)

I have translated all the necessary parts if anyone wants it

TheMouseAUS

  • New Member
  • *
  • Posts: 47
Re: A few demos on how to use seryal/OPCComponent please
« Reply #8 on: February 17, 2023, 06:46:02 am »
Well I am successfully creating my application using this component. I do have one part I would really like to figure out. How can you create the TagList for OPCClient at runtime? Having to open the Tag Editor from the component in the IDE each time I need to Add/Change a tag is a very slow and painful way to do it. Can this be done as I am unable cant figure it out? Thanks

TheMouseAUS

  • New Member
  • *
  • Posts: 47
Re: A few demos on how to use seryal/OPCComponent please
« Reply #9 on: February 22, 2023, 10:13:47 pm »
Must be no easy way I take it. I was hoping to build a table before enabling the OPCClient, load it into the Client then enable but that must not be possible. It really sucks that the Tags have to be entered twice, one for the client and then one for the Tag to be activated, just seems to be double handling.

 

TinyPortal © 2005-2018