AMS (Autonomous Metering System) - protocol IEC 62056-21

2N® SmartCOM PRO supports communication protocol IEC62056-21 for reading data. This functionality is provided by special FW which is distributed on request.


In this FAQ 2N® SmartCOM PRO is set for reading data from electricity meter. Electricity meter with RS485 and standard IEC62056-21 support had been used.


RS485 parameters need to be set as the very first step. Connect to the 2N® SmartCOM PRO via putty and use the set of following at commands:

Settings RS485: speed 2400bd/s - data bits 7 – stop bits 1 – parity – even

at^scport2="baudrate",2400           - set baudrate

at^scport2="DATA_BITS",7            - set data bits

at^scport2="STOP_BITS",1           - set stop bits

at^scport2="PARITY",1                  - set parity even

at^scport2?                                   - check settings on RS485

at^scport2="srestart"                     - save settings and restart RS485 interface

AMS AT commands:

 at^scams=?          - display available commands for AMS and parameters of these commands

at^scams="enable",1     - switching on AMS system (0 means switch off)

at^scams="dev_add",2,"IEC62056-21","947834","3M"          - add device to the table

Where 2  -   RS485 port of 2N® SmartCOM PRO
"IEC62056-21" – defined used protocol in string form,
"947834"  - serial number of device used like device address
"3M" is time interval. Supported reading intervals "1M", "2M", "3M", "4M", "5M", "6M", "10M", "12M", "15M", "20M", "30M", "1H", "2H", "3H", "4H", "6H", "8H", "12H", "1D"

 

at^scams?     – show listed devices

 at^scams="dev_remove",1-32      – remove one device on defined position

 at^scams="dev_clear"                 – remove all devices

Reading data from electricity meter:

Direct reading data:

at^scams="direct_read",2,"IEC62056-21","947834",2400


Where 2 is a port of 2N® SmartCOM (PRO),
"IEC62056-21" – defined used protocol in string form,
"947834" serial number of device used like device address
2400 is baudspeed

Reading saved data from 2N® SmartCOM PRO

at^scdata=? - display available parameters for work with data

"MESS_CNT"  - number of saved messages in memory

"GET_SPACE" – available memory in bytes

"GET_OLDEST" – listing of oldest message

"GET_FILTERED" – listing messages by applied filter

"DEL_OLDEST" – delete oldest message

"DEL_ALL" – delete all saved messages

 

Example: Check how many messages are saved and display 4 oldest messages. Delete all saved messages from 2N® SmartCOM PRO internal memory:

 at^scdata= "MESS_CNT"
at^scdata="get_oldest",4
at^scdata="del_all"

Troubleshooting:

Test 2N® SmartCom PRO - Terminal error buffer code description