Best solution for two-way communication

I was wondering what the best practice is for two-way communication between two Wago’s would be?
I’m looking into splitting the PLC- and the HMI-program in two separate PLC’s and would need lots of variables with R/W access.
A Modbus TCP-slave on the PLC?

Use Codesys NVL lists to share data between PLCs.

Yes, I’ve tought about that and have been using NVL, but it’s limited in size and not two-way (as per file)

NVL is usefull for process live data exchange.
For parameterizing, Modbus can be suitable. As I can remember, also
Modbus write multiple registers is limited.
Also CANOpen SDO is for suitable for parameterizing system if CAN bus in

How much data bytes included in your “block”? Binary block?
Is FTP function block familiar for you ?

Long time ago, I’ve used FTP between Wago PLC and Windows Excel.


Bjørn Idar Kristiansen via WAGO Open Source Community kirjoitti
2023-09-13 09:41:

Regarding the Modbus I’ve made a “protocol” which compares structures and write changes but it is kind of heavy and was hoping for a simpler solution.
Well, it’s arrays of data structures so it would be a NVL list per object (considering the size of the structure).

I’ve not used the FTP-FB - not sure if this solution would be suitable. You mean transfering a binary file with values between the two?

If your array member fits to one NVL list, try to make a list as follows

nArrayIndex : int ; // Array index
stcObject : MyDataSetObject ;

Set array index and copy your member object in to stcObject.
Activate event trigger variable to send NVL list to others.

In receiver side. Copy data from NVL to GVL using nArrayIndex.
How does it looks like? Multiplexed method. One dataset at time.

Bjørn Idar Kristiansen via WAGO Open Source Community kirjoitti
2023-09-13 10:43:

1 Like

Sounds like a feasable solution, thanks!
I will give it a try

Since Firmware 24 you can use OPC UA to Exchange Data between PLC‘s

For the HMI / Touchpanels TP600, the OPC Functions are available since FW25. (Visu-Panel and Control Panel)

The Release of FW26 will Include the possiblily to use the Datasource Manager with option „CodesysV3Application“ up to now, you can use the Datasource Manager to Connect a Datasource to a OPC-Server. (Means the plc is an OPC-UA Client)

Otherwise i would recommend to use ModbusTCP to :slight_smile:


I tried exchanging some data between two PFC200s with OPCUA but after getting all the symbols on 2nd PFC from 1st PFC (online), there was no live data and all variables with default values (0). Couldn’t figure it out so I just used NV. Fortunatelly it was sufficient for this case. But it’d be great to know how to establish such communications in the future.
Could you provide some example project for this?