About Modbus RTU Slave

Topics about the Software of Revolution Pi
Post Reply
cristians
Posts: 1
Joined: 17 Aug 2021, 16:28

About Modbus RTU Slave

Post by cristians »

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?
->Johannes<-

Re: About Modbus RTU Slave

Post by ->Johannes<- »

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?
And we need 3 - this is dictated by the device we connect to.
I can't quite understand it, can you explain a bit more here?

Regards
Johannes
matdog
Posts: 2
Joined: 20 Jan 2022, 11:27

Re: About Modbus RTU Slave

Post by matdog »

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.
Post Reply