Modbus reading - double address

How is Modbus data data sized in this format?


With others, there is no problem as in the example of the things.

Bridge modbus:serial:localSerial [port="/dev/ttyUSB0", id=1, baud=9600, stopBits="1", parity="none", dataBits=8, encoding="rtu"]
{
         Bridge poller Licznik   [ start=512, length=4, refresh=10000, type="input" ]
{
            Thing data Faza1    [readStart="512", readValueType="int16"]
            Thing data Faza2    [readStart="513", readValueType="int16"]
            Thing data Faza3    [readStart="514", readValueType="int16"]
 }
}

float32:

  • registers index and (index + 1) are interpreted as signed 32bit floating point number
  • it assumed that the first register contains the most significant 16 bits
  • it is assumed that each register is encoded in most significant bit first order

I have one more request. How to save in things register 0034-0035? When I read with this code, I have a bad reading.

Bridge modbus:serial:localSerial [port="/dev/ttyUSB0", id=1, baud=9600, stopBits="1", parity="none", dataBits=8, encoding="rtu"]
{
         Bridge poller Licznik   [ start=34, length=2, refresh=10000, type="input" ]
{
            Thing data Faza1    [readStart="34", readValueType="float32"]
 }
}

ok then

float32_swap:

  • registers index and (index + 1) are interpreted as signed 32bit floating point number
  • it assumed that the first register contains the least significant 16 bits
  • it is assumed that each register is encoded in most significant bit first order (Big Endian)

I swapped HEX (0x0032) to DEC (52) and it works.