4.3.1 Protocol : IEC 62056-21 ( former IEC 61107 )


 

Telegram structure

The protocol IEC 62056-21 offers five different protocol modes that can be used by tariff devices. These are the modes A, B, C, D and E. In the modes A, B, C, and E data exchange takes place in both directions whereby the data are collected via request. In mode D data are only transmitted in one directions in fact from the tariff device to the master.

The readout data can be saved with the checksum or transmitted without protection depending on agreement. The area will be saved straight after the STX or SOH up to ETX, whereby the ETX is included in the check.

 

Information to the telegram structure see
<IEC 62056-21 : Telegram structure>

 


IEC 62056-21 : Configuration

 

 

With the channel button ( channel 1 ...12 ) on the bottom following settings are possible :

 

Each character consists of one start bit ( binary = 0 ), 7 data bits, normally one even parity bit and one stop bit ( binary = 1 )

 

Interface

Any COM port can be allocated to each channel ( COM 1 up to COM 24 ).

Modem

An individual modem can be installed and connected for each channel. LIAN 98 is able to process up to twelve modems in the range of COM1 till COM24 simultaneously. Each modem, that is assigned to the selected channel is indicated. Normally this assignment will be recognized by LIAN 98 and the corresponding modem will be set.

Setup modem

The settings of the modem must be executed via the windows control panel "telephone and modem options". With this button you can check these modem settings and see if they concur with the LIAN 98 configuration.

Connection type
Full duplex :

Most of the modems are full duplex and can transmit data in both directions simultaneously. DTE ( LIAN 98 ) and DCE ( Modem ) work simultaneously as transmitter and receiver. None of both transmitters has to wait for clearance for transmitting data. Therefore the signals RTS and CTS are not significant. Sure, LIAN 98 is setting the control signals RTS and DTR to 1 when it is ready for transmission and receipt but it does not check the signals CTS and DSR.

Half duplex :

In case of a half duplex connection DTE ( LIAN 98 ) as well as DCE ( Modem ) can work as transmitter and receiver, hereby only one data line ( 2-wire connection ) is available that can be used alternately for transmission or receipt of data. The control signals RTS and CTS are used in order to define the allocation of transmission or receipt. When LIAN 98 should work as transmitter it activates the signal RTS and waits for the confirmation of the modem via the signal CTS. After the receipt of the signal CTS the data are transmitted and after the transmission of the data the signal RTS is set to 0. In each other case LIAN 98 is working as receiver only.

As long as the LIAN 98 software is ready for transmission and receipt the signal DTR is activated in order to show the modem that LIAN 98 is ready for operation, as well the software expects an activated DSR signal from the modem.

RTS Leading delay

0 ... 1000 msec
This parameter ist only used for the connection type "half duplex" and is determined by the initial transient behaviour of the used transmission equipment.
The RTS Leading defines the delay time from activating RTS signal to transmitting the first character and is used for modems whithout the hardware handshake signals "RTS and CTS". In this case the "RTS signal" must be led back over the "CTS line" to the PC with the help of a brazing bridge in the monitor cable. Dependent of the used modem it may be necessary to connect additionally the DTR-pin with the DSR-pin.
This function is deactivated if the "Leading and the Trailing" is set to NULL and therefore the control signals are analyzed diectly from the modem.

RTS Trailing delay

0 ... 1000 msec
This parameter ist only used for the connection type "half duplex" and is determined by the final transient behaviour of the used transmission equipment.
The RTS Trailing defines the delay time from the last character transmitted up to the RTS signal is deactivated.
This function is deactivated, if the "Leading and the Trailing" is set to NULL.

 

Baud rate

Transmission speed : 25 - 115 200 baud ( variable, default 300 baud )
The start baud rate for the first connection is always 300 baud.

Data byte

7 Bit ( fixed ) for protocol mode A, B, C and D.

Stop bit

1 bit ( variable )

Parity

even ( variable )

Time out

1 - 9999 msec ( variable ) : For 300 baud at least 600 msec.

 

