You are not logged in.
Pages: 1
Topic closed
Anyone had any luck communicating modbus-tcp with any of the Automation Direct PLC's? For now I'm just looking to read values but I haven't been able to get past MOSBUS master: connect socket error/timeout. I know I have the correct IP address of the PLC I'm trying to reach and I believe they use port 28784. TIA for any hints/help!
Offline
Already tried the standard Modbus TCP port 502?
Offline
Sorry for the delay, this is a pet project that gets back burnered quickly. I tried 502 first, using the Modbus master example code. I have some experience with Modbus but this is my first project with an RPi and REX so I'm learning on the fly and am probably missing something simple. I'm able to see the PLC and the RPi from an HMI on the network (though I haven't been able to properly retrieve any data from the RPi yet). The HMI's typically have a protocol for Koyo ethernet so there might be a syntax issue but I think the "MODBUS master: connect socket error/timeout" is upstream of that. The comms module supports TCP/IP (UDP/IP) and IPX and definitely uses port 28784. I haven't tried reading the RPi from the PLC yet.
Ultimately, I want an HMI that's more programmable than typical HMIs but for now if I can just display some data I'll be happy.
I did notice that one of the options in the master_exec block properties target was a DL205-Windows CE so this isn't completely uncharted territory.
Thanks.
Offline
Hi coldh2odvr,
your project makes perfect sense, RPi is a great replacement of standard HMI screens. Modbus TCP connection is possible, at least with Koyo Click PLCs with Ethernet. It is up to you to learn how to setup Modbus master or slave in the Koyo PLC. REX on RPi will then act as the counterpart.
If Raspberry Pi is the master, then you need to setup Koyo PLC as Modbus slave and obtain the mapping of Modbus registers the master will write to and read from.
If Koyo PLC is the master, then you need to specify Modbus registers table of the slave device (RPi) and then implement it in REX.
I recommend going through the examples on GitHub https://github.com/rexcontrols/REXexamples where you find example projects on implementing both Modbus master and slave in the REX Control System.
Monarco HAT for Raspberry Pi - Lightweight I/O for monitoring, archiving and control.
Raspberry Pi in industrial automation!
Offline
Solved! Turns out there are two versions of the Ecom module, one supports TCP/IP, the older version only IPX UDP/IP. When I pointed the RPi to the new Ecom-100 it connected without a hitch (go figure). There may be a way to talk to the older version but for now I'll set up a SCADA table in the PLC fitted with the Ecom-100 (port 502 btw) and start having fun! Thanks for the support!
Offline
Well done! Glad I could help.
Thanks for your update.
Monarco HAT for Raspberry Pi - Lightweight I/O for monitoring, archiving and control.
Raspberry Pi in industrial automation!
Offline
Pages: 1
Topic closed