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 communication problems
#1
Hi

I have made this modbus script i jason format, and when I add it in the SpaceLynk I did not get values on "discrete input" and there was some scaling error, i deleted the device and corrected the errors, saved file as gold_rev2, and added it to spaceLynken. 
Now I only get value at address 63, all the others there is no commutation to. When I look at objects they are link to to, only 63 are uppdate.
Using Modbus TCP, what can be wrong here?

{"product_code":"Swegon_Gold","mapping":[
{ "name": "SA Temperature", "bus_datatype": "float16", "type": "inputregister", "address": 63,"units": "°C","value_multiplier": 0.01},
{ "name": "Damper operation active ", "bus_datatype": "bool", "type": "discreteinput", "address": 1},
{ "name": "A-Alarm", "bus_datatype": "bool", "type": "discreteinput", "address": 12},    
{ "name": "B-Alarm", "bus_datatype": "bool", "type": "discreteinput", "address": 13},
{ "name": "EA Air flow", "bus_datatype": "float16", "type": "inputregister", "address": 5,"units": "m3/h","value_multiplier": 3.6},    
{ "name": "EA Fan level", "bus_datatype": "float16", "type": "inputregister", "address": 37,"units": "%","value_multiplier": 0.01},        
{ "name": "Outdoor temperature ", "bus_datatype": "float16", "type": "inputregister", "address": 72,"units": "°C" , "value_multiplier": 0.01},
{ "name": "Heat exchanger regulator level  temperature ", "bus_datatype": "float16", "type": "inputregister","address": 90, "units": "°%","value_multiplier": 0.01},
{ "name": "SA Air flow ", "bus_datatype": "float16", "type": "inputregister", "address": 3,"units": "m3/h","value_multiplier": 3.6},    
{ "name": "SA Fan level", "bus_datatype": "float16", "type": "inputregister", "address": 36,"units": "%","value_multiplier": 0.010},
{ "name": "Reheat regulator level ", "bus_datatype": "float16", "type": "inputregister","address": 93,"units": "°%","value_multiplier": 0.01},
{ "name": "EA Temperature", "bus_datatype": "float16", "type": "inputregister", "address": 65,"units": "°C" ,"value_multiplier": 0.01},
{ "name": "Cool regulator level ", "bus_datatype": "float16", "type": "inputregister", "address":100,"units": "°%","value_multiplier": 0.01},
{ "name": "Communication operation level  ", "bus_datatype": "float16", "type": "register", "address": 792},
{ "name": "SA temperature set point ", "bus_datatype": "float16", "type": "inputregister", "address": 86,"units": "°C","value_multiplier": 0.01}

]
,"manufacturer":"Swegon","name":"Gold","product_range":"Ventilation","description":"Ventilasjon"}
Reply
#2
Do you have any errors in main Error log or Modbus error log?
Reply
#3
Yes in the modbus error log this:

/lib/genohm-scad/plugins/modbus/daemon.lua:0:attempt to perform arithmetic to field`read_offset"(a nil value)

This maesage come evry 10-15 seconds
Reply
#4
I deleted the device and add it again, I do not link the following objects, then all the values and errors disappeared.
What can be wrong in these three lines?

{ "name": "Damper operation active ", "bus_datatype": "bool", "type": "discreteinput", "address": 1},
{ "name": "A-Alarm", "bus_datatype": "bool", "type": "discreteinput", "address": 12},
{ "name": "B-Alarm", "bus_datatype": "bool", "type": "discreteinput", "address": 13},

From the manual:
1x0002 Damper operation active
1x0013 A-alarm active
1x0014 B-alarm active

Input Status Discrete Input 1x

One more thing, the outdoor temperature shows the value 651 ° C, but in the ventilation system it shows -3.7 ° C how can I scale this when it's minus degrees?

{ "name": "Outdoor temperature ", "bus_datatype": "float16", "type": "inputregister", "address": 72,"units": "°C" , "value_multiplier": 0.01},
Reply
#5
It's a bug in modbus mapper with coils and discrete inputs. It should work fine if you don't use them for now.
Reply
#6
Hi
Use this patch https://dl.openrb.com/lmup/2018.08.22-modbus.lmup
install via Utilities-> install updates.
BR
------------------------------
Ctrl+F5
Reply
#7
HI
Thank you, it works perfectly, do you have any idea how to get the outdoor label to get right when it's minus degrees? Now is it plus and then it shows right?
Reply
#8
(27.11.2018, 10:30)oyvindnordbo Wrote: HI
Thank you, it works perfectly, do you have any idea how to get the outdoor label to get right when it's minus degrees? Now is it plus and then it shows right?
What does the manual says about this registry?
------------------------------
Ctrl+F5
Reply
#9
For signed values you need to set "datatype" to "int16", "bus_datatype" can be left as "float16"
Reply
#10
Hi
I have problems with the temperatures on a modbus register, everything else works as it should.(25 objekt)
Here are two registries that do not work and two that work
Do not work, the value is 0
{ "name": "Exhaust air temperature", "bus_datatype": "int16", "type": "inputregister", "address": 75,"units": "°C","value_multiplier": 0.01},
{ "name": "Extract air temperature", "bus_datatype": "int16", "type": "inputregister", "address": 76,"units": "°C","value_multiplier": 0.01},

Work fine.
{ "name": "Supply air flow", "bus_datatype": "int16", "type": "inputregister", "address": 94,"units": "m3/h","value_multiplier": 3.6},
{ "name": "Exhaust air flow", "bus_datatype": "int16", "type": "inputregister", "address": 95,"units": "m3/h","value_multiplier": 3.6},

From the manual:
Present value, Signed Word
3x0076 Exhaust air temperature -x.y - +x.y °C (factor 10)
3x0077 Extract air temperature -x.y - +x.y °C (factor 10)
3x0095 Supply air flow 0 - x l/s
3x0096 Exhaust air flow 0 - x l/s

Someone who knows what's wrong?
Reply
#11
"value_multiplier" should be 0.1 instead of 0.01
If this still does not work then remove value_multiplier completely, set bus_datatype to int32 and check what the raw register value is that way.
Reply
#12
Thank you, it work perfekt
Reply


Forum Jump: