Write Floating in Modbus TCP!

Hello and Merry Christmas,

I started with openhab 2 on raspi3. I can read and write bits and words without problem, but for floating numbers it does not work.

Modbus configuration:
Modbus: tcp.MF40.connection = x.x.x.x: x
Modbus: tcp.MF40.id = 4
Modbus: tcp.MF40.start = 40
Modbus: tcp.MF40.length = 2
Modbus: tcp.MF40.valuetype = float32_swap
Modbus: tcp.MF40.type = holding

Items:
Number T_sol_sdb “temperature dalle: [% .1f ° C]” (SDB, Sol_temp) {modbus = “MF40: 0”}

I was forced to switch to float32_swap to read the right value.
In my openhab.log I have no error.

If someone has an idea, an error I will have made
thank you

Indeed writing 32 bit floats is not supported by the binding – the values are converted to 16bit int and then written to single register. This is known limitation which is also mentioned on the wiki pages

Best
Sami

Hi,

That’s what I thought. But I did not quite understand your last position on that. Not very clear to me. Moreover, I thought maybe this limitation has been corrected.

Think you make this correction?

In this case, is it possible to set up read and write 16-bit and 32-bit BCD?

Thank you.

No correction has been done, the limitation still applies.

Not sure what you mean by “read and write 16 bit and 32 bit BCD”?

Best
Sami