Data Exchange Between Beckhoff Controllers (TwinCAT 3)

ngch

Member
Join Date
Dec 2018
Location
Malaysia
Posts
7
Hi everyone, I'm currently finding ways to create variable that can be read & write between 2 Beckhoff controllers.

Target to be achieved:
1) PLC A has a variable named "Temp_Setpoint"
2) PLC B should be able to read "Temp_Setpoint" value from PLC A
3) PLC B should be able to update the value of "Temp_Setpoint" in PLC A

One way to achieve this is by using Beckhoff EAP (EtherCAT Automation Protocol).

The problem with EAP is you can only link a variable one time only, either to an EAP Publisher or an EAP Subscriber.
So in order to achieve the target, we have to create a clone variable in PLC B, as shown in this attached picture: EAP example.PNG

Imagine this, if we have 100 variables that need to be read/write between 2 PLCs, we need to create another 100 clone variables, which is very inefficient in my opinion.

Is there any better way to do this?
Any advice is welcome! Hope to hear your sharing and thoughts!

Thank you!
 
Hi CommissioningMan and John, thanks for your sharing!

From the info, when using ADSREAD or ADSWRITE, we need to specify 2 things for a variable:
i) Index group number
ii) Index offset number

1) So if my PLC make changes to variables & memory size, then I will need to manually update all related ADSREAD or ADSWRITE function blocks, is that correct?

2) From your experience, for Data Exchange between Beckhoff PLCs, may I know which method do you usually prefer among these 3 choices? What are the pros & cons?
i) EAP
ii) ADSREAD/ ADSWRITE
ii) Other protocol, such as OPC UA

Any sharing is welcome!
Thank you!
 
Hi ngch:
Quick comment. I am not so familiar with the ADSREAD and ADSWRITE commands nor EAP so I am not going to comment on those. But I do want to point out that I have checked the TwinCAT website and it claims OPCUA client and server functionality. So in theory it is possible to use OPCUA, but since it is client/server you cannot expect real-time performance. All the communication is done through variables in the OPCUA server address space, which is the variables that you choose to map from the PLC program to the OPC server. If you change the variables of one OPCUA server you need to change the OPCUA client. I hope this helps.
 

Similar Topics

Gents, I've a Beckhoff TwinSAFE project in TwinCAT 3 where I've 2 EL6910 Safety controllers, and need to exchange data between them. So I...
Replies
2
Views
818
Hello. I am trying to do some basic file operations (move file from one folder to another, rename file in the new folder etc) and usually I just...
Replies
1
Views
2,179
I'm looking to exchange approx 50kb of data between an S7-1500 and a Melsec Q Series PLC. Has anyone ever done this? Is it even possible given...
Replies
2
Views
1,602
Hi there, Can anyone suggest the solution to communicate between AB Compactlogix L36ERM controller(Which is having remote flex IOs over ethernet)...
Replies
9
Views
3,588
Hi everyone, i´ve done the little project and run perfectly. This is the practice in capture images. this is the first step, exchange I/O between...
Replies
2
Views
2,164
Back
Top Bottom