Protocol Iec 101 104 Application Note 20200618 PDF

Download as pdf or txt
Download as pdf or txt
You are on page 1of 14

User Module

Protocol IEC101/104
APPLICATION NOTE
Protocol IEC101/104

Used symbols
Danger – Information regarding user safety or potential damage to the router.

Attention – Problems that can arise in specific situations.

Information, notice – Useful tips or information of special interest.

Advantech Czech s.r.o., Sokolska 71, 562 04 Usti nad Orlici, Czech Republic.
Document No. APP-0024-EN, revision from June 18, 2020. Released in the Czech Republic.

i
Protocol IEC101/104

Contents
1 User Module Description 1

2 Protocol IEC-101/104 Status 3


2.1 Module status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.2 System Log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

3 Conversion Configuration 5
3.1 IEC 60870-5-101 Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3.2 IEC 60870-5-104 Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.3 ASDU Conversions in Monitoring Direction (101 to 104) . . . . . . . . . . . . . 8
3.4 ASDU Conversions in Control Direction (104 to 101) . . . . . . . . . . . . . . . 9

4 Related Documents 10

ii
Protocol IEC101/104

List of Figures
1 Scheme of communication using Protocol IEC101/104 user module . . . . . . 1
2 User module menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
3 Module status page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
4 System Log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
5 Serial port and conversion configuration . . . . . . . . . . . . . . . . . . . . . . 7

List of Tables
1 IEC 60870-5-104 status information . . . . . . . . . . . . . . . . . . . . . . . . 3
2 IEC 60870-5-101 status information . . . . . . . . . . . . . . . . . . . . . . . . 4
3 IEC 60870-5-101 parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

iii
Protocol IEC101/104

1. User Module Description


IEC 60870-5-101 is a standard for power system monitoring, control & associated com-
munications for telecontrol, teleprotection, and associated telecommunications for electric
power systems. IEC 60870-5-104 protocol is an analogy to IEC 60870-5-101 protocol with
the changes in transport, network, link & physical layer services to suit the complete network
access: TCP/IP.

This user module does a bidirectional conversion between IEC 60870-5-101 and IEC
60870-5-104 protocols specified by the IEC 60870-5 standard (see [5, 6]). IEC 60870-5-101
serial communication is converted to the IEC 60870-5-104 TCP/IP communication and vice
versa. It is possible to configure some parameters of IEC 60870-5-101 and IEC 60870-5-104.

Figure 1: Scheme of communication using Protocol IEC101/104 user module

Parameters of serial communication and parameters of IEC 60870-5-101 protocol can be


set separately for every serial port of the router. It is possible to use the USB port of the
router with USB-serial converter. If using more serial ports in the router, there will be multiple
instances of the user module running and independent IEC 60870-5-101/IEC 60870-5-104
conversions can be done. Only the TCP Port parameter can be configured on the side of
IEC 60870-5-104. It is the port the TCP server listens on when conversion activated. Remote
IEC 60870-5-104 applicaton has to communicate on this port. The data for IEC 60870-5-101
side are sent as soon as they arrive from SCADA. The IEC 60870-5-101 side asks periodically
for the data according to Data polling time parameter configured. Regular asking is launched
when the first test frame arrives from SCADA.

1
Protocol IEC101/104

Protocol IEC 60870-5-101 defines an Application Service Data Unit (ASDU). In ASDU there
is ASDU identifier (with type of ASDU in it) and information objects. When converting from
IEC 60870-5-104 to IEC 60870-5-101 all ASDU types defined in the IEC 60870-5-101 standard
in compatible 1–127 range of ASDU types are converted accordingly. Proprietary types of
ASDU in the private range 127–255 are not converted. Both commands and data (payload) in
ASDUs are converted. Additionally, other ASDUs are converted by default – those for control
and monitoring with time tag. These are not defined the same way in IEC 60870-5-101 and
IEC 60870-5-104 protocols, so it is possible to configure the conversion of these ASDUs in
the user module: either drop, or mapping to equivalent in opposite protocol, or mapping to
same ASDU in opposite protocol. More details in chapter 3.3, list of these ASDUs on Figure 5.
A number of unknown ASDUs is logged and displayed on the Module status page.

