29.1 IEC 60870-5-101
The IEC 60870-5-101 protocol is a companion standard for power system monitoring, control associated communications for telecontrol, teleprotection, and associated telecommunications for electric power systems. Standard IEC 608705101 was prepared by IEC technical committee 57 (Power system control and associated communications).
Standard IEC 60870-5-101 defines an Application Service Data Unit (ASDU Figure below). In ASDU there is ASDU identifier(with type of ASDU in it) and information objects.
IEC 60870-5-101 ASDU structure
Common Address of ASDU Defines the stations address and can be configured in Devices asdu_address field for source and Signals common_address field for destination.
Information Object Address Used as destination object address in the control direction and as source object address in monitor direction can be configured in Signals info_address field.
Standard IEC 60870-5-101 transmission frames are separated into 3 different types: frame with variable length, frame with fixed length and single control characters
IEC 60870-5-101 ASDU structure
Control field provides information about the message direction, type of service and checksum.
Address field specifies the link address which points to the messages destination. WCC Lite supports IEC 60870-5-101 Master protocol over serial link (according EIA RS485). Its full functionality list can be found in a IEC 60870-5-101 PID Interoperability List which can be downloaded separately from this user manual.
Configuring datapoints (master)
To use IEC 60870-5-101 Master in WCC Lite, it has to configured via an Excel configuration. This configuration contains two Excel sheets where parameters have to be filled in Devices and Signals.
IEC 60870-5-101 master parameters for Devices tab
Parameter |
Type |
Description |
Required |
Default Value (when not specified) |
Range |
|
Min | Max | |||||
name |
string |
User-friendly name for a device |
Yes | |||
description |
string |
Description of a device |
No | |||
device_alias |
string |
Alphanumeric string to identify a device |
Yes | |||
enable | boolean |
Enabling/disabling of a device |
No | 1 | 0 | 1 |
protocol | string |
Protocol to be used |
Yes | IEC 60870-5-101 master | ||
device |
string |
Communication port |
Yes |
|
PORT1 |
PORT2 |
baudrate | integer |
Communication speed, baud/s |
No |
9600 |
300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200 |
|
databits | integer |
Data bit count for communication |
No |
8 |
6 |
9 |
stopbits | integer |
Stop bit count for communication |
No |
1 |
1 |
2 |
parity |
string |
Communication parity option |
No |
none |
none, even, odd
|
|
flowcontrol |
string |
Number of requests, before link is considered lost (device status signals are changed) and reconnect attempt will be issued |
No |
none |
none
|
|
link_address | integer | Destination address when in transmit and source address when broadcasting | Yes | 0 | 65535 | |
link_size | integer | Link address size in bytes | No | 1 | 1 | 2 |
asdu_address | integer | Application Service Data Unit address | Yes | 0 | 65535 | |
asdu_size | integer | Common address size in bytes | No | 1 | 1 | 3 |
ioa_size | integer | Information object address (IOA) size in bytes | No | 2 | 1 | 3 |
cot_size | integer | Cause of transmission (COT) size in bytes | No | 1 | 1 | 2 |
time_sync_interval_sec | integer | Defines how often (in seconds) slave will request time synchronization. If greater than 0 slave will request synchronizations, will reset timer if master did it earlier. If 0 slave won’t request timesyncs, but will allow them. If 1 timesyncs are not supported requests will be dropped. |
No | 60 | ||
gi_interval_sec | integer | Time frame between General Interrogation requests in seconds, if 0 requests are disabled | No | 300 |
|
|
scan_rate_ms | integer |
Polling interval in milliseconds. Time frame between two telegrams from master |
No | 100 | ||
timeout_ms | integer |
Response timeout in milliseconds |
No |
1000 |
|
|
retry_count | integer |
Number of retries of failed requests before announcing that device is in Error state |
No | 1 |
IEC 60870-5-101 master parameters for Signals tab
Parameter |
Type |
Description |
Required |
Default Value (when not specified) |
Range |
|
Min | Max | |||||
signal_name |
string |
User-friendly signal name |
Yes | |||
device_alias |
string |
Alphanumeric string to identify a device |
Yes | |||
signal_alias |
string |
Unique alphanumeric name of the signal to be Yes used |
Yes | |||
source_device_alias |
string |
device_alias of a source device |
For commands | |||
source_signal_alias |
string |
signal_alias of a source signal |
For commands |
|||
enable | boolean |
Enabling/disabling of an individual signal |
No | 1 | 0 | 1 |
log |
integer |
Allow signal to be logged. If log is 0 signal will not be logged. If log is more than 0 signal will be logged |
No | 0 | ||
gi | boolean | Including/excluding (1 or 0) signal from General Interrogation | No | 0 | 0 | 1 |
common_address | integer | Address of a destination device | Yes | |||
info_address | integer | Information object address | Yes | |||
data_type | integer | ASDU type identificator | Yes |
IEC 60870-5-101 has an additional signal which can be configured to show communication status. It is used to indicate if the slave device has disconnected from master (WCC Lite). To configure such signal, two columns should be filled with particular values. To a newly created additional signal one should make job_todo equal to device_status and tag_job_todo equal to communication_status.
Debugging a IEC 60870-5-101 Master application
If configuration for IEC 60870-5-101 devices is set up, handler for protocol will start automatically. If the configuration is missing or contains errors, protocol will not start. It is done intentionally decrease unnecessary memory usage.
If IEC 60870-5-101 does not work properly (e.g. no communication between devices, data is corrupted, etc.), a user can launch a debug session from command line interface and find out why link is not functioning properly. To launch a debugging session, a user should stop iec101-master process and run iec101-master command with respective flags as shown in the table below.
Procedure for IEC 60870-5-101 master service debugging:
-
Step 1: Service must be stopped by entering the following command into the wcclite:
/etc/init.d/iec101-master stop -
Step 2: After service is stopped it must be started with the preferred configuration file (JSON
files found in /etc/ folder) and a debug level 7: iec101-master -c /etc/iec101-master/iec101master.json -d7
Additional output forming options described here: Command line arguments. -
Step 3: Once the problem is diagnosed normal operations can be resumed with the following
command: /etc/init.d/iec101-master start
IEC 60870-5-101 command line debugging options
-h [ –help ] Display help information
-V [ –version ] Show version
-d<debug level> Set debugging level
-c [ –config ] Config path
-r [ –raw ] Show raw telegram data
-f [ –frame ] Show frame data
-R [ –readyfile ] Ready notification file
Configuring datapoints (slave)
To use IEC 60870-5-101 Slave in WCC Lite, it has to configured via an Excel configuration. This configuration contains two Excel sheets where parameters have to be filled in Devices and Signals.
IEC 60870-5-101 slave parameters for Devices tab
Parameter |
Type |
Description |
Required |
Default Value (when not specified) |
Range |
|
Min | Max | |||||
name |
string |
User-friendly name for a device |
Yes | |||
description |
string |
Description of a device |
No | |||
device_alias |
string |
Alphanumeric string to identify a device |
Yes | |||
enable | boolean |
Enabling/disabling of a device |
No | 1 | 0 | 1 |
protocol | string |
Protocol to be used |
Yes | IEC 60870-5-101 slave | ||
device |
string |
Communication port |
Yes |
|
PORT1 |
PORT2 |
baudrate | integer |
Communication speed, baud/s |
No |
9600 |
300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200 |
|
databits | integer |
Data bit count for communication |
No |
8 |
6 |
9 |
stopbits | integer |
Stop bit count for communication |
No |
1 |
1 |
2 |
parity |
string |
Communication parity option |
No |
none |
none, even, odd |
|
flowcontrol |
string |
Number of requests, before link is considered lost (device status signals are changed) and reconnect attempt will be issued |
No |
none |
none
|
|
link_address | integer | Destination address when in transmit and source address when broadcasting | Yes | 0 | 65535 | |
link_size | integer | Link address size in bytes | No | 1 | 1 | 2 |
asdu_size | integer | Common address size in bytes | No | 1 | 1 | 3 |
ioa_size | integer | Information object address (IOA) size in bytes | No | 2 | 1 | 3 |
cot_size | integer | Cause of transmission (COT) size in bytes | No | 1 | 1 | 2 |
time_sync | boolean | Allow time synchronization, 1 to enable and 0 to disable | No | 0 | 0 | 1 |
sp_time | boolean | Add CP56Time2a information to single point signals, 1 to enable and 0 to disable | No | 0 | 0 | 1 |
dp_time | boolean | Add CP56Time2a information to double point signals, 1 to enable and 0 to disable | No | 0 | 0 | 1 |
me_time | boolean | Add CP56Time2a information to measurements, 1 to enable and 0 to disable | No | 0 | 0 | 1 |
message_size | integer | Maximum length of a message | Yes | 0 | 255 | |
cache_size | integer | Maximum number of events to store in a buffer | No | 100 | 0 | 1000 |
respond_delay | integer | Time in microseconds to wait before sending responses | Yes | 0 | 1000000 | |
single_byte_ack | boolean | Use single character acknowledge, 1 to enable and 0 to disable |
No |
0 | 0 | 1 |
keep_alive_timeout | integer | Time interval in seconds before serial connection is considered offline |
No |
60 |
keep_alive_timeout timer is used for connection tracker to display protocol status. This parameter has no effect on protocol functionality and is only used to track it’s status in connection tracker.
IEC 60870-5-101 slave parameters for Signals tab
Parameter |
Type |
Description |
Required |
Default Value (when not specified) |
Range |
|
Min | Max | |||||
signal_name |
string |
User-friendly signal name |
Yes | |||
device_alias |
string |
Alphanumeric string to identify a device |
Yes | |||
signal_alias |
string |
Unique alphanumeric name of the signal to be Yes used |
Yes | |||
source_device_alias |
string |
device_alias of a source device |
For commands | |||
source_signal_alias |
string |
signal_alias of a source signal |
For commands |
|||
enable | boolean |
Enabling/disabling of an individual signal |
No | 1 | 0 | 1 |
log |
integer |
Allow signal to be logged. If log is 0 signal will not be logged. If log is more than 0 signal will be logged |
No | 0 | ||
gi | boolean | Including/excluding (1 or 0) signal from General Interrogation | No | 0 | 0 | 1 |
common_address | integer | Address of a destination device | Yes | |||
info_address | integer | Information object address | Yes | |||
data_type | integer | ASDU type identificator | Yes |
IEC 608705101 has an additional signal which can be configured to show communication status. It is used to indicate if the slave device has disconnected from master (WCC Lite). To configure such signal, two columns should be filled with particular values. To a newly created additional signal one should make job_todo equal to device_status and tag_job_todo equal to communication_status.
Debugging a IEC 608705101 Master application
If configuration for IEC 60870-5-101 devices is set up, handler for protocol will start automatically. If the configuration is missing or contains errors, protocol will not start. It is done intentionally decrease unnecessary memory usage.
If IEC 60870-5-101 does not work properly (e.g. no communication between devices, data is corrupted, etc.), a user can launch a debug session from command line interface and find out why link is not functioning properly. To launch a debugging session, a user should stop iec101-slave process and run iec101-slave command with respective flags as shown in the table below.
Procedure for IEC 60870-5-101 slave service debugging:
-
Step 1: Service must be stopped by entering the following command into the wcclite:
/etc/init.d/iec101-slave stop -
Step 2: After service is stopped it must be started with the preferred configuration file (JSON
files found in /etc/ folder) and a debug level 7: iec101-slave-c /etc/iec101-slave/iec101slave.json -d7
Additional output forming options described here: Command line arguments. -
Step 3: Once the problem is diagnosed normal operations can be resumed with the following
command: /etc/init.d/iec101-slave start
IEC 60870-5-101 command line debugging options
-h [ –help ] Display help information
-V [ –version ] Show version
-d<debug level> Set debugging level
-c [ –config ] Config path
-r [ –raw ] Show raw telegram data
-f [ –frame ] Show frame data
-R [ –readyfile ] Ready notification file