Professional Documents
Culture Documents
IEC 60870-5-104, Telegram Structure
IEC 60870-5-104, Telegram Structure
htm
1 de 13 18/02/2019 8:48
LIAN 98(en) : Protocol IEC 60870-5-104, Telegram structure http://www.mayor.de/lian98/doc.en/html/u_iec104_struct.htm
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 ).
Bit 0 = 0 of the 1. octets of the control field defines the I-Format. I-Format APDUs contains always an ASDU.
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.
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 one
function TESTFR, STOPDT or STARTDT can be active at the same time.
2 de 13 18/02/2019 8:48
LIAN 98(en) : Protocol IEC 60870-5-104, Telegram structure http://www.mayor.de/lian98/doc.en/html/u_iec104_struct.htm
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 to
135 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 private
ASDUs 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.
3 de 13 18/02/2019 8:48
LIAN 98(en) : Protocol IEC 60870-5-104, Telegram structure http://www.mayor.de/lian98/doc.en/html/u_iec104_struct.htm
14 Measured value, short floating point value with time tag M_ME_TC_1
19 Packed output circuit information of protection equipment with time tag M_EP_TC_1
36 Measured value, short floating point value with time tag CP56Time2a M_ME_TF_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
63 Setpoint command, short floating point value with time tag CP56Time2a C_SE_TC_1
4 de 13 18/02/2019 8:48
LIAN 98(en) : Protocol IEC 60870-5-104, Telegram structure http://www.mayor.de/lian98/doc.en/html/u_iec104_struct.htm
File transfer :
122 Call directory, select file, call file, call section F_SC_NA_1
LIAN 98 is able to process user defined messages of non standard types from 127 up to 255, provided they have the same general
telegram format as IEC 60870-5-101/104 standard.
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 of
one or more than one equal information object. The number of objects is binary coded ( number of objects ) and defines the
number of the information objects.
SQ = 1 A sequence of equal information objects ( e.g. measured values of identical format ) is addressed by the information object
address. 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 is
binary coded ( number of elements ) and defines the number of the information elements. In case of a sequence of information
elements only one information object per ASDU is allocated.
5 de 13 18/02/2019 8:48
LIAN 98(en) : Protocol IEC 60870-5-104, Telegram structure http://www.mayor.de/lian98/doc.en/html/u_iec104_struct.htm
The cause of transmission directs the ASDU to a specific application task ( program ) for processing. ASDUs in control direction are confirmed
application services and may be mirrored in monitor direction with different causes of transmission. The value ZERO is not used.
P/ N The P / N bit indicates the positive or negative confirmation of an activation requested by a primary application function. In the
case 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 test
transmission and equipment without controlling the process.
...
1 periodic, cyclic
2 background interrogation
3 spontaneous
4 initialized init
6 activation act
8 deactivation deact
13 data transmission
...
6 de 13 18/02/2019 8:48
LIAN 98(en) : Protocol IEC 60870-5-104, Telegram structure http://www.mayor.de/lian98/doc.en/html/u_iec104_struct.htm
...
44 type-Identification unknown
45 cause unknown
...
Originator address :
The originator address directs mirrored ASDUs and interrogated ASDUs in monitor direction ( e.g. interrogated by a general interrogation ) to the
source 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 be
directed to all relevant sources of the system. In this case the specific affected source has to select its specific ASDUs..
The common address is associated with all objects in an ASDU. The global address is a broadcast address directed to all stations of a specific
system ( broadcast address ). ASDUs with a broadcast address in control direction have to be answered in monitor direction by the address that
is the specific defined common address ( station address ). According to the standard this parameter consists of 2 octets.
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 specific
system. In all cases the maximum number of different object addresses is limited to 65 535 ( as for two octets ). If the information object
address is not relevant ( not used ) in some ASDUs, it is set to zero.
7 de 13 18/02/2019 8:48
LIAN 98(en) : Protocol IEC 60870-5-104, Telegram structure http://www.mayor.de/lian98/doc.en/html/u_iec104_struct.htm
I/ G = 0 Individual address
I/ G = 1 Group address
U/ L = 0 Global administered address
Preamble 7 Bytes
The 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 be
interpreted correctly.
These fields are not forwarded to the software by the network card !
8 de 13 18/02/2019 8:48
LIAN 98(en) : Protocol IEC 60870-5-104, Telegram structure http://www.mayor.de/lian98/doc.en/html/u_iec104_struct.htm
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.
Source address Identifies the station from which the frame is initiated.
The client data must have a minimum length, so that the Ethernet data frames starting with the destination
address and including the trailer, has a minimum frame length of 60 bytes. If the frame length is less than 60
bytes, 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.
These fields are not forwarded to the software by the network card !
IPv4 Header
For more detailed information about the IP v4 header, check the document RFC 791 "Internet Protocol" on the IETF Website. <RFC 791 :
Internet Protocol>.
9 de 13 18/02/2019 8:48
LIAN 98(en) : Protocol IEC 60870-5-104, Telegram structure http://www.mayor.de/lian98/doc.en/html/u_iec104_struct.htm
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 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 parameters
bit 0 : reserved when transmitting a datagram through a particular network. Several networks offer service
bit 1 : reserved precedence, which somehow treats high precedence traffic as more important than other traffic (
bit 2 : R ( Reliability ) generally by accepting only traffic above a certain precedence at time of high load ). The major
bit 3 : T ( Throughput ) choice is a three way tradeoff between low-delay, high-reliability, and high-throughput.
bit 4 : D ( Delay )
bit 5 - 7 : PRECEDENCE R : 0 = normal Reliability, 1 = high Reliability
10 de 13 18/02/2019 8:48
LIAN 98(en) : Protocol IEC 60870-5-104, Telegram structure http://www.mayor.de/lian98/doc.en/html/u_iec104_struct.htm
Total length Total Length is the length of the datagram, measured in octets, including internet header and data.
Identification An identifying value assigned by the sender in order to indicate to which datagram the fragments
are allocated.
Fragment offset This field indicates where in the datagram this fragment is placed. The fragment offset is
measured in units of 8 octets ( 64 bits ). The first fragment has offset zero.
Time to live This field indicates the maximum time the datagram is allowed to remain in the internet system. If
this field contains the value zero, then the datagram must be destroyed. This field is modified in
internet header processing. The time is measured in units of seconds, but since every module that
processes a datagram must decrease the TTL by at least one even if it processes the datagram in
less than a second.
Header checksum The checksum is only valid for the header. Since some header fields change ( e.g. time to live ) the
checksum has to be new calculated after each pass through the rooter.
Source address This parameter identifies the IP address of the transmitting host. ( Sender )
Destinatin address This parameter defines the IP-address of the receiving host ( Receiver )
TCP Header
For more detailed information about the TCP Header please read on the IETF Website
the document <RFC 793 : Transmission Control Protocol>.
11 de 13 18/02/2019 8:48
LIAN 98(en) : Protocol IEC 60870-5-104, Telegram structure http://www.mayor.de/lian98/doc.en/html/u_iec104_struct.htm
Source port Identifies the PORT from which the frame is initiated.
Sequence number The sequence number of the first data octet in this segment, except the SYN bit is set. If SYN is
present the sequence number is the initial sequence number ( ISN ) and the first data octet is ISN
+ 1.
Acknowledgement number If the ACK control bit is set this field contains the value of the next sequence number the sender of
the segment is expecting to receive. As soon as a connection is established this is always sent.
12 de 13 18/02/2019 8:48
LIAN 98(en) : Protocol IEC 60870-5-104, Telegram structure http://www.mayor.de/lian98/doc.en/html/u_iec104_struct.htm
Data offset The number of double words ( 32 bit units ) in the TCP Header. This indicates where the data
begin. The TCP header ( even one including options ) is an integral number of 32 bits long.
Window The number of data octets beginning with the one indicated in the acknowledgment field which the
sender of this segment is willing to accept.
Checksum The checksum is used for all 16 bit units in the header and in the data. If a segment contains un
odd number of header- and data bytes to be checked, the last byte on the right is replenished with
noughts in order to built a 16 bit word for the check. The block is not transmitted as part of the
segment. The check field itself is replenished with nougths while the checksum is calculated.
Urgent pointer This field transmits the current value of the urgent pointer as a positive offset from the sequence
number in this segment. The urgent pointer points to the sequence number of the octet following
the urgent data. This field is only interpreted in segments with the URG control bit set.
13 de 13 18/02/2019 8:48