I am using the rut955 as a modbus tcp master device and reading the slave registeren of another device. This works! 0 is ok. Everything else is not OK. I would like to switch a relay to connected when 0, and to disconnected when other than 0.
Not sure what to do. Somebody can help me out with the exact settings?
Your desired Modbus Relay functionality can be configured in the router’s WebUI by following these steps:
Navigate to Services → Modbus → Modbus TCP Client.
Select Edit on your Modbus TCP Device (slave).
Scroll down until you find the Alarms Configuration section and press the Add icon.
In the Alarm Configuration window, use the parameters provided in the screenshot below, but make sure to change the First register number according to the one you are reading.
After configuring the previous alarm, which will open the relay when the register’s value is equal to 0, you will need to configure a second alarm in the same way. This time, set the condition to More than 0 and the ‘I/O Action’ to Close.
I hope this works! Feel free to reach out if you need any further assistance or have additional questions.
Thanks for you reply. Unfortunately no clicking of the relay can be heard. I have added some pictures of the settings. Can you take a look?
In this case the value is 1, this means the relay should be open. When its 0 is should be closed. Anything else than 0 should be open
I’ve successfully tested this setup, and everything worked as expected. In your case, I noticed that you’re using a legacy firmware version, which lacks the “Compared condition data type” option on the Modbus Alarms Configuration page.
I recommend updating your firmware to the latest version. To do this, you’ll first need to update to the latest RUT955 legacy firmware, and then proceed to update to the newest RutOS FW version. All firmware downloads can be found here: RUT955 Firmware Downloads.
Additionally, before performing the firmware update, you can try adjusting the Data type in the Modbus Requests configuration field to 32bit INT (integer). I suspect that in this older firmware version, the Alarm configuration may only check and read for integer data types.
I’m also attaching a screenshot below of the Alarm configuration that worked for me. Since you’re using the Read Input registers (4) function, you might want to test it with the Read Holding register (3) function if the current setup doesn’t work.
I really appreciate your help. This helped me a lot. I changed it to byte32 integer, and it works, however this is not the most ideal situation, but only zero is OK, so thats fine for now.
But now I need to switch off the relay as well when the device stops sending the message modbus messages (broken device eg, power shut off eg.)