I'm using modbus for my solar inverter and I cant get the correct values from it. Ive tried searching the forum and I cant get it to work.
Its this bit that I cant understand:
Data formats
The float data type can be accessed in two ways. The first two addresses use the single precision (32-
bit) floating point number as specified by IEEE 754 with the lower 16-bits at the lower address and
the higher 16-bits at the following address. The two consecutive addresses use two signed 16-bit
integers x, b such that the value represented is x * 10^b. For example, consider the grid voltage L1
located at Modbus number 32032, address 2031. At address 2031 and 2032 the data will be {f15,f14,
...,f0} and {f31,f30,...,f16} respectively, where fn is the n:th bit in the floating point representation. At
2033 and 32034 the data will be {x15,x14,...,x0} and {b15,b14,...,b0} respectively.
The uint16_t is a 16-bit unsigned integer and the int16_t is a signed integer represented in the
binary two’s-complement form.
Im using Modbus Flex Getter with a function node:
Function node:
msg.payload = { 'fc': 4, 'unitid': 1, 'address': 2032, 'quantity': 4 };
return msg;
And this is what I get to my debug node:
{"data":[62915,16967,4999,65534],"buffer":[245,195,66,71,19,135,255,254]}
The value should be ~230
Thankful for any help to point me in the right direction