This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

modbus - negative values
#1
Hi!, 

I'm having trouble reading negative values (analog-value , Holding register) from a Modbus device using profiles. Specifically, I'm trying to read a value that should be -10, but I’m getting 65436 from the LM5.

Thanks in advance

{ "name": " Temperature Control Outdoor Air Curve Outdoor Air 1 Setpoint ", "bus_datatype": "float16", "type": "register", "address": 1100,"units": "°C" , "value_multiplier": 0.1, "writable": 1},
Reply
#2
Did you try different datatype?
------------------------------
Ctrl+F5
Reply
#3
Default "datatype" is "uint16", you need to add "datatype": "int16" to your profile.
Reply
#4
(21.06.2024, 09:57)admin Wrote: Default "datatype" is "uint16", you need to add "datatype": "int16" to your profile.
I change it to this (bellow) and still have the same issue 

{ "name": " Temperature Control Outdoor Air Curve Outdoor Air 1 Setpoint  ", "bus_datatype": "float16", "dataype": "int16" , "type": "register", "address": 1100,"units": "°C" , "value_multiplier": 0.1, "writable": 1},

{ "name": " Temperature Control Outdoor Air Curve Outdoor Air 2 Setpoint  ", "bus_datatype": "float16", "dataype": "int16" ,"type": "register", "address": 1101,"units": "°C" , "value_multiplier": 0.1, "writable": 1},
Reply
#5
What is documentation saying about this register?
------------------------------
Ctrl+F5
Reply
#6
You have a typo in your profile field: dataype instead of datatype
Reply
#7
(21.06.2024, 10:13)Daniel Wrote: What is documentation saying about this register?

Variable_Type : HoldingRegisters 
Variable_Index : 1100
Scale : - 1
Data_Type : 16bit signed
Access :  R/W
Unit :  °C
Range  : -300 to 450

(21.06.2024, 10:15)admin Wrote: You have a typo in your profile field: dataype instead of datatype

Thaaanks a lot
Reply


Forum Jump: