Hi all.
I am able to read float values from my VSD. How do I read strings and negative floats using this lib with serial RTU.
I can read the values using Python with the minimal modbus lib. But I am developing and application with a free pascal binding.
This is the Python code using Minimalmodbus
amps = vsd.read_register(registeraddress=0x0000,number_of_decimals=2, functioncode=3 ,signed=True)
serial_number = vsd.read_string(170, number_of_registers=10, functioncode=3)
This is the free pascal code using the libmodbus binding
ret := modbus_read_registers(ctx, 0, Length(regbuf), regbuf);
amps := regbuf[0] / 100;
amps is fine as long as it stays positive. As soon as I have a negative value it will give me the wrong value.
I have no idea how to get strings with this lib as I do not see a function for it.
Thanks.