# 14.3 IEC 60870-5-101 Slave ### Configuring datapoints (slave) The IEC 60870­-5­-101 Slave in WCC Lite has to be configured in Excel. This configuration contains two Excel sheets where parameters must 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 stringUser-friendly name for a device Yes
description stringDescription of a device No
device\_alias stringAlphanumeric string to identify a device Yes
enablebooleanEnabling/disabling of a device No101
protocolstringProtocol to be used Yes IEC 60870­-5-101 slave
devicestring Communication port Yes PORT1 PORT2
baudrateintegerCommunication speed (bauds/s) No 9600 300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200
databitsintegerData bit count for communication No 8 6 9
stopbitsintegerStop bit count for communication No 1 1 2
paritystring Communication parity option No none none, even, odd
flowcontrolstring Number of requests, before the link is considered lost (device status signals are changed) and reconnect attempt will be issued No none none
link\_addressintegerDestination address when in transmit and source address when broadcastingYes 065535
link\_sizeintegerLink address size in bytesNo112
asdu\_sizeintegerCommon address size in bytesNo112
ioa\_sizeintegerInformation object address (IOA) size in bytesNo213
cot\_sizeintegerCause of transmission (COT) size in bytesNo112
time\_syncbooleanAllow time synchronization, 1 to enable and 0 to disableYes 01
message\_sizeintegerMaximum length of a messageNo2530255
cache\_sizeintegerMaximum number of events to store in a bufferNo10001000
respond\_delayintegerTime in microseconds to wait before sending responsesNo10001000000
single\_byte\_ackbooleanUse single character acknowledge, 1 to enable and 0 to disableNo 001
keep\_alive\_timeoutintegerTime interval in seconds before serial connection is considered offlineNo 60
**keep\_alive\_timeout** timer is used for the connection tracker to display protocol status. This parameter does not affect protocol functionality and only tracks its status in the 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 stringUser-friendly signal name Yes
device\_alias stringAlphanumeric string to identify a device Yes
signal\_alias stringUnique alphanumeric name of the signal to be Yes used Yes
source\_device\_alias stringdevice\_alias of a source device For commands
source\_signal\_alias stringsignal\_alias of a source signal For commands
enablebooleanEnabling/disabling of an individual signal No101
log integerAllow signal to be logged. If the **log is 0, the signal** will not be logged. If the **log is more than 0, the** signal will be logged No0
gibooleanIncluding/excluding (1 or 0) signals from General InterrogationNo001
common\_addressintegerAddress of a destination deviceYes
info\_addressintegerInformation object addressYes
data\_typeintegerASDU type identifierYes
1, 2, 3, 4, 5, 6, 9, 10, 11, 12, 13, 14, 30, 31, 32, 34, 35, 36, 45, 46, 47, 48, 49, 50, 58, 59, 60, 61, 62, 63
periodic\_update\_msintegerSignal value is published periodically according to the value set.No-
-
##### Device status signals
IEC 60870-­5-­101 has an additional signal which can be configured to show communication status. It indicates if the master device has disconnected from the slave (WCC Lite). To configure such signal for IEC 60870-­5-­101 protocol, job\_todo and tag\_job\_todo fields with string values are required. For IEC 60870-­5-­101 slave required parameters for status, signal will be **signal\_name** **device\_alias, signal\_alias, common\_address, info\_address, data\_type, job\_todo** and **tag\_job\_todo**. Job\_todo value must be *device\_status* and for tag\_job\_todo there are 4 variations: communication\_status, device\_running, device\_error, uknown\_error. Each signal has 4 possible values and is based on the same logic. If the signal returns the value of 0, it means an unknown error has appeared, 1 – the device or protocol connection is on and working properly, 2 – the device is off or protocol is disconnected, and 3 – the error or service is down. ### Debugging an IEC 60870-­5­-101 slave application If the configuration for IEC 60870-­5-­101 devices is set up, the handler for the protocol will start automatically. If the configuration is missing parameters or contains errors, the protocol will not start. It is done intentionally to 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 the command-line interface and find out why the link is not functioning properly. To launch a debugging session, a user should stop the *iec101­-slave* process and run the *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 WCC Lite: ``` /etc/init.d/iec101-slave stop ``` - **Step 2**: After the 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/iec101-slave.json -d7 ``` Additional output forming options are 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 Set debugging level

-c [ –config ] Config path

-e [ –redis ] Show redis debug information ```