Logic Machine Forum
8Byte Modbus Herholdt Controls ECS - 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: 8Byte Modbus Herholdt Controls ECS (/showthread.php?tid=3396)



8Byte Modbus Herholdt Controls ECS - BidiCH - 01.06.2021

Hello everybody

I've been trying to read out an Optec energy meter (Heroldt Controls ECS) using Modbus for a while. 
In principle, this also works without any problems. However, it does not work properly with the 8byte objects. 

In the code excerpt you can see it in the addresses 4322 and 4326. 
In the manual page 6, point 3.4.4. Reading a 8 bytes value listed as it should work. Unfortunately I don't know what to do next.
How do you have to do this conversion in the profile? Can this conversion be calculated directly in a Modbus profile?
Thank you Bidi

.pdf   Optec_Built_in_ModbusProtocolM1PROM3PRO-Technicaldescription.pdf (Size: 1.32 MB / Downloads: 6)

Code:
{
    "product_code": "M3PRO",
    "manufacturer": "Optec (Herholdt Controls)",
    "name": "M3PRO reduziert",
      "product_range": "Energiezähler",
      "description": "Energiezähler M3PRO",
      "mapping": [   
        { "bus_datatype": 14, "datatype": "float32", "read_swap": "bw","address": 4152, "type": "register", "units": "kW","name": "Wirkleistung L1"},
        { "bus_datatype": 14, "datatype": "float64", "read_swap": "bw","address": 4322, "type": "register", "units": "kWh","name": "Wirkenergie Bezug T1+T2 total"},
        { "bus_datatype": 14, "datatype": "float64", "read_swap": "bw","address": 4326, "type": "register", "units": "kWh","name": "Wirkenergie Lieferung T1+T2 total"}
        ]
}



RE: 8Byte Modbus Herholdt Controls ECS - admin - 01.06.2021

The documentation states that for 8-byte registers it still uses float32. Use "Read test" to check if 4322 and 4326 can be read by reading only the first 4 bytes (float32). If not then the profile should use block read to read 8 bytes and then use only the first 4 bytes.


RE: 8Byte Modbus Herholdt Controls ECS - BidiCH - 01.06.2021

(01.06.2021, 06:35)admin Wrote: The documentation states that for 8-byte registers it still uses float32. Use "Read test" to check if 4322 and 4326 can be read by reading only the first 4 bytes (float32). If not then the profile should use block read to read 8 bytes and then use only the first 4 bytes.

many thanks for your response!

Yes, that works so far but unfortunately I don't get any decimal places for certain values. 
In the attachment I am sending you a comparison between a small value (12.188kWh) and a large value (3248.00 kWh). 
Here I cannot understand why I no longer receive any decimal places. I'm currently using the following snippet of code for these two values

Code:
{ "bus_datatype": 14, "datatype": "float32", "read_swap": "bw","address": 4320, "type": "register", "units": "kWh","name": "Wirkenergie Bezug T1+T2 total"},
{ "bus_datatype": 14, "datatype": "float32", "read_swap": "bw","address": 4324, "type": "register", "units": "kWh","name": "Wirkenergie Lieferung T1+T2 total"},
   

do you have an idea here was the problem its lead?


RE: 8Byte Modbus Herholdt Controls ECS - admin - 02.06.2021

This is exactly what the meter returns as LM does not perform any extra data conversion for floating point values. The meter also has integer mode but in this case conversion is more complicated and you will need a script for every 8 byte value.