Error write with modbus_driver [message #1781157] |
Fri, 02 February 2018 03:20  |
Eclipse User |
|
|
|
Hi guys, I have a problem using the modbus_asset: when I try to write a float in a channel, it fails to update the value after the comma, updating only the whole part. I also noticed that by changing the data.type field to fit the float, I get an error in the ui web client. I show you the screens I've done. Any idea?
Attachment: 1.png
(Size: 13.90KB, Downloaded 216 times)
Attachment: 2.png
(Size: 13.19KB, Downloaded 182 times)
Attachment: 3.png
(Size: 50.34KB, Downloaded 172 times)
Attachment: 4.png
(Size: 100.08KB, Downloaded 177 times)
Attachment: 5.png
(Size: 343.49KB, Downloaded 159 times)
|
|
|
Re: Error write with modbus_driver [message #1781535 is a reply to message #1781157] |
Thu, 08 February 2018 04:30  |
Eclipse User |
|
|
|
Hi Stefano,
A possible explanation can be the following:
1. At the beginning you tried to write a float to a channel having an integer type in the data.type column (for example UINT16, which is the default), in this case floats will be coerced into integers by the driver, the decimal part will be discarded and the result will be placed in a single modbus register (register at address 1 basing on your config).
2. If you set FLOAT as data.type the driver will preserve the decimal part but it will try to write a 32 bit float value, spanning two modbus registers (registers at addresses 1 and 2 from your config). If the previous scenario worked and this one not it is possible that your modbus device/simulator does not allow you to read/write modbus register at address 2.
Best regards
Nicola
|
|
|
Powered by
FUDForum. Page generated in 0.06121 seconds