Modbus station unit identifier

Hello, could I get more information about the correct use of the Modbus station Unit Identifier?
With B&R I usually configure only one Modbus station pointing to an Ethernet/RTU converter that is connected to a single drive on Modbus RTU.

I also worked with multiple RTU drive stations connected through other PLCs using the same type of converter.

Now, if I declare two Modbus stations with the same IP address but different Unit Identifiers (for example 1 and 2), only one drive communicates with the PLC. I also tried other values (e.g. 2 and 10) without success.

I haven’t analyzed the Ethernet frames with Wireshark yet. For the moment, I solved it by using a second converter.

Could someone clarify the correct way to manage multiple RTU stations behind one Ethernet converter in this case?

Best regards

Without a Wireshark traces it is hard to say if the unit id is not transferred or if the slave ignores it. You can also give this library a try and see if that works better or differently.

br-automation-community/modbusTCP-Automation-Studio: modbusTCP library for Automation Studio

Stephan

1 Like

Hello @stephan.stricker, with this configuration, but using a simulator instead of the B&R PLC, everything works. I applied the same solution with other PLC brands, using a Modbus TCP library that I don’t really like, but it was the only way to communicate with these drives.
That’s why I thought it would be useful to rely on an integrated Modbus declaration solution, provided that all the standard functionalities were implemented.
I have used Modbus TCP libraries in many cases since 2012, but always to connect to other TCP devices, not to RTU gateways. In those cases, I used the X20CS1070 and data object declaration.

Ennio

Hi @Ennio_Roberti, what is the status of your topic, can you update us?

Closed by moderation team. @Ennio_Roberti feel free to reopen or update us with any new information.