INDEX

LKM Series MODBUS RTU to IEC62056-21 Protocol Meter Gateway User Manual

1. About LKM Series MODBUS RTU to IEC62056-21 Protocol Meter Gateway

LKM Series Modbus RTU to IEC62056-21 Protocol Gateway are designed to be used with electricity meters that communicate in IEC62056-21 standard. The meters that support IEC62056-21 standard has read out tables that has several data such as import energy, export energy, phase voltages and currents. LKM Series Modbus RTU to IEC62056-21 Protocol Gateway automatically reads those values and maps to Modbus registers. Field devices or software systems can easily read data over Modbus RTU protocol so that energy meter reading can easily be integrated to field automation or monitoring systems without need of IEC6056-21 protocol implementation.

LKM series can read meters with auto baud changes or fixed baud rates and supports up to 10 meters on RS485 bus.

LKM614 is especially designed for EMH LZQJ-XC meters and it is direct replacement for Variomod XC modules.

2. Hardware Features

LKM Series Modbus RTU to IEC62056-21 Protocol Gateway has 2-way communication. One side connected directly or via optical probe to read electricity meter with IEC62056-21 protocol, other side can be connected to a field device such as PLC or RTU or serial device server connected to an automation software system that can read Modbus RTU devices. 

There are standalone versions and also plug and play version for EMH LZQJ-XC meters.

2.1 Features – Standalone Version

  • Auto reads Electricity meters that communicates in IEC62056-21 standard and maps in predefined MODBUS register table
  • Supports Up to 10 meters reading on RS485 Bus
  • User defined initialization string can be sent before IEC62056-21 Mode C reading
  • Configurable Modbus address via Modbus Commands 
  • Configurable Reading Period on IEC6056-21 side via Modbus Commands
  • Configurable Reading Table Number on IEC6056-21 side via Modbus Commands 
  • Wide range power input: 5V – 25V DC
  • Wide operating temperature range from -40 to 85 °C 
  • Very Small form factor, only 2.1 x 4.2 x 4.4cm
  • ABS, IP40 housing
  • Customization of reading process and register tables based on client request
  • Firmware upgradable over serial line

2.2 Features – Plug and Play Version

  • Especially plug and play designed for EMH LXQJ-XC meters
  • Direct replacement for Variomod XC modules for EMH meters
  • Auto reads EMH meters and maps values in predefined MODBUS register table
  • Configurable Modbus address via Modbus Commands
  • Configurable Reading Period on IEC6056-21 side via Modbus Commands
  • Configurable Reading Table Number on IEC6056-21 side via Modbus Commands
  • Gets power directly from meter
  • Serial interface directly connected to meter ( with 15kV ESD protection)
  • Wide operating temperature range from -40 to 85 °C
  • Customization of reading process and register tables based on client request
  • Firmware upgradable over serial line

3. Installation

LKM Series Modbus RTU to IEC62056-21 Protocol Gateway has very small form factor.

Standalone versions are only 2.1 x 4.2 x 4.4cm. Thus, it can be acted as part of cable and no need special mounting. Simply connect cables and use as a part of cable.

Plug and Play version can directly fit into EMH LZQJ-XC meter. It is direct replacement for Variomod XC modules. Simply plug in LKM614 into meter.

4. Panel Descriptions and Pin Mappings

4.1 Modem Side: LKM141

  1. DB9 Male connector for RS232: Only Tx-Rx-GND for data transmission.
Pin Number Description
1 Not Used
2 Rx
3 Tx
4 Not Used
5 GND
6 Not Used
7 Not Used
8 Not Used
9 Not Used

 

4.2 Modem Side: LKM144

  1. Terminal Connector for 2 wire RS485 connection and GND. 
Pin Number Description
1 GND
2 A
3 B

4.3 Modem Side: LKM614

 

1. Operation Mode Selection Switch

 

Pin Positions (1-2) LED Status Modem Side Communication Data Type Meter Side Communication
OFF-OFF Mode 1 LED ON 19200 8N1 Starts with 300 baud rate and changes during transmission to target baud rate based on IEC62056-21 protocol
ON-OFF Mode 2 LED ON 9600 8N1 Starts with 300 baud rate and changes during transmission to target baud rate based on IEC62056-21 protocol
OFF-ON Mode 3 LED ON 19200 8N1 19200 7E1 Fixed
ON-ON Mode 4 LED ON 9600 8N1  9600 7E1 Fixed

 

 

