Logic Machine Forum
modbus register floating points - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8)
+--- Thread: modbus register floating points (/showthread.php?tid=1954)



modbus register floating points - german.cespedes@ecoelec.cl - 07.03.2019

Hello,

I am reading 16 energy meters "ELNET PowerMeters" with spacelynk and my problem is that when reading a record I always read whole values, for example 230 V or 105 A. And I need to read values with floating point.

According to the map of records, I have to read 2 variables and I still can not find it.

for example, for line 1 current I am reading record 4013

This is the manufacturer's registration map, where it indicates how to do it on pages 3/77 and 4/77

https://www.ditrade.md/ctrl/Home/Elnet/Elnet%20PQ/elnet_comm.pdf

I think I should do some script to put together 2 records and get a result and write it in a new group address.

I attach the profile that you create

Your help please

Greetings.


RE: modbus register floating points - admin - 07.03.2019

You forgot to attach the profile. Anyway, you don't need additional scripts to read floating point values, just correct profile entries.


RE: modbus register floating points - german.cespedes@ecoelec.cl - 07.03.2019

(07.03.2019, 18:47)administración Wrote: Has olvidado adjuntar el perfil. De todos modos, no necesita scripts adicionales para leer valores de punto flotante, solo corrija las entradas de perfil.

Hello,

attached profile

{
"fabricante": "Elnet",
"description": "ElNet Power Meter",
"cartografía":[
{"bus_datatype": 14, "address": 1, "value_nan": [65472,0], "type": "register", "units": "V", "name": "Voltage linea 1", " tipo de datos ":" uint16 "},
{"bus_datatype": 14, "address": 3, "value_nan": [65472,0], "type": "register", "units": "V", "name": "Voltage linea 2", " tipo de datos ":" uint16 "},
{"bus_datatype": 14, "address": 5, "value_nan": [65472,0], "type": "register", "units": "V", "name": "Voltage linea 3", " tipo de datos ":" uint16 "},
{"bus_datatype": 14, "address": 7, "value_nan": [65472,0], "type": "register", "units": "V", "name": "Voltage linea 1-2" , "tipo de datos": "uint16"},
{"bus_datatype": 14, "address": 9, "value_nan": [65472,0], "type": "register", "units": "V", "name": "Voltage linea 2-3" , "tipo de datos": "uint16"},
{"bus_datatype": 14, "address": 11, "value_nan": [65472,0], "type": "register", "units": "V", "name": "Voltage linea 3-1" , "tipo de datos": "uint16"},
{"bus_datatype": 14, "address": 13, "value_nan": [65472,0], "type": "register", "units": "A", "name": "Current linea 1", " tipo de datos ":" uint16 "},
{"bus_datatype": 14, "address": 15, "value_nan": [65472,0], "type": "register", "units": "A", "name": "Current linea 2", " tipo de datos ":" uint16 "},
{"bus_datatype": 14, "address": 17, "value_nan": [65472,0], "type": "register", "units": "A", "name": "Current linea 3", " tipo de datos ":" uint16 "},
{"bus_datatype": 14, "address": 25, "value_nan": [65472,0], "type": "register", "units": "W", "name": "Potencia Activa", "datatype ":" uint16 "},
{"bus_datatype": 14, "address": 33, "value_nan": [65472,0], "type": "register", "units": "VA", "name": "Potencia Aparente", "datatype ":" uint16 "},
{"bus_datatype": 14, "address": 41, "value_nan": [65472,0], "type": "register", "units": "VAR", "name": "Potencia Reactiva", "datatype ":" uint16 "},
{"bus_datatype": 14, "address": 49, "value_nan": [65472,0], "type": "register", "units": "", "name": "Factor de Potencia", "datatype ":" uint16 "},
{"bus_datatype": 14, "address": 51, "value_nan": [65472,0], "type": "register", "units": "Hz", "name": "Frequency", "datatype" : "uint16"}
]
}


RE: modbus register floating points - admin - 08.03.2019

First, you should find out correct address and byte/word order. You can do this via RTU read test in Modbus tab. Use function #4 (Input register), set address to 0 (if this does not work, try 1). Then try all read swap options until you get a valid reading.