Reputation: 1
I have wrote a simple program using Python on RSPPi, that count time between the falling edges, signal is provided by PLC (Rexroth CML40). It works great, but now I want to send more signals from PLC but I don't have any free output spots. So, I think the solution to that is making a connection between Raspberry and PLC through Ethernet. My question is, what should i need to make to receive data from PLC (state of the 3 variables) to Raspberry?
I found this https://wiki.python.org/moin/TcpCommunication but I don't really understand it. Is it Raspberry a server? Right? If yes then how can I make client code work on PLC... It is really incomprehensible to me
Upvotes: 0
Views: 1842
Reputation: 338
You first need to find what Ethernet-based protocols the L40 controller has available. This sales guide shows that some of the IndraMotion software packages include OPC-UA, which is a good option because there is a robust Python OPC-UA library. Your controller may also have the EtherNet/IP add-on module, which would also work. Your distributor or sales rep should be able to point you in the right direction.
The second step is to find a library that allows to you communicate over that protocol. I've personally had success with OPC-UA, many options though. Some Recommendations:
Upvotes: 1