IEC 62056-21 protocol driver

The IEC 62056-21 is a standard for communication with energy metering devices. It is used mainly for readouts of electrical energy meter data. In this Mervis IDE version is supported the substandard which communicates using modes A, B or C with OBIS (OBject Identification System) addressing code (groups A-B:C.D.E*F) over a serial line.

  • Process stations with Mervis RT containing a serial interface.
  • Serial RS485 / RS232
  • In the IEC 62056-21 implementation supported in this Mervis IDE version there is no service writing into the meters This means that only establishing of the communication, baud rate setting, and value readouts are supported.
  • Communication modes E and F are not supported.

To communicate over the IEC 62056-21 protocol, the meter address must be known (defined by the meter manufacturer, usually same as the meter serial number), parameters of the serial line (mostly default settings 9600/7/E/1) and OBIS value codes, supported by the meter.

Client communication channel

When defining the IEC 62056-21 communication channel, the following parameters shall be set:

  • Link protocol - in this version is supported only Serial
  • Read timeout - how long the communication driver waits for the response from the meter to come
  • Byte timeout -  how long the communication driver waits between the individual bytes of the response

Serial line parameters

  • Port number - COM port number of the PLC, a RS232 or RS485 port.
  • Baud Rate - initial communication speed in bit/s, this is how the driver strats communication with the meter. If the meter does not support baud rate change, this baud rate is also used for further communication.
  • Data Bits - number of data bits in a byte.
  • Parity - select communication parity here - None, Odd, or Even.
  • Stop bits - number of stop bits to indicate end of the transmitted byte.


  • Address - meter address, usually its serial number: consult the meter supplier please
  • Baud rate - if the meter supports baud rate change, this is the baud rate the driver tries to negotiate

Communication group

  • The meter is edited in the device editor. The communication group defines variables which are communicated together in a single telegram. This Mervis IDE versions only support readout of a single group. There is no direct limitation of number of datapoints in a group.

Data point

  • The data points are edited in the device editor. The definition of variables is similar to this at other generic device types, see Creating of HW variables and communication channels.
  • The data point must have defined following information:
    • Value address - OBIS code formatted A-B:C.D.E*F; most of the values is coded just C.D.E
    • Value order - default is 0, the first value is read; enables e.g. reading of time stamp at historical values (e.g. from a response 1.6.1 (00.000*kW) (0002040400) enter value order of 0 to read 00.000; or enter value order of 1 to read 002040400).
  • © Energocentrum Plus, s.r.o. 2017 - 2024