Using Port 502 for Modbus Clients on groov Devices

Both groov EPIC and groov RIO (the whole family) are ModbusTCP slaves out of the box.
They listen on port 502 and send the requested data back out that port.
This is very powerful if you are needing I/O or scratchpad data out of any of the groov devices to a ModbusTCP server on your local network.

TIP. If you need a PAC Control variable sent via Modbus, just write the variable to a scratchpad location and use the groov Manager Modbus calculator to get the device ID and register address. This is much faster and less CPU intense than running the PAC Control Modbus toolkit.

BUT. What if you need to run some other software as your ModbusTCP client. What then?
You cant have two applications listening to port 502, are you out of options?

Not at all. The key is to turn off the groov software from using that port…

If you go into the I/O services → Configuration menu in groov Manage, you can see a very important setting:

Turning off the groov hardware from listening on port 502 is the first step.
The second step is to know that port 502 is a hard ‘wired’ redirect to port 8502 on the localhost.
That’s why when you go to the Security → Firewall menu in groov Manage you see the ModbusTCP rule is showing port 8502, not 502. (For more details and tips on the firewall, check out this forum post here.)

If you turn off the I/O Modbus/TCP slave, nothing is listening on port 8502… so now you can use the PAC Control Modbus toolkit or the Codesys Modbus library, or the Node-RED Modbus nodes and configure them to use port 8502, any traffic on port 502 will come in and hit those listening services.

So to sum up.
There is a hard wired port re-direct from port 502 to port 8502.

  1. Turn off the groov Manage Modbus slave from listening on port 8502
  2. Turn on your Modbus server software to use port 8502.

Of course, if you are not using any Modbus, turn off the firewall on port 8502 and port 502 will be dead.

2 Likes