NOTE:  After changing operating mode of device, device must be repowered to apply new setting. Which means device must be plugged out of the device and plugged in back again.

 

2.  Terminal Connector for 2 wire RS485 connection and GND.

 

Pin Number Description
1 A
2 B
3 GND

 

4.4 Meter Side: LKM141 & LKM144

  1. Terminal Connector for 2 wire RS485 connection and GND. Terminal also has external power input pins. 

 

Pin Number Description
1

Input Power +

(5V - 25V DC)

2

Input Power -

GND

3 GND
4 A
5 B

 

NOTE:  Power Input has polarity protection. Yet again please check polarity when connecting multiple devices in same power source, otherwise device may burn due to worng connection of power.

 

4.5 Other Side: LKM141

  1. Operation Mode Selection Switch
Pin Positions (1-2) LED Status Modem Side Communication Data Type Meter Side Communication
OFF-OFF  Mode 1 LED ON 19200 8N1 Starts with 300 baud rate and changes during transmission to target baud rate based on IEC62056-21 protocol
OFF-ON Mode 2 LED ON 9600 8N1 Starts with 300 baud rate and changes during transmission to target baud rate based on IEC62056-21 protocol
ON-OFF Mode 3 LED ON 19200 8N1 19200 7E1 Fixed
ON-ON Mode 4 LED ON 9600 8N1 9600 7E1 Fixed

 

NOTE:  After changing operating mode of device, device must be repowered to apply new setting.

 

2. Power ON/OFF Switch

 

Switch Position Description
1 Power Off Device
2 Power On Device

4.6 Other Side: LKM144

 

1. Operation Mode Selection Switch

 

Pin Positions (1-2) LED Status Modem Side Communication Data Type Meter Side Communication
OFF-OFF Mode 1 LED ON 19200 8N1 Starts with 300 baud rate and changes during transmission to target baud rate based on IEC62056-21 protocol
ON-OFF Mode 2 LED ON 9600 8N1 Starts with 300 baud rate and changes during transmission to target baud rate based on IEC62056-21 protocol
OFF-ON Mode 3 LED ON 19200 8N1  19200 7E1 Fixed
ON-ON  Mode 4 LED ON 9600 8N1 9600 7E1 Fixed

 

NOTE:  After changing operating mode of device, device must be repowered to apply new setting.

 

 

4.7 Top Side: LKM141 & LKM144

 

 

LED Number Description
1 Mode 1 LED
2 Mode 2 LED
3 Mode 3 LED
4 Mode 4 LED
5 System LED: Blinks every second
6 Tx LED: Sending data from Modem Side to Meter Side
7 Rx LED: Receiving data from Meter Side to Modem Side

4.8 Top Side: LKM614

LED Number Description
1 Mode 4 LED
2 Mode 3 LED
3 Mode 2 LED
4 Mode 1 LED
5 System LED: Blinks every second
6 Rx LED: Receiving data from Meter
7 Tx LED: Sending data to Meter

 

 

5. Usage Scenarios and Connection Diagrams

LKM Series Modbus RTU to IEC62056-21 Protocol Gateways can be used in different scenarios. Usages are not limited to that examples and user may create their own usage scenario.

LKM Series Modbus RTU to IEC62056-21 Protocol Gateways standalone versions support up to 10 meters reading on RS485 Bus.

5.1 LKM Connected to Meter via Direct Cable and to Remote Server over TCP/IP

LKM Series Modbus RTU to IEC62056-21 Protocol Gateway can be connected to RS485 serial line of meter and can operate in fixed baud rate mode. Other side of device can be connected to remote Data Acquisition Server via TCP/IP device that can convert Modbus TCP to Modbus RTU.

 

 

 

5.2 LKM Connected to Meter via Optical Probe and to Remote Server over TCP/IP

LKM Series Modbus RTU to IEC62056-21 Protocol Gateway can be connected to optical probe of meter via REDZ KMK series optical probes and can operate in changing baud rate mode. Other side of device can be connected to remote Data Acquisition Server via TCP/IP device that can convert Modbus TCP to Modbus RTU.

 

 

5.3 LKM Connected to Meter via Direct Cable and to Remote Server over Direct Cable

LKM Series Modbus RTU to IEC62056-21 Protocol Gateway can be connected to RS485 serial line of meter and can operate in fixed baud rate mode. Other side of device can be connected to Data Acquisition Server via Cable connection as well and server can read data with Modbus RTU protocol.

 

 

5.4 LKM Connected to Meter via Direct Cable and to Remote Server over Field Device

