Read OPC server data from PLC
Hi everyone!
I have running on my PLC (AXC F2152) an OPC server where I can write several variables of my PLC program. It works fine, I can access to it from an OPC-UA client and to see the data. Now I was wondering if it is possible to connect another client to this OPC server (for example another PLC) and write another new data on it. Then I want to read this new data from my AXC F 2152.
Is there any way to do this? I was checking the forum but only found threads related to OPC as Server to write data.
Thanks in advance,
Best regards,
I have running on my PLC (AXC F2152) an OPC server where I can write several variables of my PLC program. It works fine, I can access to it from an OPC-UA client and to see the data. Now I was wondering if it is possible to connect another client to this OPC server (for example another PLC) and write another new data on it. Then I want to read this new data from my AXC F 2152.
Is there any way to do this? I was checking the forum but only found threads related to OPC as Server to write data.
Thanks in advance,
Best regards,
Comments
There are three devices:
1. AXC F 2152
2. OPC UA client device
3. another OPC UA client, e.g. a PLC (type unknown)
Device 2 needs to exchange data with device 1. This has already been achieved using OPC UA.
Device 3 also needs to exchange data directly with device 1? Is that correct?
If that's correct, then if device 3 has OPC UA client capability, it can connect to the OPC UA server on device 1 at the same time as device 2 is connected, and both device 2 and device 3 can exchange data with device 1 at the same time.
PLCnext Control devices do not have OPC UA Client capability included, so if device 3 is a PLCnext Control device, then you may need to consider other ways to meet the data exchange requirement (e.g. using Profinet).
1. AXC F2152
2. Another OPC UA client, e.g. a PLC (type unknown).
The other device that you mentioned is a test client in order to check the opc ua Server of PLC works fine.
So, I want to use device 1 (AXC F2152) as OPC server and exchange data with device 2 using OPC-UA server, but both must be able to do both operation, read and write.
Although, if I understood the last statement, the device 1 (AXC F2152) has only the possibility of to be OPC server, not OPC client being impossible read data wrote by the other device in the OPC server.
Can you confirm this?
Thanks,
Regards.
https://www.plcnext-community.net/en/discussions-2-offcanvas/opcua-client.html
May be it is possible to do what I want to.
using any other (external) UA Client SDK you could implement the capeability by yourself.
Depinding on your timeline it might worth waiting for the release of 2022.0 (end of November).
With this version we will integrate OPC UA Pub/Sub, which seems to be exactly what you are looking for.
Frank
- The AXC F 2152 defines the data that will be available in the OPC UA server.
- The AXC can "write" data to the other device by writing values to variables in the OPC UA server, which the other device (OPC UA Client) reads.
- The AXC can "read" data from the other device by reading values from variables in the OPC UA server, which the other device (OPC UA Client) has written.
Does this solve the problem?
If the other device has Profinet capability, then may also be possible to exchange data between the two devices via Profinet.
Just one more question. If the other device modify a variable on the OPC-UA server, how can I read this variable from AXC? Change appears instantly right?
Thanks for the help!