Settings in the channel window

 

 

Protocol mode

Mode A, Mode B, Mode C, Mode D and Mode E can be selected.

Counter address using
OBIS code

yes/ no

As counter address or counter identification the OBIS code according to the standard
"IEC 62056-61" is used.

 


IEC 62056-21 : Simulation

 

In the following PDF file a typical meter reading with LIAN 98 is shown :

<Meter Reading with LIAN 98>

 

IEC 62056-21 : RTI ( Master )-Simulation

 

 

Device address
( address of the target device )

The request message to be sent are provided with the device address of the SIM list during master simulation.

Response timeout

1 - 30 000 msec

The IEC standard specifies a fixed time out interval to be used for repeated frame transmissions. The time out interval and maximum number of retries are configurable and appropriate values will depend on the transmission system.
This parameter determines the time in milliseconds that the program LIAN 98 as master station at most has to wait for an acknowledge before the last transmission is repeated.
Note : The response timeout should be set at least 5 seconds for a baud rate of 9600 and a message size of ca. 7 kByte.

Number of frame retries

0 - 255

Via this parameter it is defined how many times the transmission is to be repeated when the acknowledge is missing.

Baud rate change delay

1 - 30 000 msec ( for 300 baud minimum 300 msec )

The master confirms the receipt of the identification with an "ACK/ Option select" and changes subsequent the baud rate. In order to ensure that the acknowledge has been transferred completely the change of the baud rate is delayed with this parameter. It determines the time in milliseconds that LIAN 98 as master waits after the receipt of the identification message before the new baud rate is adjusted.

Send request device
( TDBnum )

yes/ no

TDB buffer number where the request message is stored.

Send option select
( TDBnum )

yes/ no

TDB buffer number where the acknowledgement/ option select message is stored.

Send password
( TDBnum )

yes/ no

TDB buffer number where the command message "password" is stored.

Send break
( TDBnum )

yes/ no

TDB buffer number where the break message is stored.

Send  A C K
( TDBnum )

yes/ no

TDB buffer number where the acknowledgement message "ACK" is stored.

Send  N A C K
( TDBnum )

yes/ no

TDB buffer number where the acknowledgement message "NACK" is stored.

 

IEC 62056-21 : RTU ( Slave )-Simulation

 

 

Device address
( address of the source device )

The device address is only used in order to validate the request message during connection establishment. If the address in the SIM list does not correspond to the received address the RTU simulation will not be started.

Identification

The identification message to be sent are provided with the identification of the SIM list during RTU simulation.

Response timeout

1 - 30 000 msec

The IEC standard specifies a fixed time out interval to be used for repeated frame transmissions. The time out interval and maximum number of retries are configurable and appropriate values will depend on the transmission system.
This parameter determines the time in milliseconds that the program LIAN 98 as master station at most has to wait for an acknowledge before the last transmission is repeated.

Number of frame retries

0 - 255

Via this parameter it is defined how many times the transmission is to be repeated when the acknowledge is missing.

Send identification
( TDBnum )

yes/ no

TDB buffer number where the identification message is stored.

Send password
( TDBnum )

yes/ no

TDB buffer number where the command message "password" is stored.

Send break
( TDBnum )

yes/ no

TDB buffer number where the break message is stored.

Send  A C K
( TDBnum )

yes/ no

TDB buffer number where the acknowledgement message "ACK" is stored.

Send  N A C K
( TDBnum )

yes/ no

TDB buffer number where the acknowledgement message "NACK" is stored.

Send readout data
( TDBnum from/ till )

yes/ no

TDB buffer number where the readout message(s) is (are) stored.

Send data messages
( TDBnum from/ till )

yes/ no

TDB buffer number where the data messages ( EOT/ ETX ) are stored.

Baud rate change delay

1 - 30 000 msec ( minimum 300 msec )