LKM Series Modbus RTU to IEC62056-21 Protocol Gateway can be connected to RS485 serial line of meter and can operate in fixed baud rate mode. Other side of device can be connected to a field device such as PLC or RTU and that device can read data with Modbus RTU protocol.

5.5 LKM614 Connected Directly to EMH LZQJ-XC Meter

LKM614 Modbus RTU to IEC62056-21 Protocol Gateway is especially designed for EMH LZQJ-XC meters and it is direct replacement for Variomod XC modules. LKM614 can be connected to EMH LZQJ-SC meter in fixed baud rate or auto baud rate mode based on meter settings. Other side of device can be connected to a field device such as PLC or RTU and that device can read data with Modbus RTU protocol. That Device can also be connected to REDZ CKL series Modbus TCP – RTU Converter to read Modbus values over LAN or WAN.

6. IEC62056-21 and MODBUS Definitions

LKM Series Modbus RTU to IEC62056-21 Protocol Gateway’s one side should be connected directly or via optical probe to read electricity meter with IEC62056-21 protocol and other side should be connected to a field device such as PLC or RTU or serial device server connected to an automation software system that can read Modbus RTU devices. 

6.1 Modbus Data Registers Table: Version 1

LKM Series Modbus RTU to IEC62056-21 Protocol Gateway reads the data table of IEC62056-21 meter and maps the data in following Modbus Registers:

Register Number OBIS Code Search String Register Name Modbus Address (Dec) Modbus Address (Hex) Data Type
1 0.9.1 “0.9.1” Time 1 0x01 Unsigned Long (UInt32)
2 0.9.2 “0.9.2” Date 3 0x03 Unsigned Long (UInt32)
3 1.8.0 "1.8.0" Total active energy import A+ 5 0x05 Unsigned Long (UInt32)
4 2.8.0 "2.8.0" Total active energy export A- 7 0x07 Unsigned Long (UInt32)
5 3.8.0 "3.8.0" Total reactive energy R+ 9 0x09 Unsigned Long (UInt32)
6 4.8.0 "4.8.0" Total reactive energy R- 11 0x0B Unsigned Long (UInt32)
7 5.8.0 "5.8.0" Total reactive inductive energy import (Ri+) Q1 13 0x0D Unsigned Long (UInt32)
8 6.8.0 "6.8.0" Total reactive capacitive energy import (Rc+) Q2 15 0x0F Unsigned Long (UInt32)
9 7.8.0 "7.8.0" Total reactive inductive energy export (Ri-) Q3 17 0x11 Unsigned Long (UInt32)
10 8.8.0 "8.8.0" Total reactive capacitive energy export (Rc-)  Q4 19 0x13 Unsigned Long (UInt32)
11 1.6.0 "1.6.0" Total maximal average import power P+max 21 0x15 Unsigned Long (UInt32)
12 2.6.0 "2.6.0" Total maximal average exportpower P-max 23 0x17 Unsigned Long (UInt32)
13 1.5.0 "1.5.0" Total average import power P+max (last period value) 25 0x19 Unsigned Long (UInt32)
14 1.7.0 "1.7.0" Total instantaneous value power P+ 27 0x1B Unsigned Long (UInt32)
15 31.7 “31.7” L1 Current ; instantaneous value 29 0x1D Unsigned Long (UInt32)
16 51.7 “51.7” L2 Current ; instantaneous value 31 0x1F Unsigned Long (UInt32)
17 71.7 “71.7” L3 Current ; instantaneous value 33 0x21 Unsigned Long (UInt32)
18 32.7 “32.7” L1 Voltage; instantaneous value 35 0x23 Unsigned Long (UInt32)
19 52.7 “52.7” L2 Voltage; instantaneous value 37 0x25 Unsigned Long (UInt32)
20 72.7 “72.7” L3 Voltage; instantaneous value 39 0x27 Unsigned Long (UInt32)
21 13.7 “13.7” Power factor 41 0x29 Unsigned Long (UInt32)
22 14.7 “14.7” Frequency 43 0x2B Unsigned Long (UInt32)
23 C.1.0 “C.1.0” Meter number / meter ID 45 0x2D Unsigned Long (UInt32)
24 C.7.0 “C.7.0” Event power down - counter 47 0x2F Unsigned Long (UInt32)

 

