Communicating with TwinCAT

I see that there are ways to communicate directly with AB PLC’s using message commands in RSLogix. However, are there ways in RMC tools to do the same communications directly with Beckhoff PLC’s that use TwinCAT? I am using a Beckhoff CX2040 PLC and using TwinCAT 3 software. Currently, I am reading/writing to/from registers in the RMC from my .NET application. From there, I am writing the register values back to the PLC. So, my .NET application is the communication bridge between the Beckhoff PLC and the RMC. It works, but I’m wondering if there’s a better, more efficient way to do it, such as eliminating the bridge (.NET application) and communicating directly to/from the CX and RMC.

Thank you,

It appears that the CX2040 PLC has an optional PROFINET controller interface, which should be compatible with the RMC. Are you able to get the PROFINET interface?


If that is the only other option, then I could do it when time permits although it would require a lot of re-work now that most everything is coded and I’m just debugging now. I suppose I should have looked into it first before doing all the code work in .NET. Still, my goal was to try and limit communications protocols to Ethernet IP and EtherCAT. PROFINET would be yet another communications protocol added :frowning: .


The CX2040 PLC does support Ethernet/IP, but apparently only as a slave, otherwise it would have been a great solution.


I guess I’m confused. :confused: The CX2040 is an embedded PC itself running Windows 7 and has onboard Ethernet. TwinCAT 3 is Beckhoff’s PLC programming software and an add-on to Visual Studio. All of the PLC programming is done within VS, but the .NET application and the PLC project are two separate projects within Visual Studio. I want to do direct messaging (if possible) between the PLC project and the RMC. Currently, I’m communicating through the .NET application portion of the project in Visual Studio. So, the .NET application portion is the bridge between the PLC project and the RMC. I want to get around that if its possible. Maybe it’s not??


Maybe it’s not possible if you can’t go the PROFINET route. You mentioned you are using Ethernet IP. I was referring to EtherNet/IP, which is a specific protocol, like PROFINET is, or like Modbus/TCP is. I thought you were referring to EtherNet/IP as well, but maybe you were just referring to Ethernet in general?

Okay, understood now. Yes, I was just referring to Ethernet. I will look into the PROFINET module for the CX. At least I know that there is a better way. Thanks for the feedback.


So if I go PROFINET for communications to/from the CX (would need to purchase module). Would I require to modify my hardware configuration on the Delta RMC side?

UPDATE: I just spoke with my Beckhoff applications engineer. We can use Ethernet I/P and set up the CX as a Master or Slave. It is all done in software so we wouldn’t need to purchase anything on the Beckhoff side other than the Ethernet I/P license for TwinCAT. So thoughts are the CX would be the master and the RMC would be the slave. Is there any configuration file (?) that I would need on the RMC side if the RMC is the slave?

For EtherNet/IP, you don’t need any configuration file for the RMC side. I don’t know the procedure for setting up EtherNet/IP in the CX, but you may need to provide the master with the RMC ESD file. This is available from our website:

In the RMC, you will need to set up the Indirect Data Map with the data that you wish to send back and forth. Also, in the CPU properties, you need to specify the starting locations for the incoming and outgoing data.

Thanks Jacob, I’m almost there. I’m just having trouble setting up the indirect data map with my new data. Are there any tutorials on this part?

No, there are no tutorials. For each item in the Indirect Data, click the … button to browse for the item you want.

Hi Don,

We can defintely connect to Beckhoff’s controllers! Here’s a great post on establishing the connection via TwinCAT 3,