Вы находитесь на странице: 1из 13

LIAN 98(en) : Protocol IEC 62056-21 / IEC 61107, Telegram structure file:///E:/vien%20thong/lap%20trinh%20giao%20tiep/lap%20trinh%20g...

IEC 62056-21 : Telegram structure


The LIAN 98 manual can and may not contain the complete IEC documentation, caused by legal position. Only all knowledge that is essential
necessary for the LIAN 98 software operation is specified in parts in this manual.

Detailed information to the protocol you will find in the IEC-Standard-Documentation


<IEC 62056-21:2002 - Electricity metering - Data exchange for meter reading - Part 21>.

Normal mode messages

Request message / Sign on :

Used from the master as sign on at the tariff device. The device address is optional..

Identification message :

Answer of the tariff device caused by the sign on of the master. The fields "sequence delimiter" and "mode identification " are part of the
identification field and optional.

1 of 13 9/21/2010 9:48 AM
LIAN 98(en) : Protocol IEC 62056-21 / IEC 61107, Telegram structure file:///E:/vien%20thong/lap%20trinh%20giao%20tiep/lap%20trinh%20g...

Acknowledgement/ option select message :

A tariff device in protocol mode C or E waits after the transmission of the identification for the option selection

Data message :

This message is normally used for the transmission of tariff data by the tariff device. Transmission starts immediately after the transmission of
the identification. It is not used in the programming mode and in protocol mode E.

2 of 13 9/21/2010 9:48 AM
LIAN 98(en) : Protocol IEC 62056-21 / IEC 61107, Telegram structure file:///E:/vien%20thong/lap%20trinh%20giao%20tiep/lap%20trinh%20g...

Acknowledgement message :

Positive-acknowlege ( Acknowledge character ) "ACK" = 06 hexadecimal.

Acknowledgement message ( Repeat request ) :

Negative-acknowledge ( Repeat request character ) "NAK" = 15 hexadecimal.

Start character Start character "/" = 2F hexadecimal.

End character End character "!" = 21 hexadecimal.

Transmission request command Transmission request command "?" = 3F hexadecimal.

Completion characters Completion character appears always double.


"CR" carriage return = 0D hexadecimal
"LF" line feed = 0A hexadecimal

Frame start character The frame start character "STX" = 02 hexadecimal indicates the beginning of the calculation of the
( STX ) BCC.

Frame end character The frame end character "ETX" = 03 hexadecimal indicates the end of the calculation of the BCC. The
( ETX ) ETX is included in the calculation.

Block check character The "Block check character" is the calculated length parity over the characters of the data message
( BCC ) beginning immediately after the STX up to the included ETX .

Device address The Device address is manufacturer-specific and may consist of maximum 32 characters. This field is
optional. The characters can be digits "0...9", upper case letters and lower case letters "aA...zZ" and a
space.

3 of 13 9/21/2010 9:48 AM
LIAN 98(en) : Protocol IEC 62056-21 / IEC 61107, Telegram structure file:///E:/vien%20thong/lap%20trinh%20giao%20tiep/lap%20trinh%20g...

Manufacturers identification The Manufacturers identification consists of three upper case letters except the third letter, it can also
be transmitted as a lower case letter. If the third letter is a lower case letter, that means that the tariff
device has a minimum reaction time of 20ms instead of 200ms. If the device transmits only upper case
letters it does not preclude that it does not support 20ms.
( see <FLAG : Registered Manufacturers Identification Characters> )

Baudrate identification The Baud rate identification is used for the baud rate changeover. The "request message", the
"identification" and the "acknowledgement/option" are transmitted with an initial rate of 300 Bd ( not valid
for protocol mode D ). The baud rate identification in the message is determined by the used protocol
mode.

Protocol mode A :
No baud rate changeover is provided for this mode. Each character is allowed, excepted are the
characters "/", "!" and the character may not be specified as baud rate for protocol mode B or C.

Protocol mode B with baud rate changeover :


In this mode the "acknowledgement/option" is not used.
A - 600 Bd
B - 1200 Bd
C - 2400 Bd
D - 4800 Bd
E - 9600 Bd
F - 19200 Bd
G, H and I are reserved.

Protocol mode C and E with baud rate changeover :


The "acknowledgement/option" is only used in this modes.
0 - 300 Bd
1 - 600 Bd
2 - 1200 Bd
3 - 2400 Bd
4 - 4800 Bd
5 - 9600 Bd
6 - 19200 Bd
7, 8 and 9 are reseved.

Protocol mode D :
No baud rate changeover is provided for this mode. Data transmission is determined on 2400 Bd. The
baud rate identification is always 3.

Identification The identification is manufacturer-specific and may consist of maximum 16 characters. Each character
is allowed, excepted are the characters "/", "!". The character "\" is only allowed as ESC character and
only in connection with the two optional fields "sequence delimiter" and "mode identification.

Sequence delimiter The sequence delimiter "\" = 5C hexadec is always followed by the mode identification character and
occurs only with this character. This field is optional and part of the 16 characters long identification.

Mode identification character Die Mode identification character defines the protocol mode E. The field is optional and part of the 16
( W) characters long identification.

0 and 1 are reserved


2 - binary mode ( HDLC )
3 up to 9 are reserved

Protocol control character The protocol control character is used in protocol mode C and E.

0 - normal protocol procedure


1 - secondary protocol procedure
2 - HDLC protocol procedure
3 up to 9 are reserved

Mode control character The mode control character is used in protocol mode C and E.

0 - read data
1 - programming end
2 - binary mode ( HDLC )
3 up to 5 and A up to Z is reserved for later use.
6 up to 9 for manufacturer-specific use

Data block :

The data block contains the tariff values and is part of the data block. Each printable character is allowed, CR and LF included, excluded are the
character "/", "!". A data block consists of a range of data lines, completed always with CR/LF. A data line contains one or more data sets. A data
set describes the tariff value with address, value and unit.

4 of 13 9/21/2010 9:48 AM
LIAN 98(en) : Protocol IEC 62056-21 / IEC 61107, Telegram structure file:///E:/vien%20thong/lap%20trinh%20giao%20tiep/lap%20trinh%20g...

Data line :

A data line consists of maximum 78 characters and is completed with CR/LF. It consists of one or more data sets. A data set describes the tariff
value with address, value and unit. The number of data lines is not limited.

Data set :

Each data line consists of one or more data sets and is completed with CR/LF. A data set describes the tariff value with address, value and unit.
Additional several boundary characters are included.

5 of 13 9/21/2010 9:48 AM
LIAN 98(en) : Protocol IEC 62056-21 / IEC 61107, Telegram structure file:///E:/vien%20thong/lap%20trinh%20giao%20tiep/lap%20trinh%20g...

Address, The address i.e identification may have a maximum size of 16 characters. Each character is allowed,
Identification number excepted the characters "(", ")", "/" and "!".

Front boundary character Front boundary character " ( " = 28 hexadecimal.

Value The value may have a maximum size of 32 characters. Each character is allowed, excepted are the
characters "(", " * ", ")", "/" and "!". The dot should be used instead of a comma for values with decimal
hyphen. The hyphen is counted in the number of characters.

Separator character Separator character " * " = 2A hexadecimal. The character can be left out if no unit exists.

Unit The unit may have a maximum size of 16 characters. Each character is allowed, excepted the
characters "(", ")", "/" and "!".

Rear boundary character Rear boundary character " ) " = 29 hexadecimal.

Programming mode

Programming command message :

It is used for programming and block data transmission

6 of 13 9/21/2010 9:48 AM
LIAN 98(en) : Protocol IEC 62056-21 / IEC 61107, Telegram structure file:///E:/vien%20thong/lap%20trinh%20giao%20tiep/lap%20trinh%20g...

Programming command message using optional partial blocks :

It is used for programming and block data transmission of long messages in protocol mode C.

Data message ( programming mode ) :

It is used for block data transmission.

7 of 13 9/21/2010 9:48 AM
LIAN 98(en) : Protocol IEC 62056-21 / IEC 61107, Telegram structure file:///E:/vien%20thong/lap%20trinh%20giao%20tiep/lap%20trinh%20g...

Data message ( programming mode ) using optional partial blocks :

Used for block data transmission of long messages in program mode C.

Error message ( programming mode ) :

Used for block data transmission of errors.

Break message ( programming mode ) :

8 of 13 9/21/2010 9:48 AM
LIAN 98(en) : Protocol IEC 62056-21 / IEC 61107, Telegram structure file:///E:/vien%20thong/lap%20trinh%20giao%20tiep/lap%20trinh%20g...

Frame start character The Frame start character "STX" = 02 hexadecimal, indicates the beginning of the calculation of the
( STX ) BCC.

Frame end character The Frame end character "ETX" = 03 hexadecimal, indicates the end of the calculation of the BCC.
( ETX ) The ETX is included in the calculation.

Start of Header The "Start of header" character "SOH" = 01 hexadecimal, indicates the beginning of the calculation of
( SOH ) the BCC.

End character in a partial block The "End of text" character "EOT" = 04 hexadecimal.
( EOT )

Block check character The "Block check character" is the calculated length parity over the characters of the data message
( BCC ) beginning immediately after the STX up to the included ETX .

Command message identifier Command message identifier :

P - Password command
W -Write command
R - Read command
E - Execute command
B - Exit command ( break )
Other characters are reserved for later use.

Command type identifier The Command type identifier defines the variant of the command.

Password command :
0 - data is operand for secure algorithm
1 - data is operand for comparison with internally held password
2 - data is result of secure algorithm ( manufacturer specific )
3 up to 9 is reserved for later use.

Write command :
0 - reserved for later use.
1 - write ASCII-coded data
2 - formatted communication coding method write ( optional )
3 - write ASCII-coded data with partial block ( optional )
4 - formatted communication coding method write with partial block (optional)
5 - write/ delete ASCII-coded data ( Load profil, Logbook, .. )
6 up to 9 is reserved for later use..

Read command :
0 - reserved for future use
1 - read ASCII coded data
2 - formatted communication coding method read ( optional )
3 - read ASCII coded data with partial block ( optional )
4 - formatted communication coding method read with partial block (optional)
5 - read ASCII coded data ( Load profil, Logbook, .. )
6 - read ASCII coded data with partial block ( Load profil, Logbook, .. )
7 up to 9 is reserved for later use

Execute command :
0 - 1 reserved for later use
2 - Formatted communication coding method execute ( optional )
3 up to 9 is reserved for later use

Break command :
0 - complete sign off
1 - complete sign off for battery operated devices using the fast wake up
method
2 up to 9 is reserved for later use

9 of 13 9/21/2010 9:48 AM
LIAN 98(en) : Protocol IEC 62056-21 / IEC 61107, Telegram structure file:///E:/vien%20thong/lap%20trinh%20giao%20tiep/lap%20trinh%20g...

Data set ( Programming mode ) :

Each data set contains a tariff value described with address, value and unit. Additional different boundary characters are included.

Address, The address ie identification may have a maximum size of 16 characters. Each character is allowed,
Identification number excepted the characters "(", ")", "/" and "!".

Front boundary character Front boundary character " ( " = 28 hexadecimal.

Value The value may have a maximum size of 32 characters. In protocol mode C however the value can
have a maximum size of 128 characters. Each character is allowed, excepted are the characters "(", "
* ", ")", "/" und "!". The dot should be used instead of a comma for values with decimal hyphen. The
hyphen is counted in the number of characters.

Separator character Separator character " * " = 2A hexadecimal. The character can be left out if no unit exists.

Unit The unit may have a maximum size of 16 characters. Each character is allowed, excepted the
characters "(", ")", "/" and "!".

Rear boundary character Rear boundary character " ) " = 29 hexadecimal.

Identification of data sets ( address/ identification number )

For a clear identification of the values ( active power, reactive power, ... ) the "Object Identification System" ( OBIS ) is used.

Detailed informationen to the OBIS numbering systematization you will find in the IEC Standard Documentation
<IEC 62056-61 : Electricity metering - Data exchange for meter reading – Part 61 : Object identification system ( OBIS )>

and ( only in German language available ) in the

<VDEW-Lastenheft "Elektronische Lastgangzähler">


Version 2.1.2 / 07. 11. 2003

OBIS has replaced the draft standard EDIS ( DIN 43863-3:1997 EDIS - Energie Data Identification System ) and defines the usual identifiction
numbers for metering systems and data transmissions.

A OBIS code consists of six value groups which are described in the following section with A... F and characterizes the data value.

10 of 13 9/21/2010 9:48 AM
LIAN 98(en) : Protocol IEC 62056-21 / IEC 61107, Telegram structure file:///E:/vien%20thong/lap%20trinh%20giao%20tiep/lap%20trinh%20g...

The value of group C indicates the direction of the energy flow.

The tariffs are indicated by sequential numbers. If the value is tariff independent the data are transmitted with tariff code number "1". For values
that are registered in several tariff numbers the tariff counter is indicated by the tariff code number "0". The tariff number 0 is also used for not
tariff-distinguished load profiles.

The value group F ( pre-value identifier ) is only used for the transmission of pre-values.

Systematics for electric energy

Value group Meaning Number characters

A Medium 1
0 Abstract objects
1 Electricity
2 .
3 .
4 Heating costs
5 Cooling energy
6 Heat
7 Gas
8 Water ( cold )
9 Warm water

Separator - 2DH 1

B Channel 1 or 2
1 In electricity, the channel is irrelevant and is set normally to "1".

Separator : 3AH 1

C Measuring type 1 or 2
0 general purpose objects
1 Σ Li active power + ( import )
2 Σ Li active power - ( export )
3 Σ Li reactive power +
4 Σ Li reactive power -
5 Σ Li reactive power Q I
6 Σ Li reactive power Q II
7 Σ Li reactive power Q III
8 Σ Li reactive power Q IV
9 Σ Li apparent power +
10 Σ Li apparent power -
11
12
13 power factor
14 frequency

21 L1 active power +
22 L1 active power -
23 L1 reactive power +
24 L1 reactive power -
25 L1 reactive power Q I
26 L1 reactive power Q II
27 L1 reactive power Q III
28 L1 reactive power Q IV
29 L1 apparent power +
30 L1 apparent power -
31 L1 phase A current
32 L1 phase A voltage
33 L1 power factor

41 L2 active power +
42 L2 active power -
43 L2 reactive power +
44 L2 reactive power -
45 L2 reactive power Q I
46 L2 reactive power Q II
47 L2 reactive power Q III
48 L2 reactive power Q IV
49 L2 apparent power +
50 L2 apparent power -
51 L2 phase B current
L2 phase B voltage

11 of 13 9/21/2010 9:48 AM
LIAN 98(en) : Protocol IEC 62056-21 / IEC 61107, Telegram structure file:///E:/vien%20thong/lap%20trinh%20giao%20tiep/lap%20trinh%20g...

52 L2 power factor
53
L3 active power +
61 L3 active power -
62 L3 reactive power +
63 L3 reactive power -
64 L3 reactive power Q I
65 L3 reactive power Q II
66 L3 reactive power Q III
67 L3 reactive power Q IV
68 L3 apparent power +
69 L3 apparent power -
70 L3 phase C current
71 L3 phase C voltage
72 L3 power factor
73
country specific OBIS codes for different countries
94

special characters
Serviceangaben
C Error messages
F List objects
L Data profiles, Load profile P.01/ P.02, Logbook P.98/ P.99
P

Separator . 2EH 1

D Measuring variable 1 or 2
0
1 cumulative minimum 1
2 cumulative maximum 1
3 minimum 1
4 average value 1 current measuring period
5 average value 1 last measuring period
6 maximum 1
7 instantaneous value
8 energy
9 Zeitintegral 2
10 Zeitintegral 3
11 cumulative minimum 2
12 cumulative maximum 2
13 minimum 2
14 average value 2 current measuring period
15 average value 2 last measuring period
16 maximum 2

21 cumulative minimum 3
22 cumulative maximum 3
23 minimum 3
24 average value 3 current measuring period
25 average value 3 last measuring period
26 maximum 3
27
28
29 energy feed

55 Prüfmittelwert

58 Prüf-Zeitintegral

special characters

F Error message

Separator . 2EH 1

E Tariff rates 1
0 total
1 tariff 1
2 tariff 2
3 tariff 3
4 tariff 4
5 tariff 5
6 tariff 6
7 tariff 7
8 tariff 8
9 tariff 9

Separator * 2AH 1

F Billing periods ( 00... 99 1 or 2


Historical values )

12 of 13 9/21/2010 9:48 AM
LIAN 98(en) : Protocol IEC 62056-21 / IEC 61107, Telegram structure file:///E:/vien%20thong/lap%20trinh%20giao%20tiep/lap%20trinh%20g...

General purpose objects ( Measuring type = 0 )

OBIS code ( C.D.E*F ) Function Number characters

0.0.0 Meter number 8

0.0.1 ( Identity number 1 ) 8

0.0.2 ( Identity number 2 ) 8

0.0.3 ( Identity number 3 ) 8

0.1.0 Billing period counter 2

0.1.2*xx Timestamp of the billing period "xx" ( YYMMDDhhmm ) 10

0.2.0 Firmware version 8

0.2.1*xx Parameter set number 8

0.2.2 Schaltuhren program number 8

0.8.6*xx Billing period "xx" duration ( day )

0.9.0 Anzahl Tage seit letzter Rückstellung

0.9.1 Meter time ( hhmmss ) 6

0.9.2 Meter date ( YYMMDD ) 6

0.9.5 Day of week 1

Country specific OBIS codes

Vereinbarungen im OBIS erlauben die Definition von landesspezifischen OBIS-Kennzahlen. Die Festlegung dieses Kennzahlenbereichs erfolgt
über die Wertgruppen "C" und "D", wobei "C" den festen Wert 94 und "D" zur landesspezifischen Unterscheidung eine Landeskennzahl in
Anlehnung an die Telefonvorwahl des Landes enthält. Die Werte für die Wertgruppen "E" und "F" können nun länderweise frei belegt werden. Die
Werte für "A" und "B" haben weiterhin die per OBIS vorgegebene Bedeutung.
A - B : 94 . 49 . E * F
C = 94 : country specific OBIS code
D = 49 : country code for Germany

Systematics for thermic energy

Value group Meaning Number characters

A Medium electricity, gas, water, heat, ... 1

B Channel d = differentation, 1 = vorläufiger, 2 = endgültiger Wert 2


p = processing status, 0 = not used

C Measuring type load profile, energy value 1 or 2

D Measuring variable Energiemenge ( absolut ), Bezugs-, Lieferichtung 1 or 2

E Tariff Grundvereinbarung 1

F Historical values 00... 99 1 or 2

M AY O R G m b H W uer z bur ger R ing 39, D 91056 E rlangen M anual LI AN 98


LIAN 98 Protocol Router, Simulator and Analyzer
© Copyright 2001, 2006 by MAYOR GmbH. All Rights reserved.

13 of 13 9/21/2010 9:48 AM

Вам также может понравиться