The search strings are defined in firmware of device and can be customized based on customer’s project. LKM Series Modbus RTU to IEC62056-21 Protocol Gateway reads the read-out table (table number can be configured by user with Modbus command. See relevant section to configure) of IEC62056-21 meter and searches the strings and maps the values of first occurrence to Modbus register address. If the data is unavailable LKM Series Modbus RTU to IEC62056-21 Protocol Gateway stores zero “0”. 

 

 

6.2 Modbus Data Registers Table: Version 2

LKM Series Modbus RTU to IEC62056-21 Protocol Gateway alternatively reads the data table of IEC62056-21 meter and maps the data in following Modbus Registers:

NOTE:  Alternatives of that table are available based on client request.

 

Register Number OBIS Code Search String Register Name Modbus Address (Dec) Modbus Address (Hex) Data Type
1 0.9.1 “0.9.1” Time 1 0x01 Unsigned Long (UInt32)
2 0.9.2 “0.9.2” Date 3 0x03 Unsigned Long (UInt32)
3 1.8.0 "1.8.0" Total active energy import A+ 5 0x05 Unsigned Long (UInt32)
4 2.8.0 "2.8.0" Total active energy export A- 7 0x07 Unsigned Long (UInt32)
5 3.8.0 "3.8.0" Total reactive energy R+ 9 0x09 Unsigned Long (UInt32)
6 4.8.0 "4.8.0" Total reactive energy R- 11 0x0B Unsigned Long (UInt32)
7 5.8.0 "5.8.0" Total reactive inductive energy import (Ri+) Q1 13 0x0D Unsigned Long (UInt32)
8 6.8.0 "6.8.0" Total reactive capacitive energy import (Rc+) Q2 15 0x0F Unsigned Long (UInt32)
9 7.8.0 "7.8.0" Total reactive inductive energy export (Ri-) Q3 17 0x11 Unsigned Long (UInt32)
10 8.8.0 "8.8.0" Total reactive capacitive energy export (Rc-) Q4 19 0x13 Unsigned Long (UInt32)
11 1.6.0 "1.6.0" Total maximal average import power P+max 21 0x15 Unsigned Long (UInt32)
12 2.6.0 "2.6.0" Total maximal average exportpower P-max 23 0x17 Unsigned Long (UInt32)
13 1.25 "1.25" Total Active import power P+ ; instantaneous value 25 0x19 Unsigned Long (UInt32)
14 2.25 "2.25" Total Active export power P- ; instantaneous value 27 0x1B Unsigned Long (UInt32)
15 31.25 "31.25" L1 Active import power P+ ; instantaneous value 29 0x1D Unsigned Long (UInt32)
16 51.25 "51.25" L2 Active import power P+; instantaneous value 31 0x1F Unsigned Long (UInt32)
17 71.25 "71.25" L3 Active import power P+; instantaneous value 33 0x21 Unsigned Long (UInt32)
18 32.25 "32.25" L1 Active export power P-; instantaneous value 35 0x23 Unsigned Long (UInt32)
19 52.25 "52.25" L2 Active export power P-; instantaneous value 37 0x25 Unsigned Long (UInt32)
20 72.25 "72.25" L3 Active export power P-; instantaneous value 39 0x27 Unsigned Long (UInt32)
21 13.25 "13.25" Power factor 41 0x29 Unsigned Long (UInt32)
22 14.25 "14.25" Frequency 43 0x2B Unsigned Long (UInt32)
23 C.86.0 "C.86.0" Error Code 45 0x2D Unsigned Long (UInt32)
24 C.86.1 "C.86.1" Meter number / meter ID 47 0x2f Unsigned Long (UInt32)

 

The search strings are defined in firmware of device and can be customized based on customer’s project. LKM Series Modbus RTU to IEC62056-21 Protocol Gateway reads the read-out table (table number can be configured by user with Modbus command. See relevant section to configure) of IEC62056-21 meter and searches the strings and maps the values of first occurrence to Modbus register address. If the data is unavailable LKM Series Modbus RTU to IEC62056-21 Protocol Gateway stores zero “0”. 

 

NOTE:  LKM Standalone version can read up to 10 meters in RS485 bus. Search strings will be same for all meters in same bus.

 

6.3 Modbus Data Registers Table: Version 3

LKM Series Modbus RTU to IEC62056-21 Protocol Gateway can have any different combination of OBIS value list. Just contact our company for update on obis codes and your version of list will be shared as a firmware file in few hours. That firmware can be uploaded to the device in an instant.

6.4 Modbus Data Registers Table: Reading with Modbus Commands

LKM Series Modbus RTU to IEC62056-21 Protocol Gateway meter data can be read by Holding Register command (Function Code 3). Values can be queried individually or as array.

 

