DLMS/COSEM
DLMS COSEM communication protocol
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.
Supported line categories: Serial, SerialOverUDP Device Redundant, TCP/IP-TCP, TCP/IP-TCP Redundant, MOXA IP Serial Library, RFC2217 Client, MODEM.
For TCP/UDP communication using TCP/UDP Wrapper, TCP/UDP ports 4059 are reserved.
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).
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.
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" .
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 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:
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.
| Direct HDLC | Direct HDLC |
--- DLMS/HDLC parameters --- | |||
Application Context | The setting of the "Application Context" parameter of the DLMS/COSEM protocol. | Logical_Name_Referencing_No_Ciphering | Short_Name_Referencing_No_Ciphering |