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 that you accept these cookies being set.

Modbus RTU doesnt will work fine
#1
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
Reply
#2
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.
------------------------------
Ctrl+F5
Reply
#3
You also need to remove "value_nan" fields and add "value_multiplier": 0.01 (or a different value for certain registers, check the documentation).
Reply
#4
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.
Reply
#5
Sorry for late reaction, thanks all it is working with all of your inputs
Reply


Forum Jump: