10
IEC 60870-5-104 : 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 60870-5-104 : Telecontrol equipment and systems> ( English version EN 60870-5-104:2006 ). Telegram format with fixed length Telegram format with variable length APCI Application Protocol Control Information APDU Application Protocol Data Unit ASDU Application Service Data Unit Types of control field formats Three types of control field formats are used to perform numbered information transfer ( I-format ), numbered supervisory functions ( S-format ) and unnumbered control functions ( U-format ). LIAN 98(en) : Protocol IEC 60870-5-104, Telegram structure http://manuals.lian98.biz/doc.en/html/u_iec104_struct.htm 1 of 13

Protocol IEC 60870-5-104, Telegram Structure - baixardoc

Embed Size (px)

Citation preview

IEC 60870-5-104 : 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 60870-5-104 : Telecontrol equipment and systems>

( English version EN 60870-5-104:2006 ).

Telegram format with fixed length

Telegram format with variable length

APCI Application Protocol Control Information

APDU Application Protocol Data Unit

ASDU Application Service Data Unit

Types of control field formats

Three types of control field formats are used to perform numbered information transfer ( I-format ), numbered supervisory functions ( S-format )and unnumbered control functions ( U-format ).

LIAN 98(en) : Protocol IEC 60870-5-104, Telegram structure

http://manuals.lian98.biz/doc.en/html/u_iec104_struct.htm 1 of 13

I-Format ( Frame with variable length ) :

Bit 0 = 0 of the 1. octets of the control field defines the I-Format. I-Format APDUs contains always an ASDU.

S-Format ( Frame with fixed lengt ) :

Bit 0 = 1 and bit 1 = 0 of the 1. octets of the control field define the S-Format. S-Format APDUs always consist of one APCI only.

U-Format ( Frame with fixed length ) :

Bit 0 = 1 and bit 1 = 1 of the 1. octets of the control field define the U-Format. U-Format APDUs always consist of one APCI only. Only onefunction TESTFR, STOPDT or STARTDT can be active at the same time.

Structure of the ASDU

LIAN 98(en) : Protocol IEC 60870-5-104, Telegram structure

http://manuals.lian98.biz/doc.en/html/u_iec104_struct.htm 2 of 13

Type identifikation ( TypeID ) :

The TypeID <0> is not used. The range of numbers 1 to 127 is used for standard definitions from IEC 60870-5-101standard. The range 128 to135 is reserved for routing of messages. The numbers 136 up to 255 are for special use.

The range of numbers 128 up to 255 is private and not defined in the standard, but it is recommended that the data unit identifier fields of privateASDUs have the same format as standard ASDUs.

The following table shows the definition of type identification numbers for process and system information in monitor and control direction.

Process information in monitoring direction :

1 Single point information M_SP_NA_1

2 Single point information with time tag M_SP_TA_1

3 Double point information M_DP_NA_1

4 Double point information with time tag M_DP_TA_1

5 Step position information M_ST_NA_1

6 Step position information with time tag M_ST_TA_1

7 Bit string of 32 bit M_BO_NA_1

8 Bit string of 32 bit with time tag M_BO_TA_1

9 Measured value, normalized value M_ME_NA_1

10 Measured value, normalized value with time tag M_ME_TA_1

11 Measured value, scaled value M_ME_NB_1

12 Measured value, scaled value with time tag M_ME_TB_1

13 Measured value, short floating point value M_ME_NC_1

LIAN 98(en) : Protocol IEC 60870-5-104, Telegram structure

http://manuals.lian98.biz/doc.en/html/u_iec104_struct.htm 3 of 13

14 Measured value, short floating point value with time tag M_ME_TC_1

15 Integrated totals M_IT_NA_1

16 Integrated totals with time tag M_IT_TA_1

17 Event of protection equipment with time tag M_EP_TA_1

18 Packed start events of protection equipment with time tag M_EP_TB_1

19 Packed output circuit information of protection equipment with time tag M_EP_TC_1

20 Packed single-point information with status change detection M_PS_NA_1

21 Measured value, normalized value without quality descriptor M_ME_ND_1

Process telegrams with long time tag ( 7 octets ) :

30 Single point information with time tag CP56Time2a M_SP_TB_1

31 Double point information with time tag CP56Time2a M_DP_TB_1

32 Step position information with time tag CP56Time2a M_ST_TB_1

33 Bit string of 32 bit with time tag CP56Time2a M_BO_TB_1

34 Measured value, normalized value with time tag CP56Time2a M_ME_TD_1

35 Measured value, scaled value with time tag CP56Time2a M_ME_TE_1

36 Measured value, short floating point value with time tag CP56Time2a M_ME_TF_1

37 Integrated totals with time tag CP56Time2a M_IT_TB_1

38 Event of protection equipment with time tag CP56Time2a M_EP_TD_1

39 Packed start events of protection equipment with time tag CP56time2a M_EP_TE_1

40 Packed output circuit information of protection equipment with time tag CP56Time2a M_EP_TF_1

Process information in control direction :

45 Single command C_SC_NA_1

46 Double command C_DC_NA_1

47 Regulating step command C_RC_NA_1

48 Setpoint command, normalized value C_SE_NA_1

49 Setpoint command, scaled value C_SE_NB_1

50 Setpoint command, short floating point value C_SE_NC_1

51 Bit string 32 bit C_BO_NA_1

Command telegrams with long time tag ( 7 octets ) :

58 Single command with time tag CP56Time2a C_SC_TA_1

59 Double command with time tag CP56Time2a C_DC_TA_1

60 Regulating step command with time tag CP56Time2a C_RC_TA_1

61 Setpoint command, normalized value with time tag CP56Time2a C_SE_TA_1

62 Setpoint command, scaled value with time tag CP56Time2a C_SE_TB_1

63 Setpoint command, short floating point value with time tag CP56Time2a C_SE_TC_1

64 Bit string 32 bit with time tag CP56Time2a C_BO_TA_1

System information in monitoring direction :

70 End of initialization M_EI_NA_1

LIAN 98(en) : Protocol IEC 60870-5-104, Telegram structure

http://manuals.lian98.biz/doc.en/html/u_iec104_struct.htm 4 of 13

System information in control direction :

100 (General-) Interrogation command C_IC_NA_1

101 Counter interrogation command C_CI_NA_1

102 Read command C_RD_NA_1

103 Clock synchronization command C_CS_NA_1

104 ( IEC 101 ) Test command C_TS_NB_1

105 Reset process command C_RP_NC_1

106 ( IEC 101 ) Delay acquisition command C_CD_NA_1

107 Test command with time tag CP56Time2a C_TS_TA_1

Parameter in control direction :

110 Parameter of measured value, normalized value P_ME_NA_1

111 Parameter of measured value, scaled value P_ME_NB_1

112 Parameter of measured value, short floating point value P_ME_NC_1

113 Parameter activation P_AC_NA_1

File transfer :

120 File ready F_FR_NA_1

121 Section ready F_SR_NA_1

122 Call directory, select file, call file, call section F_SC_NA_1

123 Last section, last segment F_LS_NA_1

124 Ack file, Ack section F_AF_NA_1

125 Segment F_SG_NA_1

126 Directory F_DR_TA_1

127 QueryLog – Request archive file F_SC_NB_1

LIAN 98 is able to process user defined messages of non standard types from 127 up to 255, provided they have the same generaltelegram format as IEC 60870-5-101/104 standard.

Variable structure qualifier :

The SQ bit specifies the method of addressing of the following information objects or elements.

SQ = 0 Each single element or a combination of elements is addressed by the information object address. The ASDU may consist ofone or more than one equal information object. The number of objects is binary coded ( number of objects ) and defines thenumber of the information objects.

SQ = 1 A sequence of equal information objects ( e.g. measured values of identical format ) is addressed by the information objectaddress. The information object address specifies the associated address of the first information element of the sequence.The following information elements are identified by numbers continuously by + 1 from this offset. The number of objects isbinary coded ( number of elements ) and defines the number of the information elements. In case of a sequence of informationelements only one information object per ASDU is allocated.

number objects/elements

= 0 : ASDU contains no information object> 0 : ASDU contains one or more ( number ) information objects or elements

Cause of transmission ( COT ) :

The cause of transmission directs the ASDU to a specific application task ( program ) for processing. ASDUs in control direction are confirmedapplication services and may be mirrored in monitor direction with different causes of transmission. The value ZERO is not used.

LIAN 98(en) : Protocol IEC 60870-5-104, Telegram structure

http://manuals.lian98.biz/doc.en/html/u_iec104_struct.htm 5 of 13

P/ N The P / N bit indicates the positive or negative confirmation of an activation requested by a primary application function. In thecase of irrelevance the P / N bit is zero.

T In addition to the cause the test bit defines ASDUs which were generated during test conditions. The test bit is used e.g. to testtransmission and equipment without controlling the process.

...

1 periodic, cyclic

2 background interrogation

3 spontaneous

4 initialized init

5 interrogation or interrogated req

6 activation act

7 confirmation activation actcon

8 deactivation deact

9 confirmation deactivation deactcon

10 termination activation actterm

11 feedback, caused by distant command

12 feedback, caused by local command

13 data transmission

...

20 interrogated by general interrogation inrogen

21 interrogated by interrogation group 1

22 interrogated by interrogation group 2

23 interrogated by interrogation group 3

24 interrogated by interrogation group 4

25 interrogated by interrogation group 5

26 interrogated by interrogation group 6

27 interrogated by interrogation group 7

28 interrogated by interrogation group 8

29 interrogated by interrogation group 9

30 interrogated by interrogation group 10

31 interrogated by interrogation group 11

32 interrogated by interrogation group 12

33 interrogated by interrogation group 13

34 interrogated by interrogation group 14

35 interrogated by interrogation group 15

36 interrogated by interrogation group 16

37 interrogated by counter general interrogation

38 interrogated by interrogation counter group 1

39 interrogated by interrogation counter group 2

40 interrogated by interrogation counter group 3

41 interrogated by interrogation counter group 4

...

44 type-Identification unknown

