LIAN 98(en) _ Protocol IEC

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

Transcript of LIAN 98(en) _ Protocol IEC

Page 1: LIAN 98(en) _ Protocol IEC

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 essentialnecessary 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 theidentification field and optional.

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

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

Page 2: LIAN 98(en) _ Protocol IEC

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 ofthe identification. It is not used in the programming mode and in protocol mode E.

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

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

Page 3: LIAN 98(en) _ Protocol IEC

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( STX )

The frame start character "STX" = 02 hexadecimal indicates the beginning of the calculation of theBCC.

Frame end character( ETX )

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

Block check character( BCC )

The "Block check character" is the calculated length parity over the characters of the data messagebeginning 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 isoptional. The characters can be digits "0...9", upper case letters and lower case letters "aA...zZ" and aspace.

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

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

Page 4: LIAN 98(en) _ Protocol IEC

Manufacturers identification The Manufacturers identification consists of three upper case letters except the third letter, it can alsobe transmitted as a lower case letter. If the third letter is a lower case letter, that means that the tariffdevice has a minimum reaction time of 20ms instead of 200ms. If the device transmits only upper caseletters 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 validfor protocol mode D ). The baud rate identification in the message is determined by the used protocolmode.

Protocol mode A :No baud rate changeover is provided for this mode. Each character is allowed, excepted are thecharacters "/", "!" 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 BdB - 1200 BdC - 2400 BdD - 4800 BdE - 9600 BdF - 19200 BdG, 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 Bd1 - 600 Bd2 - 1200 Bd3 - 2400 Bd4 - 4800 Bd5 - 9600 Bd6 - 19200 Bd7, 8 and 9 are reseved.

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

Identification The identification is manufacturer-specific and may consist of maximum 16 characters. Each characteris allowed, excepted are the characters "/", "!". The character "\" is only allowed as ESC character andonly 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 andoccurs only with this character. This field is optional and part of the 16 characters long identification.

Mode identification character( W )

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

0 and 1 are reserved2 - 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 procedure1 - secondary protocol procedure2 - HDLC protocol procedure3 up to 9 are reserved

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

0 - read data1 - programming end2 - 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 thecharacter "/", "!". 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 dataset describes the tariff value with address, value and unit.

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

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

Page 5: LIAN 98(en) _ Protocol IEC

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 tariffvalue 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.

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

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

Page 6: LIAN 98(en) _ Protocol IEC

Address,Identification number

The address i.e identification may have a maximum size of 16 characters. Each character is allowed,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 thecharacters "(", " * ", ")", "/" and "!". The dot should be used instead of a comma for values with decimalhyphen. 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 thecharacters "(", ")", "/" and "!".

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

Programming mode

Programming command message :

It is used for programming and block data transmission

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

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

Page 7: LIAN 98(en) _ Protocol IEC

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.

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

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

Page 8: LIAN 98(en) _ Protocol IEC

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 ) :

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

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

Page 9: LIAN 98(en) _ Protocol IEC

Frame start character( STX )

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

Frame end character( ETX )

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

Start of Header( SOH )

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

End character in a partial block( EOT )

The "End of text" character "EOT" = 04 hexadecimal.

Block check character( BCC )

The "Block check character" is the calculated length parity over the characters of the data messagebeginning immediately after the STX up to the included ETX .

Command message identifier Command message identifier :

P - Password commandW -Write command R - Read command E - Execute commandB - 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 algorithm1 - data is operand for comparison with internally held password2 - 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 data2 - 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 use1 - read ASCII coded data2 - 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 use2 - Formatted communication coding method execute ( optional )3 up to 9 is reserved for later use

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

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

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

Page 10: LIAN 98(en) _ Protocol IEC

Data set ( Programming mode ) :

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

Address,Identification number

The address ie identification may have a maximum size of 16 characters. Each character is allowed,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 canhave 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. Thehyphen 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 thecharacters "(", ")", "/" 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 identifictionnumbers 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.

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

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

Page 11: LIAN 98(en) _ Protocol IEC

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 valuesthat 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 nottariff-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 Medium0123456789

Abstract objectsElectricity..Heating costsCooling energyHeatGasWater ( cold )Warm water

1

Separator - 2DH 1

B Channel1

In electricity, the channel is irrelevant and is set normally to "1".

1 or 2

Separator : 3AH 1

C Measuring type01234567891011121314

21222324252627282930313233

4142434445464748495051

general purpose objectsΣ Li active power + ( import )Σ Li active power - ( export )Σ Li reactive power +Σ Li reactive power -Σ Li reactive power Q IΣ Li reactive power Q IIΣ Li reactive power Q IIIΣ Li reactive power Q IVΣ Li apparent power +Σ Li apparent power - power factorfrequency

L1 active power +L1 active power -L1 reactive power +L1 reactive power -L1 reactive power Q IL1 reactive power Q IIL1 reactive power Q IIIL1 reactive power Q IVL1 apparent power +L1 apparent power -L1 phase A currentL1 phase A voltageL1 power factor

L2 active power +L2 active power -L2 reactive power +L2 reactive power -L2 reactive power Q IL2 reactive power Q IIL2 reactive power Q IIIL2 reactive power Q IVL2 apparent power +L2 apparent power -L2 phase B currentL2 phase B voltage

1 or 2

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

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

Page 12: LIAN 98(en) _ Protocol IEC

5253

61626364656667686970717273

94

special characters

CFLP

L2 power factor

L3 active power +L3 active power -L3 reactive power +L3 reactive power -L3 reactive power Q IL3 reactive power Q IIL3 reactive power Q IIIL3 reactive power Q IVL3 apparent power +L3 apparent power -L3 phase C currentL3 phase C voltageL3 power factor

country specific OBIS codes for different countries

ServiceangabenError messagesList objectsData profiles, Load profile P.01/ P.02, Logbook P.98/ P.99

Separator . 2EH 1

D Measuring variable012345678910111213141516

212223242526272829

55

58

special characters

F

cumulative minimum 1cumulative maximum 1minimum 1average value 1 current measuring periodaverage value 1 last measuring periodmaximum 1instantaneous valueenergyZeitintegral 2Zeitintegral 3cumulative minimum 2cumulative maximum 2minimum 2average value 2 current measuring periodaverage value 2 last measuring periodmaximum 2

cumulative minimum 3cumulative maximum 3minimum 3average value 3 current measuring periodaverage value 3 last measuring periodmaximum 3 energy feed

Prüfmittelwert

Prüf-Zeitintegral

Error message

1 or 2

Separator . 2EH 1

E Tariff rates0123456789

totaltariff 1tariff 2tariff 3tariff 4tariff 5tariff 6tariff 7tariff 8tariff 9

1

Separator * 2AH 1

F Billing periods (Historical values )

00... 99 1 or 2

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

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

Page 13: LIAN 98(en) _ Protocol IEC

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 inAnlehnung an die Telefonvorwahl des Landes enthält. Die Werte für die Wertgruppen "E" und "F" können nun länderweise frei belegt werden. DieWerte für "A" und "B" haben weiterhin die per OBIS vorgegebene Bedeutung.

A - B : 94 . 49 . E * F

C = 94 : country specific OBIS codeD = 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 Wertp = processing status, 0 = not used

2

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 mb H W uerz burger R ing 39, D 91056 Erlangen Manual LIAN 98

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

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

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