Read Holding Registers (Function Code=3)

Request

This command is requesting the content of meter data holding registers # 40006 to 40013 from the LKM Series Modbus RTU to IEC62056-21 Protocol Gateway with address 1.

01 03 0005 0008 540D

01: The Slave Address (01 hex = address 1 )

03: The Function Code 3 (read IEC62056-21 read-out mapped data)

0005: The Data Address of the first register requested. 

(0005 hex = 5 , + 40001 offset = input #40006 )

 

NOTE:  This example shows reading of 1 meter in RS485 bus. If there are more then 1 meter in bus ( LKM can read up to 10 meters in same RS485 bus) then address will be simply incremented by decimal 256

same data addresse example for other meters:

2nd meter : 0105

3th meter : 0205

....

10th meter: 0905

All meters can be read by field Modbus RTU master device simultaneoulsy by different registers.

 

0008: The total number of registers requested. (read 8 registers for 4 values since each value is 32byte, 40005 to 40013)  

540D: The CRC (cyclic redundancy check) for error checking.

Response

01 03 10 0000 0000 0000 0000 0000 0000 0000 0000 E459

 

01: The Slave Address (01 hex = address 1)

03: The Function Code 3 (read IEC62056-21 read-out mapped data)

10: The number of data bytes to follow (4 registers x 4 bytes each = 16 bytes)

0000 0000: The contents of register #40006

0000 0000: The contents of register #40008

0000 0000: The contents of register #40010

0000 0000: The contents of register #40012

E19A: The CRC (cyclic redundancy check).

 

Example 1

if read-out data has following line

1-1:1.8.0(000000.03*MWh)

Read out value is stored at address 0x05 as per Modbus Address Table:

1.8.0 "1.8.0" Total active energy import A+ 5 0x05 Unsigned Long (UInt32)

The read data will be “3” and user should implement the coefficient to show value properly with or without comma.

Example 2

if read-out data has following line

5.8.0(17.244*MVarh)

Read out value is stored at address 0x0D as per Modbus Address Table:

5.8.0 "5.8.0" Total reactive inductive energy import (Ri+) Q1 13 0x0D Unsigned Long (UInt32)

The read data will be “17244” and user should implement the coefficient to show value properly with or without comma.

 

6.5 Read Data Settings Table

LKM Series Modbus RTU to IEC62056-21 Protocol Gateway reads the data table of IEC62056-21 meter and following settings can be read or altered:

 

 

Register Number Definition Explanation Modbus Address (Decimal) Modbus Address (Hexadecimal) Data Type
1 Modbus Address LKM Series Modbus RTU to IEC62056-21 Protocol Gateway Modbus Device Address for Communication. Default Address is 0x01 128 0x80 Unsigned Integer (UInt16)
2 Period (in seconds) Defines duration in seconds after successfully reading of IEC62056-21 Meter. This duration is also valid for waiting after failed reading attempt. Default value is 10 seconds. 129 0x81 Unsigned Integer (UInt16)
3 Table Code (as Hex)

Different read-out tables can be read from meter and this code defines which table to read and which code should be submitted to meter during Acknowledgement/option select message Message of IEC62056-21 Standard Mode C or E:

ACK Protocol Control Character Baud Rate Identification TABLE CODE CR LF

Default value is 0x30 means ASCII “0”.

130 0x82 Unsigned Integer (UInt16)
4 Meter Reading Method

Accepts 1 byte.

There are 2 methods available currently that defines the way data read from IEC62056-21 meter and parsed

1. Method 1: Hexadecimal 0x00

LKM Series Modbus RTU to IEC62056-21 Protocol Gateway reads all data available in read-out table and stores in temporary memory which has capacity around 2,7kB. After that BCC control sequence started based on definitions of IEC62056-21 standard. If BCC control passes the reading is marked as successful and data search starts. The found values are mapped in Modbus registers and others are kept zero “0”. This method is safest since it controls BCC but should be used in shorter tables such as service tables (shorter than 2kB)

2. Method 2: Hexadecimal 0x01

LKM Series Modbus RTU to IEC62056-21 Protocol Gateway reads the read-out table and simultaneously checks each read line for the first occurrence of search strings. If a new match occurs than the found value is mapped in Modbus register as a new value. This is the default and fastest method to read for all kind of tables of IEC 62056-21 meters.

 

WARNING:  Method 1 fails in long tables which are over 2kB. It is a good idea to always try reading with Method 2 in the first implementation.

 

Default value is 0x01.

131 0x83 Unsigned Integer (UInt16)
5 Send Initialization String Quantity

This value defines how many times the initialization string will be sent before IEC62056-21 Mode C Request ( first ) message.

If this option is not used should be set to 0.

 

WARNING:  Initialization string is defined in different register. This option defines how many times it should be sent before communication start only.

 

 

132 0x84 Unsigned Integer (UInt16)
6 Read Meter Quantity

This value defines how many meters will be read in same RS485 connected to same LKM device.

Meter adress values defied in different register.

 

WARNING:  If there are more than 1 meter in same RS485 bus of LKM ( LKM supports up to 10 meters) then IEC address of the meters must be entered. Adress values are entered in different registers.

 

133 0x85 Unsigned Integer (UInt16)

 

6.6 Read Data Settings Table: Reading with Modbus Commands

 

LKM Series Modbus RTU to IEC62056-21 Protocol Gateway read data settings table can be read by Holding Register command (Function Code 0x03). Values can be queried individually or as array as shown in Modbus Data Registers reading.

 

6.7 Read Data Settings Table: Altering with Modbus Commands

 

LKM Series Modbus RTU to IEC62056-21 Protocol Gateway read data settings table values can be altered by Preset Single Register command (Function Code 6). Values can be altered one at a time only.

 

Register Number Definition Explanation Modbus Address (Decimal) Modbus Address (Hexadecimal) Data Type
1 Modbus Address

Once the command sent the device will respond with old address.

New communication continues with new address.

128 0x80 Unsigned Integer (UInt16)
2 Period (in seconds)

Accepts 1 byte.

It can be between 1 and 255

129 0x81 Unsigned Integer (UInt16)
3 Table Code (as Hex)

Accepts 1 byte.

Examples:

0x30 means ASCII ‘0’ as table number

0x37 means ASCII ‘7’ as table number

130 0x82 Unsigned Integer (UInt16)
4 Meter Reading Method

Accepts 1 byte.

There are 2 methods available currently that defines the way data read from IEC62056-21 meter and parsed

1. Method 1: Read full table and check BCC and register data

Hexadecimal 0x00

2. Method 2: Read each line of table and register data during reading

Hexadecimal 0x01

 

WARNING:  Method 1 fails in long tables which are over 2,7kB. It is a good idea to always try reading with Method 2 in the first implementation.

131 0x83 Unsigned Integer (UInt16)
5 Send Initialization String Quantity

Accepts 1 byte.

It can be between 0 and 4

132 0x84 Unsigned Integer (UInt16)
6 Read Meter Quantity

Accepts 1 byte.

It can be between 1 and 10 since the device supports up to 10 meters in same RS485 bus

133 0x85 Unsigned Integer (UInt16)

 

Preset Single Register (Function Code=06)

Request

This command changes read-out table code to ‘7’, output holding registers # 40131 of the slave device with address 1.

01 06 0082 0037 6834

 

01: The Slave Address (01 hex = address1)

06: The Function Code 6 (Preset Single Register)

0082: The Data Address of the Table Code. 

            ( 0082 hex = 130, + 40001 offset = register #40131)

0037: The value to write to register 40131, (37 hex = “7” as ASCII code)

6834: The CRC (cyclic redundancy check) for error checking.

Response

01 06 0082 0037 6834

01: The Slave Address (01 hex = address1)

06: The Function Code 6 (Preset Single Register)

0082: The Data Address of the register. (# 40131 - 40001 = 130)

0037: The value written

6834: The CRC (cyclic redundancy check) for error checking.

 

Example 1

Following code changes reading method to method 2

Meter Reading Method

There are 2 methods available currently that defines the way data read from IEC62056-21 meter and parsed

1. Method 1: Hexadecimal 0x00

2. Method 2: Hexadecimal 0x01

131 0x83 Unsigned Integer (UInt16)

 

Request

01 06 0083 0001 B9E2

Response

01 06 0083 0001 B9E2

 

6.8 Device Monitoring Parameters Table

 

LKM Series Modbus RTU to IEC62056-21 Protocol Gateway reads the data table of IEC62056-21 meter and following monitoring parameters can be read:

Register Number Definition Explanation Modbus Address (Decimal) Modbus Address (Hexadecimal) Data Type
1 IEC Device Address for 1st Meter

IEC address of the meter. If it is ‘0’, it means not used

 

NOTE:  IEC Meter Address values for all meters in RS485 bus can be altered with Preset Multiple Registers ( Function Code =16) Command in this table

 

160 0xA0 Unsigned Long (UInt32)
2 IEC Read Counter

In Reading method 1 increments 1 after successfully check BCC character and confirm

In Reading Method 2 increments 1 after reading the meter table and receiving ETX ( End of Text) character of the table

162 0xA2 Unsigned Long (UInt32)
3 Second Counter

Increments 1 every second since the device is powered up.

Device restarts after 24 hours (86400 seconds)

164 0xA4 Unsigned Long (UInt32)
4 FW Version Original

Gives device firmware info when the device is sold from stock. Includes version and build date

4 byte data example:

0x1237E301:

0x12: DAY = 18

0x3: MONTH = 3

0x7E3: YEAR = 2019

0x01: VERSION = 1

166 0xA6 Unsigned Long (UInt32)
5 FW Version Upgraded

Gives device firmware info and it differs from FW Original version if the device firmware changed in the field. Includes version and build date

 

0x1437E302:

0x12: DAY = 20

0x3: MONTH = 3

0x7E3: YEAR = 2019

0x02: VERSION = 2

168 0xA8 Unsigned Long (UInt32)
6 Initialization String

Some IEC meters may need "wake up" characters before communication starts. Initialization strings gives option to send those characters.

It allows 4 bytes and with "Send Initialization String Quantity" register, up to 16 bytes can be send to meter before IEC Read Out.

 

WAARNING:  "Send Initialization String Quantity" must be set to 1 or more in order to send Initialization Strings

 

170 0xAA Unsigned Long (UInt32)
7 IEC Device Address for Meter Number 2

IEC address of the 2nd meter in same RS485 bus. It must be different then '0'

172 0xAC Unsigned Long (UInt32)
8 IEC Device Address for Meter Number 3

IEC address of the 3th meter in same RS485 bus. It must be different then '0'

174 0xAE Unsigned Long (UInt32)
9 IEC Device Address for Meter Number 4

IEC address of the 4th meter in same RS485 bus. It must be different then '0'

176 0xB0 Unsigned Long (UInt32)
10 IEC Device Address for Meter Number 5

IEC address of the 5th meter in same RS485 bus. It must be different then '0'

178 0xB2 Unsigned Long (UInt32)
11 IEC Device Address for Meter Number 6

IEC address of the 6th meter in same RS485 bus. It must be different then '0'

180 0xB4 Unsigned Long (UInt32)
12 IEC Device Address for Meter Number 7

IEC address of the 7th meter in same RS485 bus. It must be different then '0'

182 0xB6 Unsigned Long (UInt32)
13 IEC Device Address for Meter Number 8

IEC address of the 8th meter in same RS485 bus. It must be different then '0'

184 0xB8 Unsigned Long (UInt32)
14 IEC Device Address for Meter Number 9

IEC address of the 9th meter in same RS485 bus. It must be different then '0'

186 0xBA Unsigned Long (UInt32)
15 IEC Device Address for Meter Number 10

IEC address of the 10th meter in same RS485 bus. It must be different then '0'

188 0xBC Unsigned Long (UInt32)

 

6.9 Device Monitoring Parameters Table: Reading with Modbus Commands

LKM Series Modbus RTU to IEC62056-21 Protocol Gateway device monitoring parameters table can be read by Holding Register command (Function Code 0x03). Values can be queried individually or as array as shown in Modbus Data Registers reading

Example 1

Following code read 5 registers of monitoring parameters

Request

01 03 00A0 000A C5EF 

Response

01 03 14 0000 0000 0000 0000 0000 03AD 1557 E301 0137 E406 44AA   

 

6.10 Device Monitoring Parameters Table: Change IEC Device Address with Modbus Commands

LKM Series Modbus RTU to IEC62056-21 Protocol Gateway device monitoring parameters table has following paramaters that can be altered by user by Preset Multiple Registers Command (Function Code 0x10).

  • IEC Device Address for 1st Meter
  • IEC Device Address for other meters on RS485 bus numbered from 2 to 9
  • Initialization String before communication start

The meter IEC62056-21 data address can be entered to LKM device as following example and that value is usually same with meter serial number. It can be set to "0" ( zero) if not needed to use and if there is only 1 meter in RS485 bus.

Preset Multiple Registers (Function Code=16)

Request

This command changes iec device addres to ‘5061905’, output holding registers # 160 of the slave device with address 1.

01 10 00A0 0002 04 004D 3D11 B95C

 

01: The Slave Address (01 hex = address 1)

10 : The Function Code 10 (Preset Multiple Registers)

00A0 : The Register Address of the IEC Data Address

0002 : The number of registers to write

04 : The number of data bytes to follow (2 registers x 2 bytes each = 4 bytes)

004D 3D11: 5061905 in Decimal equals to 4D3D11

B95C: The CRC (cyclic redundancy check) for error checking.

Response

01 10 00A0 0002 41EA

01: The Slave Address (01 hex = address1):

10 : The Function Code 10 (Preset Multiple Registers)

00A0 : The Register Address of the IEC Data Address

0002 : The number of registers written

41EA: The CRC (cyclic redundancy check) for error checking.

 

6.11 ZTerminal Software

 

ZTerminal software can be used to read all parameters of LKM devices, alter parameters that are allowed to change and read all registers for all meters connected to LKM devices. This is unoffical software for LKM series of devices and it is an implementation of Modbus commands only.

It supports both Modbus RTU and Modbus TCP ( LKMs connected behind CKL series Modbus TCP to RTU gateway for example) communication.

 

7. Firmware Upgrade

 

WARNING:  Firmware upgrade is available from Modem side Serial Line only

RS232 on LKM141 

RS485 on LKM144 and LKM614

Device must be on operating mode 19200 8N1 for firmware upgrade process.

 

LKM Series Modbus RTU to IEC62056-21 Protocol Gateway has capability to upgrade firmware from serial line of Modem side. This way the user can get latest updates for device operation and also user may also ask for changes. Here are some examples:

  • Firmware upgrade for specific meter model and protocol implementation

  • Firmware upgrade to disable switches and work only in one mode

  • Firmware upgrade to put any feature that user needs

 

Firmware upgrade procedure need specific firmware file prepared by our company and the firmware upgrade software abcZ software also developed by our company.

 

 

In order to use the software the specific firmware must be selected. After selecting the firmware path by clicking "Select Path" button the firmware can be loaded to device. The device has protection time window 10 seconds after the powered up so the process must be started within 10 seconds after the device powered up.

User can select the correct COM port and click "LOAD FW" button. Both the software and the device will show the percentage of process visually by process bar in software and by LEDs (work mode LEDs) on device (once %25 of process finished LED1 will be on and continue with LED2,3 and finish with LED4 after %100 finished). The process will take less than a minute and the device will be ready to use with new firmware after an automatic restart.

If somehow the firmware upgrade process is interrupted and upload file has failed, the device will lose firmware and stay in bootloader mode. In that case user can try upgrading the firmware again and this time should mark the "Forced FW Load" check box.

 

8. Ordering Information

LKM141: Modem side RS232, Meter side RS485, Modbus RTU to IEC 62056-21 Protocol Meter gateway

LKM144: Modem side RS485, Meter side RS485, Modbus RTU to IEC 62056-21 Protocol Meter gateway

LKM614: Modbus RTU to IEC 62056-21 Protocol Meter gateway specially designed for EMH LZQJ-XC Meter with RS485 on Modem Side

9. Product Selection

Model 5-25V DC Power input Operating Mode Selections Modem Side RS232 DB9 Female Connector Modem Side RS485 Terminal Connector Firmware Upgrade Over Serial Line Plug into Meter and Play, No external Power Needed
LKM141 X X X   X  
LKM144 X X   X X  
LKM614   X      X X
BSB Series Industrial Unmanaged Ethernet Switch
BSB Series Industrial Unmanaged Ethernet Switch
TLM Series LoRa and LoRaWAN Modems
TLM Series LoRa and LoRaWAN Modems
LKM Series MODBUS RTU to IEC62056-21 Meter Gateway
LKM Series MODBUS RTU to IEC62056-21 Meter Gateway
CKL Series Modbus, Serial to Ethernet Gateway
CKL Series Modbus, Serial to Ethernet Gateway
STG Series WMBus (Wireless MBus) - Modbus TCP/RTU Gateway
STG Series WMBus (Wireless MBus) - Modbus TCP/RTU Gateway
HUR Series Modbus TCP and RTU Remote I/O Devices
HUR Series Modbus TCP and RTU Remote I/O Devices
MBC Series IEC62056-21 Protocol Auto Baud Changer
MBC Series IEC62056-21 Protocol Auto Baud Changer
KMK Series Optical Probes for Energy Meters
REDZ Software Solutions
We use cookies to optimize site functionality and provide the best possible experience.
View our new Privacy and Protection of Personal Data here.
Accept Settings