When uploaded to the router, user module


is accessible in the Customization section in the
User Modules item of the router’s web interface.
Click on the title of the user module to see the
user module menu as on the fig. 2. The Status
section provides the Module status page with run-
ning communication information and the System
Log page with the messages logged. Configura-
tion of both serial ports and USB port of the router
and IEC 60870-5-101/IEC 60870-5-104 parame-
ters is accessible in the Configuration section. The
Return item in the Customization section is to re-
turn to the higher menu of the router.
Figure 2: User module menu

User module Protocol IEC101/104 is not a part of the router’s firmware. It can be down-
loaded from https://ep.advantech-bb.cz/user-modules. Uploading of the user module is
described in the Configuration Manual (see 4). This user module is v2 and v3 router plat-
form compatible. It is necessary to have either the serial expansion port installed in the
router or use the USB-serial converter and router’s USB port for proper work of this user
module. The unbalanced serial communication mode is supported. This means the
router is the master and connected IEC 60870-5-101 telemetry is a slave. SCADA initi-
ates the first connection with router on IEC 60870-5-104 side. User module in router then
asks connected IEC 60870-5-101 telemetry regularly for events and required information.

2
Protocol IEC101/104

2. Protocol IEC-101/104 Status


2.1 Module status
There are protocol information about running communication on this page. These are
individual for every serial port of the router. Detected type of the port is displayed at the Port
type parameter. Parameters of IEC 60870-5-104 and IEC 60870-5-101 are described in the
tables below.

Figure 3: Module status page

Item Description
IEC104 state State of connection of the superior IEC 60870-5-104 server.
I frame NS Sent – number of last sent frame
I frame NR Received – number of last received frame
S frame ACK Acknowledgment – number of last acknowledged sent frame
U frame test Number of test frames
Unknown Inf.Objects Number of unknown information objects (thrown away)
TCP/IP remote host IP address of the last connected IEC 60870-5-104 server.
TCP/IP reconnect Number of TCP/IP reconnections
Table 1: IEC 60870-5-104 status information

3
Protocol IEC101/104

Item Description
IEC101 state IEC 60870-5-101 connection state
Unknown frame count Number of unknown frames
Table 2: IEC 60870-5-101 status information

2.2 System Log


On the System Log page there are log messages displayed. It is the same system log as
the one in the main menu of the router. Messages of the user module are introduced by the
iec14d string (messages from running iec14d daemon). Here you can check out the run of
the user module or see the messages in troubles with configuration and connection. You can
download the messages and save it to your computer as a text file clicking the Save button.
On the screenshot of a log you can see the start of the user module and messages
of unknown object type detected. Other errors are logged, too. Types and number of er-
rors/messages logged can be set for any port separately in Configuration section. It is called
Debug parameters and it is located at the bottom of every configuration page.

Figure 4: System Log

4
Protocol IEC101/104

3. Conversion Configuration
Configuration of the IEC 60870-5-101 and IEC 60870-5-104 parameters is accessible in
the Expansion Port 1, Expansion Port 2 and USB Port items. More separate IEC 60870-5-
101/IEC 60870-5-104 conversions are possible, individual for every serial port of the router.
Parameters for every expansion/USB port are the same.
Enable the conversion for the proper expansion port ticking the Enable conversion mod-
ule checkbox up on the page. Any changes will take effect after clicking the Apply button.
There are four parts of the conversion configuration, followed by time conversion configu-
ration and Debug parameters parts on the configuration page. Four parts of the conversion
are the following: IEC 60870-5-101 parameters, IEC 60870-5-104 parameters, ASDU con-
verting in monitoring direction (IEC 60870-5-101 to IEC 60870-5-104) and ASDU conversion
in control direction (IEC 60870-5-104 to IEC 60870-5-101). Extra configuration items bellow
regarding conversion of time, are described in 3.3 and 3.4 sections bellow. In Debug parame-
ters part you can set the type of messages shown and the level of messages amount on the
System Log page.