The baud rate is changed with the receipt of the "ACK/ Option select" ( mode C ) and corresponding to the option select the read out data are transmitted or the password requested when changing in the programming mode. In order to ensure that the master has also changed the baud rate the transmission is delayed with this parameter. It specifies the time in milliseconds that LIAN 98 as counter device waits after the receipt of an "ACK/ Option select" before the next data ( readout data or password request ) will be transmitted.

Baud rate fallback time-out

1 - 255 sec ( as per standard 60...120 sec )

This parameter defines the time in seconds that LIAN 98 as counter device waits during inactivity before the initial baud rate ( normaly 300 baud ) is set.

 


IEC 62056-21 : Pre-filter/ Pre-trigger

LIAN 98 assigns internal an unambiguous type identificaton to each message type for protocol IEC62056 that also can be used for filtering. In the following list you will find the assigned values. Additional to the message type also the first 22 bytes ( byte 0 = start byte ) can be filtered in order to select e.g. messages by address.

 

TypeID direction description
1 con

Request message ( Sign on )
Used from the master as sign on at the tariff device.

2 con

Acknowledgement/ option select message
A tariff device in protocol mode C or E waits after the transmission of the identification for the option selection.

3 con Command message : Password
4 con Command message : Write
5 con Command message : Read
6 con Command message : Execute
7 con Command message : Break ( Sign off )
     
129 mon

Identification message
Answer of the tariff device caused by the sign on of the master.

130 mon

Data message ( Readout )
This message is normally used for the transmission of tariff data by the tariff device. Transmission starts immediately after the transmission of the identification.

131 mon

Data message ( programming mode )
The message follows read command and ends by ETX/ BCC.

132 mon

Data message ( programming mode ) using optional partial blocks.
The message follows read command and ends by EOT/ BCC.

133 mon Error message ( programming mode )
     
259 con, mon A C K : Acknowledgement message positive.
260 con, mon

N A C K : Acknowledgement message negative ( Repeat request )

 

IEC 62056-21 : Monitoring filters

 

Monitoring filters reduce capture on particular pre-defined data records. By setting the corresponding filters a carefully directed data preselection can be achieved, which results in a reduction of the data to be analyzed later.

 

 

Filter released

yes / no

With this option already set monitoring filters for one channel can be deactivated temporarily without deleting them.

Protocol specific
filter mask

Here you can define telegram-specific filters for monitoring in which several OR-linked triggers can be defined for one channel.

= Only values equal to 'from' are let through.
# Only values not equal to 'from' are let through.
< Only values less than 'from' are let through.
> Only values greater than 'from' are let through.
R 'from' and 'till' define a valid range
add Add the next OR-element.
remove Remove the current OR-element.

 

IEC 62056-21 : Action filters

 

For the simulation and execution of data tests actions can be caused with the receipt of defined records. Therefore the possibility exists to define action filters, that effect the transmission of a send-sequence or transmit one or more message buffers ( TDB ).

 

 

Filter released

yes / no

With this option already set action filters for one channel can be deactivated temporarily without deleting them.

Protocol specific
filter mask

The action filter is described over telegram specific features corresponding to a filter setting. Additionally each action filter requires an allocation to a send buffer or alternatively to a send sequence.

= Only values equal to 'from' are let through.
# Only values not equal to 'from' are let through.
< Only values less than 'from' are let through.
> Only values greater than 'from' are let through.
R 'from' and 'till' define a valid range
Sendbuffer number
( from, from/ till )

In correspondence with the action filter the message buffer "from" or the message buffers "from/ till" are to be sent.

Sequenceline number
( from, from/ till )

In correspondence with the action filter the send sequence is to be started at line number "from" or to be started at line number "from" and to be ended at line number "till".

add Add the next OR-element.
remove Remove the current OR-element.

 

IEC 62056-21 : Start trigger

 

With the receipt of a telegram pre-defined as start trigger, recording is started.

 

 

Start trigger released

yes / no

With this option already set start triggers for one channel can be deactivated temporarily without deleting them.

Protocol specific filter mask

Here you can define telegram-specific start triggers for monitoring in which several OR-linked triggers can be defined for the channel.

