Posts: 242
Threads: 56
Joined: Sep 2015
Reputation:
0
11.06.2024, 12:55
(This post was last modified: 11.06.2024, 12:55 by jmir.)
Hi, I'm having some troubles trying to read float32 values from modbus, setting the profile as below, read value on KNX is always 0. When I try to read using "read test" as 32float it seems to work...
"mapping": [
{"name": "SETPOINT_csp1_[R/W]",
"bus_datatype": "float32",
"type": "register",
"datatype": "float32",
"address": 900,
"read_offset": 0,
"read_count": 2,
"writable": true,
"value_delta": 0.1,
"value_multiplier": 1,
"units": "ºC"
}
Posts: 4643
Threads: 24
Joined: Aug 2017
Reputation:
207
Delete the read_offset and read_count. Drop a screenshot of correct settings from Read test.
------------------------------
Ctrl+F5
Posts: 4643
Threads: 24
Joined: Aug 2017
Reputation:
207
you are missing the read_swap n
------------------------------
Ctrl+F5
Posts: 4643
Threads: 24
Joined: Aug 2017
Reputation:
207
Do you have any errors under Modbus-Error log?
------------------------------
Ctrl+F5
Posts: 7758
Threads: 42
Joined: Jun 2015
Reputation:
447
Try setting both data types to uint32. What value is ready then?
Posts: 7758
Threads: 42
Joined: Jun 2015
Reputation:
447
TCP implementation on certain Modbus devices is very buggy. Usually only a limited amount of connections can be created and it takes some time for the device to detect disconnect and free up a used connection. Sometimes this can be fixed by enabling the "Persistent connection" mode.
At the moment value delta minimum is 0.2. This had to be done because a lot of installations are overloaded by not setting the delta properly.
Posts: 7758
Threads: 42
Joined: Jun 2015
Reputation:
447
In you read test screenshot you are using TCP connection. Have you tried enabling Persistent connection mode? Try rebooting your Modbus device as well.
Posts: 7758
Threads: 42
Joined: Jun 2015
Reputation:
447
See my previous post about adding read_delay to the profile for RS485 devices.
Posts: 7758
Threads: 42
Joined: Jun 2015
Reputation:
447
Might be some edge case. Just add read_delay and see if it helps. Another option to try is using a lower baud rate if possible.