Modbus address re-writing on RS-485 adapters

The RS-485 adapter has a feature that allows you to override the modbus unit address on incoming modbus requests. It’s very convenient and I use it to avoid having to change the factory-default modbus addresses on modbus hardware.

Screenshot:

However, you can only input one translation address, so I can’t figure out a way to use this feature when I have several devices daisy-chained on one RS-485 adapter.

What I’d like to be able to do is override multiple addresses. So for example, I could set the adapter to receive modbus traffic on ids 1 and 2, but translate them into ids 7 and 254, which are the factory-default modbus addresses of the modbus devices I’m using.

Is there a way to accomplish this?

Thanks for any assistance!

  • Jason

You are correct - there is no direct way to do that unless you write Python code to handle much of the Modbus work external to the IA engine (not a small effort).

However, you CAN create 2 routes to the same MAC address. So the route for Unit Id #1 could be set to map to 7, and Unit Id #2 could be a seperate route mapping to 254.

Just be aware that the X4/X2 gateway treats all routes as independent threads, so it will happily send concurrent/parallel requests on both routes, garbbling your RS-485 multi-drop. This would NOT be a problem if your Modbus/TCP master only talks to 1 at a time, but could be an issue if you have 2 masters.

Thank you! I think the multiple-routes approach might be the solution.