= Only values equal to 'from' are let through.
# Only values not equal to 'from' are let through.
< Only values less than 'from' are let through.
> Only values greater than 'from' are let through.
R 'from' and 'till' define a valid range
add Add the next OR-element.
remove Remove the current OR-element.

 

IEC 62056-21 : Stop trigger

 

Monitoring can also be stopped by telegram-specific filters and/ or "stop on error" after a defined number of following records. The number of the following records is defined in the field "records after stop on error/ stop trigger" in the global parameters of the VFL settings.

 

 

Stop trigger released

yes / no

With this option already set stop triggers for one channel can be deactivated temporarily without deleting them.

Protocol specific filter mask

Here you can define telegram specific stop triggers for monitoring in which several OR-linked triggers can be defined for one channel.

= Only values equal to 'from' are let through.
# Only values not equal to 'from' are let through.
< Only values less than 'from' are let through.
> Only values greater than 'from' are let through.
R 'from' and 'till' define a valid range
add Add the next OR-element.
remove Remove the current OR-element.

 


Each alteration in the settings is displayed by an asterisk * in the caption title and will be only effective after saving.

 


IEC 62056-21 : Message display format

 

The sent and received messages of all channels are entered binary into the archive file. Before displaying on screen, the binary archived data are coverted to an easily readable procedure specific plaintext. The plaintext format is set separately for each channel. ( see "FMT file - Display format" )

 

 

Plaintext format 1

Everything is displayed

 

Additional to the plaintext output the transmission data can also be displayed in hexadecimal, decimal, ASCII, binary ( LSB first ) or binary ( MSB first ). Of course the plain text output can also be deactivated in order to display the transmission data only e.g. in ASCII format.

 


IEC 62056-21 : Error messages

 

Error checks during receive

 

per character

the start bit, the stop bit and the even parity bit.

per frame

the start character, the frame checksum and the end character and the length.

 

*** TimeOut !

Within a telegram, there may be no pause between characters. In case of timeout occurs it is assumed that it is the end of the telegram and the telegram check is started. The sensitivity can be parameterized in the configuration ( timeout ).
Normally a time out is no error, but it is stored in the Pro file together with the initial error for a better analysis of the faulty transmission line in connection with a line error.

*E: COM-PORT !

Error during writing on the COM port. May be it is already occupied by another program.

*E: Length !

The stop byte ( ETX, EOT ) is missing or set wrongly.

*F: Format !

Characters within a telegram that are expected on a fixed position are not on the right place.

*E: Checksum !

The checksum in the checksum byte ( BCC ) is incorrect.

*E: SYNC !

The receive routine initially searches for "/", SOH, STX, ACK oder NACK.
Each other character is noted as synchronization error in the PRO file.

*E: Overflow !

Error message by UART. This error is noted only in the PRO file.

*E: Parity !

Error message by UART. This error is noted only in the PRO file.

*E: Start/ Stop !

Error message by UART. This error is noted only in the PRO file.

 

Error checks during simulation

 

*E: Baudrate !

The baud rate character ( field Z ) in the message is wrong.

 


IEC 62056-21 : Parameter list

 

When a meter device is using the "Object Identification System" ( OBIS ) for a clear identification of the meter values ( active power, reactive power, ... ) and this is parameterized in the channel window settings of LIAN 98, the OBIS numbers are supplemented with an explanation by LIAN 98.

 

 

Texts for the OBIS numbers are defined in the parameter list of the IEC 62056-21 protocol. A OBIS code consists of six value groups which are described with A... F and characterizes the data value. Texts for the value groups C, D and E are in the PAR list. The user of LIAN 98 can change already defined texts or supplement this list with further texts. ( also see <Identification of data sets> )

 

 

 


MAYR Software

Wuerzburger Ring 39,  D 91056 Erlangen

Manual LIAN 98


LIAN 98 Protocol Router, Simulator and Analyzer
© Copyright 2001, 2006, 2011 by Werner Mayr. All Rights reserved.