DLMS/COSEM

DLMS/COSEM

DLMS COSEM communication protocol

Supported device types and versions


This protocol implements serial communication with the devices (energy & water metering) according to the DLMS/COSEM standard. It can use binary HDLC protocol, the TCP/UDP Wrapper (used for communication via TCP/IP), or the Gateway protocol. Gateway protocol is used if there is a so-called Gateway device between the SCADA system and the device. The Gateway is a device connected to a network with a SCADA system and to one/more networks with energy meters (it does not have to be an Ethernet network, but e.g. RS-485 or power lines).

Two modes of addressing I/O tags are supported:

  • "Short Name (SN) referencing" using 16-bit object addresses

  • "Logical Name (LN) referencing" using 6-byte OBIS codes

Communication was tested with the following devices:

  • EMH LZQJ (SN referencing)

  • Landis ZMD400 (SN referencing)

  • Iskraemeco Iskra MT880-M (LN referencing)

  • ADDAX NP73E.2-18-1 (LN referencing)

  • Iskraemeco AC750-G3C2 gateway  + Iskraemeco AM550-ED1.11, AM550-TD2.12 electrometers (LN referencing, Gateway mode)

  • Iskraemeco AC750-G3C2 gateway + Iskraemeco AM550-ED1.11, AM550-TD2.12 electrometers (LN referencing, Wrapper mode, IPv6 communication)

The protocol supports time synchronization, the period is configured in the station configuration dialog.

Communication line configuration


Station configuration


  • Communication protocol "DLMS/COSEM".

The station address (DLMS Server HDLC/MAC Address) consists of two parts: Upper MAC Address and Lower MAC Address. Each of them is in the range from 0 to 16383 (3FFFH).

Station address
Station address

As per a specification, DLMS UA 1000-2 Ed. 7.0 (Green Book) represents:

  • Upper MAC Address is used for Logical Device addressing, i.e. separately addressable entity within the physical device.

  • Lower MAC Address is used for Physical Device addressing, i.e. multi-drop address on the line.

Upper MAC Address is required. An implicit value, which is set when the station address is missing, is a reserved address Upper MAC Address = 1 (Management Logical Device).

In ordinary situations, when the physical device is identical with the logical one (one physical device = one logical device), this address does not need to be changed. If the physical device integrates more logical devices, you should monitor content or "0-0:41.0.0" register of "SAP assignment" class (class_id=17, attribute 2 "SAP_assignment_list") in the "DLMS SN Object List" dialog box. This dialog box shows the list of logical devices that are integrated in a physical one.

List of logical devices
List of logical devices

This is the example of a value representation of the "SAP_assignment_list" attribute of the "SAP assignment" class in the device which contains one logical device with Upper MAC Address 16.
See also the protocol parameter "Client MAC address" and a document "DLMS UA 1000-2 Ed. 7.0", chapter 8.4.2.3 "Reserved special HDLC addresses".

Note: for Iskraemec Iskra MT880, Upper MAC Address = 1, Lower MAC Address = 16 + last two digits of the serial number (if, for example, the serial number is 72211943, then Lower MAC Address = 16 + 43 = 59).

Note: since the station address is DLMS Server HDLC/MAC Address, it is only used when the protocol parameter "Opening mode" is set to "Direct HDLC" or "IEC Mode E" .

Station parameters


Communication station configuration dialog box - Protocol parameters tab.
They influences some optional protocol parameters. The following station protocol parameters can be set:

Table 1

Mode
(Opening Mode)

Opening mode of connection with the device and a used link protocol.

If the device is configured so that it directly uses DLMS/COSEM protocol on the given interface, set this parameter to "Direct HDLC".

Mostly (e.g. when reading through IR optical interface by an optical reading head) you must open the connection in IEC protocol in so-called "mode E" and then transfer to HDLC binary protocol (i.e. DLMS/COSEM).

"IEC mode E", according to the specification of IEC protocol, uses the following settings of the transmission parameters:

  • baud rate 300 Baud,

  • 7 data bits,

  • even parity,

  • 1 stop bit.

If "Opening Mode" is set to "IEC mode E", the above-mentioned transmission parameters must be set. As for the Serial communication line, the parameters must be set in the line parameters "Mode 1". See the protocol parameter "Software 7E1".

The setting of the baud rate to 300 Baud is usually not required when using the line of the MODEM category. A so-called DTE speed is used between a PC and a modem. If this speed is higher than 300 Baud, you have to activate the "handshaking" parameter on RTS/CTS in proper line mode.

If the parameter value is set to "Direct HDLC", a dynamic change of transmission parameters is not expected. You can use any Serial line mode and set it by the "Line mode" parameter on the station.

More information is mentioned in IEC 62056-21, Electricity metering - Data exchange for meter reading, tariff and load control - Part 21: Direct local data exchange, Annex E: "METERING HDLC protocol using protocol mode E for direct local data exchange".

See also chapter "Setting of transmission parameters".

The "UDP Pure" mode is used by some devices when communicating over UDP. Each DLMS/COSEM data packet (challenge/response) is in a separate UDP packet. In the case of TCP, this is problematic (without parsing it is not possible to determine what the size of the DLMS/COSEM data packet is) so the DLMS/COSEM standard defines the use of an envelope - called a Wrapper - for TCP/UDP mode (see next paragraph).

The "TCP/UDP Wrapper" mode is used when communicating over TCP or UDP. An 8-byte header (Version, Wrapper Source Port, Wrapper Destination Port, and Length fields) is added to the DLMS/COSEM data.


The "TCP/UDP Wrapper + Gateway protocol" and "Gateway protocol" modes are used when communicating over TCP or UDP through a so-called Gateway device. A prefix is added to the DLMS/COSEM data (single-byte fields Header, Device Network ID, Address Length, and variable-length field Device Address). Based on the Device Network ID and Device Address, the Gateway can distinguish which target device to route the request to. The device response is routed to the D2000 kOM process, and the prefix this time contains its identification (My Network ID, My Address).
In addition, in the "TCP/UDP Wrapper + Gateway protocol" mode, the same header as in the "TCP/UDP Wrapper" mode is added. When using UDP, some devices may omit the header, similar to the "UDP Pure" mode.

Direct HDLC
IEC mode E
UDP Pure
TCP/UDP Wrapper
TCP/UDP Wrapper + Gateway protocol
Gateway protocol

Direct HDLC

--- DLMS/HDLC parameters ---

Application Context

The setting of the "Application Context" parameter of the DLMS/COSEM protocol.
Short_Name_Referencing_No_Ciphering context is supported for "Short Name (SN) referencing". Logical_Name_Referencing_No_Ciphering context is supported for "Logical Name (LN) referencing".
The next two contexts with encryption are not supported.

Logical_Name_Referencing_No_Ciphering
Short_Name_Referencing_No_Ciphering
Logical_Name_Referencing_With_Ciphering
Short_Name_Referencing_With_Ciphering

Short_Name_Referencing_No_Ciphering