Modbus RTU multiple registers access
Posted: 11 Nov 2024, 11:13
Hello. I'm using a RevPi Flat S to communicate with 2 different modbus channels.
To optimize the polling sequence, I would like to use the "Read Multiple Holding Register" and "Write Multiple Holding Register" function codes (3 and 16 respectively).
I saw that it is possible to configure these commands with Pictory, but I didn't found the sintax for example to write multiple registers using the "piTest" utility.
I tried to configure an output variable on "Pictory" in this way: Could you please indicate the correct sintax to write more than one register at a time?
I saw that "piTest" has the option "piTest -w <o>,<l>,<v>". In this case which value for offeset <o> shall I use to write at slave address 112 and register 1?
Whit this command I can use l=1,2 or 4. If I use 4, I'll effectively write register 1 and 2?
Note that if I read or write one register at a time, all correctly works.
Thank you.
Fabrizio
To optimize the polling sequence, I would like to use the "Read Multiple Holding Register" and "Write Multiple Holding Register" function codes (3 and 16 respectively).
I saw that it is possible to configure these commands with Pictory, but I didn't found the sintax for example to write multiple registers using the "piTest" utility.
I tried to configure an output variable on "Pictory" in this way: Could you please indicate the correct sintax to write more than one register at a time?
I saw that "piTest" has the option "piTest -w <o>,<l>,<v>". In this case which value for offeset <o> shall I use to write at slave address 112 and register 1?
Whit this command I can use l=1,2 or 4. If I use 4, I'll effectively write register 1 and 2?
Note that if I read or write one register at a time, all correctly works.
Thank you.
Fabrizio