Hello,
We use the RevolutionPI as a ModbusRTU slave and we need to write to holding registers so that the master reads with function code 3. As far as I can tell the master can only read with function code 4 what we are sending via Output_1, etc.
And we need 3 - this is dictated by the device we connect to.
I cannot figure out how to do this with the RevPi.
Can you help me?
About Modbus RTU Slave
Hi cristians,
here is an excerpt from our tutorial:
How to Use RevPi Connect as Modbus RTU Master
Register Address:
The Modbus register address or bit address of the data you want to access. You will find information on how the registers of the slave are assigned in the operating instructions of the slave.
The register addresses are always valid in conjunction with the respective function code. This means, for example, that a read holding register no. 17 accesses a different value than a read input register no. 17.
So try writing a value in "Input_1" and retrieving it with Function Code 4, does that work?
Regards
Johannes
here is an excerpt from our tutorial:
How to Use RevPi Connect as Modbus RTU Master
Register Address:
The Modbus register address or bit address of the data you want to access. You will find information on how the registers of the slave are assigned in the operating instructions of the slave.
The register addresses are always valid in conjunction with the respective function code. This means, for example, that a read holding register no. 17 accesses a different value than a read input register no. 17.
So try writing a value in "Input_1" and retrieving it with Function Code 4, does that work?
I can't quite understand it, can you explain a bit more here?And we need 3 - this is dictated by the device we connect to.
Regards
Johannes
I think I have the same issue. I'd like to update the holding registers of the modbus slave, however, the values that are written to Input_1 are not accessible for a master trying to read them.
Values written to Output_1 can be reached from the master by using read_input_registers, but I don't find a way to update the holding registers of the slave.
Values written to Output_1 can be reached from the master by using read_input_registers, but I don't find a way to update the holding registers of the slave.