Node-red-contrib-modbus Server read/write


I am using the Modbus server node to simulate a modbus controller for 13 air handling units
The controller has 1 IP address and each air handling unit has its own unit ID (1-13)

I am using the Modbus write node to force FC 5 on or off to simulate each Air handling unit being switched on or off.

I am using the Modbus read node with a function to read the status of Air handling units 1 to 13.

When I write to FC 5 (Single coil) for Unit ID 1 address 0 and read the status from the server, all Unit IDs read as having FC5 forced on not just ID 1. It seems to overwrite FC5 on all unit IDs

Can anyone help me understand how I read write to the server without having the same value overwritten to all Unit IDs? (See attached)



My guess , based on your testing, is that the Modbus server is ignoring the unit ID. Probably the Modbus server node was designed to be Modbus TCP only.



I would export the work you have done so far and save to a file that you can come back to.
Then I would make a very simple flow with a single message to one device, make sure that is working, then add just one more device. From there you should be able to see if messages are being duplicated and work out what needs to be changed to address each individually.
Let us know how you go and what further questions it might raise.



Thanks for your response,
I tested on a smaller scale. Changing the unit ID for reading/writing seems to make no difference.
I write to a coil in Unit ID 1 and read from any other Unit ID and the coil is also changed.
I wonder is this an issue just with the server node or will the read/write node act the same when connected to a real world device?