LIAN 98(en) : Protocol IEC 60870-5-104, Telegram structure

http://manuals.lian98.biz/doc.en/html/u_iec104_struct.htm 6 of 13

45 cause unknown

46 ASDU address unknown

47 Information object address unknown

...

Originator address :

The originator address directs mirrored ASDUs and interrogated ASDUs in monitor direction ( e.g. interrogated by a general interrogation ) to thesource that activated the procedure. ( in case of redundant systems ).

If the originator address is not used and there is more than one single source in a system defined, the ASDUs in monitor direction have to bedirected to all relevant sources of the system. In this case the specific affected source has to select its specific ASDUs..

Common address of ASDU :

The common address is associated with all objects in an ASDU. The global address is a broadcast address directed to all stations of a specificsystem ( broadcast address ). ASDUs with a broadcast address in control direction have to be answered in monitor direction by the address thatis the specific defined common address ( station address ). According to the standard this parameter consists of 2 octets.

information object address :

The information object address is used as destination address in control direction and as source address in monitor direction.

The third octet is only used in case of structuring the information object address in order to define unambiguous addresses within a specificsystem. In all cases the maximum number of different object addresses is limited to 65 535 ( as for two octets ). If the information objectaddress is not relevant ( not used ) in some ASDUs, it is set to zero.

IEC 60870-5-104 : Ethernet-frame

Link layer ( Layer 2 )

Ethernet v.2.0 MAC Header

LIAN 98(en) : Protocol IEC 60870-5-104, Telegram structure

http://manuals.lian98.biz/doc.en/html/u_iec104_struct.htm 7 of 13

I/ G = 0 Individual address

I/ G = 1 Group address

U/ L = 0 Global administered address

U/ L = 1 Local administered address

Preamble 7 BytesThe preamble is needed, that the recipient or recipients ( network card ) synchronize with the transmitter (network card ) and therefore the start frame delimiter and the following Ethernet data frame can beinterpreted correctly.

These fields are not forwarded to the software by the network card !

Start Frame Delimiter Start Frame Delimiter is 1 octet long and is the sequence 10101011 binary.It immediately follows the preamble pattern and indicates the start of a frame.

This field is not forwarded to the software by the network card !

Destination address Receiver address for which the frame is intended.

LIAN 98(en) : Protocol IEC 60870-5-104, Telegram structure

http://manuals.lian98.biz/doc.en/html/u_iec104_struct.htm 8 of 13

Source address Identifies the station from which the frame is initiated.

EthernetLength- / Type Field

Internet Protocol ( IPv4 ) = 0800 HEX

For IEC 60870-5-104 this field is used as type field with a fixed value of 0800 HEX. This field indicates thenature of the MAC client protocol ( IPv4 ).

MAC Client Data The data consist of :. IPv4 header. TCP header. User data IEC 60870-5-104

. PAD fields ( Trailer ), if available

The client data must have a minimum length, so that the Ethernet data frames starting with the destinationaddress and including the trailer, has a minimum frame length of 60 bytes. If the frame length is less than 60bytes, the client data have to be filled with PAD fields ( padding bits ) up to the required minimum length.This will be done automatically by the network card.

Frame Check Sequence 4 BytesThe content of the Ethernet data frames starting with the destination address and including the client data issecured with a block checksum. The receiver ( network card ) recognizes therefore each transmissionfailure.

These fields are not forwarded to the software by the network card !

Netzwork Layer ( Layer 3 )

IPv4 Header

For more detailed information about the IPv4 header, check the document RFC 791 "Internet Protocol" on the IETF Website. <RFC 791 :Internet Protocol>.

LIAN 98(en) : Protocol IEC 60870-5-104, Telegram structure

http://manuals.lian98.biz/doc.en/html/u_iec104_struct.htm 9 of 13

Version Internet Protocol Version = 4 ( IPv4 ), see [ RFC 791 ].This field indicates the format of the IP header and has a fixed value of 4 for IPv4.

IHL The Internet Header Length is the length of the IP header counted in double words ( 32 bit units ),and thus points to the beginning of the data area. The minimum value for a correct header is 5 ( =20 bytes ).

Type of service

bit 0 : reservedbit 1 : reservedbit 2 : R ( Reliability )bit 3 : T ( Throughput )bit 4 : D ( Delay )bit 5 - 7 : PRECEDENCE

The type of service describes the indication of the abstract parameters of the desired service.These parameters are used in order to indicate the selection of the actual service parameterswhen transmitting a datagram through a particular network. Several networks offer serviceprecedence, which somehow treats high precedence traffic as more important than other traffic (generally by accepting only traffic above a certain precedence at time of high load ). The majorchoice is a three way tradeoff between low-delay, high-reliability, and high-throughput.

R : 0 = normal Reliability, 1 = high ReliabilityT : 0 = normal Throughput, 1 = high ThroughputD : 0 =normal Delay, 1 = low delay

Total length Total Length is the length of the datagram, measured in octets, including internet header and data.

LIAN 98(en) : Protocol IEC 60870-5-104, Telegram structure

http://manuals.lian98.biz/doc.en/html/u_iec104_struct.htm 10 of 13