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 whether you accept or reject these cookies being set.

8Byte Modbus Herholdt Controls ECS
#1
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


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"}
        ]
}
Reply
#2
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.
Reply
#3
(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?
Reply
#4
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.
Reply


Forum Jump: