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.
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 .
I guess I’m 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.
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?
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.