Modbus communication problems - Printable Version +- Logic Machine Forum (https://forum.logicmachine.net) +-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1) +--- Forum: Gateway (https://forum.logicmachine.net/forumdisplay.php?fid=10) +--- Thread: Modbus communication problems (/showthread.php?tid=1749) |
Modbus communication problems - oyvindnordbo - 26.11.2018 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"} RE: Modbus communication problems - admin - 26.11.2018 Do you have any errors in main Error log or Modbus error log? RE: Modbus communication problems - oyvindnordbo - 26.11.2018 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 RE: Modbus communication problems - oyvindnordbo - 27.11.2018 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}, RE: Modbus communication problems - admin - 27.11.2018 It's a bug in modbus mapper with coils and discrete inputs. It should work fine if you don't use them for now. RE: Modbus communication problems - Daniel - 27.11.2018 Hi Use this patch https://dl.openrb.com/lmup/2018.08.22-modbus.lmup install via Utilities-> install updates. BR RE: Modbus communication problems - oyvindnordbo - 27.11.2018 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? RE: Modbus communication problems - Daniel - 27.11.2018 (27.11.2018, 10:30)oyvindnordbo Wrote: HIWhat does the manual says about this registry? RE: Modbus communication problems - admin - 27.11.2018 For signed values you need to set "datatype" to "int16", "bus_datatype" can be left as "float16" RE: Modbus communication problems - oyvindnordbo - 17.12.2018 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? RE: Modbus communication problems - admin - 17.12.2018 "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. RE: Modbus communication problems - oyvindnordbo - 18.12.2018 Thank you, it work perfekt |