The paramaters of both – the Protocol IEC101/104 user module and the used system
telemetry – has to be the same to make the communication work properly.

3.1 IEC 60870-5-101 Parameters


In the Port Type item there is a detected type of an Expansion Port in the router displayed.
The parameters on top are for the serial line communication. The parameters for IEC 60870-5-
101 itself are below. These parameters has to be configured according to the IEC 60870-5-101
telemetry used in the system. The parameters are described in the following table. The other
IEC 60870-5-101 parameters are static and can not be changed.

Number Description
Baudrate The speed of the communication. The range is 9600 to 57600.
Data Bits The number of data bits. 8 only.
Parity The control parity bit. None, even or odd.
Stop Bits The number of stop bits. 1 or 2.
Link address length The length of the link address. 1 or 2 bytes.
Link address Link address is the address of connected serial device.
Continued on the next page

5
Protocol IEC101/104

Continued from previous page


Item Description
COT transmition length Cause Of Transmission length – the length of the "cause of
transmission" information (spontaneous, periodical, etc.). 1 or
2 bytes.
COT MSB source Cause Of Transmission - Most Significant Byte. COT is given
by the code according to the type of event the transmission was
caused by. Optionally the source address (of the data origina-
tor) can be added. 0 – standard address, 1 to 255 – specific
address.
CA ASDU length Common Address of ASDU (Application Service Data Unit)
length. 1 or 2 bytes.
IOA length Information Object Address length – IOAs are in the ASDU. 1
to 3 bytes.
Data polling time The interval of regular requests from router to IEC 60870-5-
101 telemetry for data. Time in milliseconds. Default value
1000 ms.
Send Delay It is not recommended to use this delay in standard cases. This
is an experimental option for additional delay in router for mes-
sages in 104 –> 101 direction (from SCADA to device). Useful
only for non-standard IEC-101 devices.
Table 3: IEC 60870-5-101 parameters

3.2 IEC 60870-5-104 Parameters


There is only one parameter available for the IEC 60870-5-104 configuration: IEC-104
TCP Port. It is a port the TCP server is listening on. The TCP server is running in the router
when IEC 60870-5-101/IEC 60870-5-104 conversion enabled. The 2404 prepared value is
the official IEC 60870-5-104 TCP port reserved for this service. In the Expansion Port 2
configuration there is 2405 value prepared (not reserved by the standard). For USB Port it is
2406 TCP port.
The other IEC 60870-5-104 parameters are fixed according to standard. If the IOA lengths
differ, the bytes of length are added or removed automatically. Conflict situations are always
logged.

6
Protocol IEC101/104

Figure 5: Serial port and conversion configuration

7
Protocol IEC101/104

3.3 ASDU Conversions in Monitoring Direction (101 to 104)


IEC 60870-5-101 to IEC 60870-5-104 conversion can be configured in this part. These
ASDUs use 24 bits long time tag in IEC 60870-5-101 (milliseconds, seconds, minutes), but in
IEC 60870-5-104 the 56 bits long time tags are used (milliseconds, seconds, minutes, hours,
days, months, years). That’s why the conversion configuration is possible – enabling different
time tag handling according to specific needs of the application.
For every ASDU listed in this part on Figure 5, these ways of conversion can be selected:
DROP, Convert to same ASDU and Convert to equivalent ASDU (default).

DROP When this option selected, the ASDU is dropped and conversion is not done.

Convert to same ASDU If this option is selected, the ASDU is mapped on the same ASDU
in the opposite protocol. It means there is no conversion of time tag – IEC 60870-5-104
application receives unchanged shorter (24 bits) time tag from IEC 60870-5-101 device.

Convert to equivalent ASDU If this option is selected, the ASDU is mapped on the equiv-
alent ASDU type in the opposite protocol. See the names and numbers of these opposite
ASDU types on Figure 5. This means the conversion of time tag has to be done – the time tag
has to be completed up to 56 bits. The conversion of time tag can be set via CP24Time2a to
CP56Time2a Conversion Method for Hour and Date item at the bottom of the page. These
are the options:

• Use fixed values – Default configuration. The time original time tag (24 bits) is com-
pleted with fixed values 0 hours, 1st day and 1st month of year 00 (2000).

• Use router time values – The time original time tag (24 bits) is completed with the
hours, day, month and year taken from the router’s time. It depends on the time setting
on the router (Either manually or from NTP server). There is another risk – see the box
bellow.

Attention! Use router time values item from CP24Time2a to CP56Time2a Conversion
Method for Hour and Date – is risky. Use it at your’s own risk, because unintentional
jumps in data can appear when converted this way. This can happen at the edges of
time units (days, months, years). Let’s have a situation when the monitoring ASDU is
sent at 23 hours, 59 minutes, 59 seconds and 95 milliseconds. Due to network latency
it will pass the router just after midnight – on the next day. And the completed time tag
is now 0 hours, 59 minutes, 59 seconds and 95 milliseconds of the next day – there is
unintentional one hour jump in the converted time tag.

Note: If the IEC 60870-5-101 device supports long (56 bits) time tags for IEC 60870-5-104,
it will send the ASDUs readable by IEC 60870-5-104, so the time tag is not converted and will
be delivered to SCADA directly from the device.

8
Protocol IEC101/104

3.4 ASDU Conversions in Control Direction (104 to 101)


IEC 60870-5-104 to IEC 60870-5-101 conversion can be configured in this part. Again it is
related to different time tag length, but here the long time tags are just cut for the IEC 60870-
5-101 device.
For every ASDU listed in this part on Figure 5, these ways of conversion can be selected:
DROP, Convert to same ASDU and Convert to equivalent ASDU (default).

DROP When this option selected, the ASDU is dropped and conversion is not done.

Convert to same ASDU If this option is selected, the ASDU is mapped on the same ASDU
in the opposite protocol. It means there is no conversion of time tag – IEC 60870-5-101 device
receives unchanged long time tag from IEC 60870-5-104 application (some IEC 60870-5-101
devices support long time tags).

Convert to equivalent ASDU If this option is selected, the ASDU is mapped on the equiv-
alent ASDU type in the opposite protocol. See the names and numbers of these opposite
ASDU types on Figure 5. Conversion of time tag is done by cutting it’s length from 56 bits to
24 bits – only minutes, seconds and milliseconds are kept.

It is possible to synchronise the router time from SCADA IEC-104 telemetry. Just enable the
checkbox Synchronize router time from C_CS_NA_1 (103) command. This will set the real
time clock in router to same time as in SCADA by incoming IEC-104 command. Additional
check of command validity regarding of time can be done when the item Command Period of
Validity is filled-in. No check for validity is done by default (field empty), but if you fill-in e.g. 30
seconds of validity, the time tag received from SCADA will be compared with time in the router.
If the difference of time is bigger than period of validity (e.g. 30 seconds), the command will
be irrelevant and will not be sent to IEC-101 side.
All configuration changes will take effect after pressing Apply button.

9
Protocol IEC101/104

4. Related Documents
[1] Advantech Czech: v2 Routers Configuration Manual (MAN-0021-EN),
available from: https://ep.advantech-bb.cz

[2] Advantech Czech: SmartStart Configuration Manual (MAN-0022-EN),


available from: https://ep.advantech-bb.cz

[3] Advantech Czech: SmartFlex Configuration Manual (MAN-0023-EN),


available from: https://ep.advantech-bb.cz

[4] Engineering Portal: https://ep.advantech-bb.cz/

[5] IEC: IEC 60870-5-101 (2003): Telecontrol equipment and systems


– Part 5-101: Transmission protocols – Companion standard
for basic telecontrol tasks

[6] IEC: IEC 60870-5-104 (2006): Telecontrol equipment and systems


– Part 5-104: Transmission protocols – Network access for
IEC 60870-5-101 using standard transport profiles

10

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy