Logic Machine Forum
Modbus RTU doesnt will work fine - 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 RTU doesnt will work fine (/showthread.php?tid=3618)



Modbus RTU doesnt will work fine - Dré - 14.10.2021

Hi,

I have a ABB B21 energy meter. I was trying to read it with my LM.
I can find it with the RTU scan.
I was trying to make a Json script, but all see are the same values, and if i look at the energy meter i dont see this value.
the value i see is -327.680.
I dont know how to find the problem.
I check the settings of the modbus, like baudrate [115200], parity [Even], dublex [Half-dublex].


I was tasting with script code of this
Code:
{
  "product_code": "ABB_B21",
  "mapping": [
    {
      "bus_datatype": 14,
      "address": 5000,
      "value_nan": [
        65472,
        0
      ],
      "type": "register",
      "units": "kWh",
      "name": "Active import",
      "datatype": "float16"
    },
    {
      "bus_datatype": 14,
      "address": 5004,
      "value_nan": [
        65472,
        0
      ],
      "type": "register",
      "units": "kWh",
      "name": "Active export",
      "datatype": "float16"
    },
    {
      "bus_datatype": 14,
      "address": 5008,
      "value_nan": [
        65472,
        0
      ],
      "type": "register",
      "units": "kWh",
      "name": "Active Net",
      "datatype": "float16"
    },
      {
      "bus_datatype": 14,
      "address": 5009,
      "value_nan": [
        65472,
        0
      ],
      "type": "register",
      "units": "Kvarh",
      "name": "Reactive Import",
      "datatype": "float16"
    },
     {
      "bus_datatype": 14,
      "address": 5010,
      "value_nan": [
        65472,
        0
      ],
      "type": "register",
      "units": "Kvarh",
      "name": "Reactive Export",
      "datatype": "float16"
    },
     {
      "bus_datatype": 14,
      "address": 5014,
      "value_nan": [
        65472,
        0
      ],
      "type": "register",
      "units": "Kvarh",
      "name": "Reactive Net",
      "datatype": "float16"
    },
         {
      "bus_datatype": 14,
      "address": 5018,
      "value_nan": [
        65472,
        0
      ],
      "type": "register",
      "units": "Kvarh",
      "name": "Apparent Import",
      "datatype": "float16"
    },      
     {
      "bus_datatype": 14,
      "address": 5019,
      "value_nan": [
        65472,
        0
      ],
      "type": "register",
      "units": "Kvarh",
      "name": "Apparent Export",
      "datatype": "float16"
    },
         {
      "bus_datatype": 14,
      "address": 5020,
      "value_nan": [
        65472,
        0
      ],
      "type": "register",
      "units": "Kvarh",
      "name": "Apparent Net",
      "datatype": "float16"
    },     
     {
      "bus_datatype": 14,
      "address": 5024,
      "value_nan": [
        65472,
        0
      ],
      "type": "register",
      "units": "kg",
      "name": "Active Import CO2",
      "datatype": "float16"
    },
         {
      "bus_datatype": 14,
      "address": 5034,
      "value_nan": [
        65472,
        0
      ],
      "type": "register",
      "units": "currency",
      "name": "Active Import Currency",
      "datatype": "float16"
     }
    ],
  "manufacturer": "ABB",
  "name": "B21",
  "product_range": "PM",
  "description": "Power Meter P21 1 fase"
}

and im not sure about the the adress: 5000
at the manual of the energy meter it says
Start reg (Hex) adress 5000

do i use 5000 for the script above or do i need to convert it to decimal and is it 20480, if not how do i need to convert adres 5B00 to LM address?
* i also tried address 20480 with the read test in the LM.


manual ABB B21


RE: Modbus RTU doesnt will work fine - Daniel - 14.10.2021

Use decimal and datatype should be uin64 or int64 depend of the type. You may need to subtract 1 from the address. Always make it work with test read before making the profile.


RE: Modbus RTU doesnt will work fine - admin - 14.10.2021

You also need to remove "value_nan" fields and add "value_multiplier": 0.01 (or a different value for certain registers, check the documentation).


RE: Modbus RTU doesnt will work fine - Kilogica - 20.10.2021

Also check what version of B21 you have,

I think there are three of them: steel, silver and gold.

The only difference is the lack of some parameters, so it is possible that you're reading something that is not there.


RE: Modbus RTU doesnt will work fine - Dré - 12.12.2021

Sorry for late reaction, thanks all it is working with all of your inputs