SYS600 - IEC 60870-5-101 Slave Protocol
SYS600 - IEC 60870-5-101 Slave Protocol
SYS600 - IEC 60870-5-101 Slave Protocol
3
IEC 60870-5-101 Slave Protocol
Trace back information:
Workspace Main version a9
Checked in 2012-11-09
1MRS756653 MicroSCADA Pro SYS 600 9.3
Issued: 31.3.2010 IEC 60870-5-101 Slave Protocol
Version: B/30.9.2012
Configuration Manual
Contents
1 Copyrights ............................................................................................. 5
2 Introduction ........................................................................................... 6
2.1 This manual .................................................................................. 6
2.2 Use of symbols ............................................................................. 6
2.3 Related documents ....................................................................... 7
2.4 Document revisions ...................................................................... 8
4 Instructions ........................................................................................... 11
4.1 Communication ............................................................................. 11
4.2 Installation ..................................................................................... 11
4.3 Configuration ................................................................................ 11
4.3.1 Base system configuration .............................................. 11
4.3.2 Communication system configuration ............................. 12
4.3.2.1 IEC 60870-5-101 line layer ........................... 14
4.3.2.2 IEC 60870-5-101 station object .................... 23
4.3.2.3 Redundant line attributes .............................. 36
4.3.2.4 Autodialling attributes .................................... 38
4.3.2.5 File transfer attributes ................................... 42
4.4 After configuration ......................................................................... 49
4.5 How to test the configuration ........................................................ 49
4.6 Serial cable wiring diagram ........................................................... 50
3
SYS 600 9.3 MicroSCADA Pro 1MRS756653
Appendices
4
1MRS756653 MicroSCADA Pro SYS 600 9.3
Issued: 31.3.2010 IEC 60870-5-101 Slave Protocol
Version: B/30.9.2012
Configuration Manual
1 Copyrights
The information in this document is subject to change without notice and should not be
construed as a commitment by ABB Oy. ABB Oy assumes no responsibility for any
errors that may appear in this document.
In no event shall ABB Oy be liable for direct, indirect, special, incidental or consequential
damages of any nature or kind arising from the use of this document, nor shall ABB Oy
be liable for incidental or consequential damages arising from the use of any software
or hardware described in this document.
This document and parts thereof must not be reproduced or copied without written
permission from ABB Oy, and the contents thereof must not be imparted to a third party
nor used for any unauthorized purpose.
The software or hardware described in this document is furnished under a license and
may be used, copied, or disclosed only in accordance with the terms of such license.
Copyright © 2012 ABB Oy. All rights reserved.
Trademarks
ABB is a registered trademark of ABB Group. All other brand or product names
mentioned in this document may be trademarks or registered trademarks of their respective
holders.
Guarantee
Please inquire about the terms of guarantee from your nearest ABB representative.
Third Party Copyright Notices
This software uses pugixml library (http://pugixml.org). pugixml is Copyright ©
2006-2012 Arseny Kapoulkine.
5
SYS 600 9.3 MicroSCADA Pro 1MRS756653
2 Introduction
Figure 2.1: The IEC master sees the NET unit and the process behind it as a slave
The data from the process activates a certain event channel and a command procedure
in the base system. This command procedure sends the information forward to the NET
unit and the IEC master.
6
1MRS756653 MicroSCADA Pro SYS 600 9.3
Issued: 31.3.2010 IEC 60870-5-101 Slave Protocol
Version: B/30.9.2012
Configuration Manual
Tip icon indicates advice on, for example, how to design your
project or how to use a certain function.
Although warning hazards are related to personal injury, and caution hazards are
associated with equipment or property damage, it should be understood that operation
of damaged equipment could, under certain operational conditions, result in degraded
process performance leading to personal injury or death. Therefore, comply fully with
all warnings and caution notices.
7
SYS 600 9.3 MicroSCADA Pro 1MRS756653
8
1MRS756653 MicroSCADA Pro SYS 600 9.3
Issued: 31.3.2010 IEC 60870-5-101 Slave Protocol
Version: B/30.9.2012
Configuration Manual
3 Safety information
This section gives information about the prevention of hazards and taking backups from
the system.
System backup
Usually a system back up is taken after the application is made. It should be taken again
when changes are made to the SYS 600 system. This is needed, for example, when the
driver configuration or the network setup is changed.
Application backup
An application backup is also taken at the same time with the system backup, after the
application is made. It should be taken again when changes are made to the application,
for example if pictures or databases are edited or new pictures are added.
Handling
In case of a fatal error:
1. Write down the possible SYS 600 error messages.
2. Shut down the SYS 600 main program. If this cannot be done in the SYS 600 Control
Panel, try to end the task in Windows Task Manager.
9
SYS 600 9.3 MicroSCADA Pro 1MRS756653
3. The data kept in the main memory at the moment of a fatal error is placed in the
drwtsn32.log file with Windows 2003 Server, Windows XP and earlier. By default
it is placed under %SYSTEMDRIVE%\Documents And Settings\All
Users\Application Data\Microsoft\Dr Watson. Log and dump file paths can be
checked with the drwtsn32 application. (Start -> run -> drwtsn32.exe). Analyze and
copy the data in these files.
Starting with Windows Server 2008 and Windows 7 the crash handling has changed.
The location of the dump files can be read from the registry under the key
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error
Reporting\LocalDumps. The DumpFolder value tells the location of the dump files.
Collect the data from this location.
4. Restart the system.
Report the program break-down together with the possible SYS 600 error messages and
the information from the drwtsn32.log file to the SYS 600 supplier.
Status codes
Error messages in SCIL are called status codes. A list of status codes and short
explanations can be found in SYS 600 Status Codes.
10
1MRS756653 MicroSCADA Pro SYS 600 9.3
Issued: 31.3.2010 IEC 60870-5-101 Slave Protocol
Version: B/30.9.2012
Configuration Manual
4 Instructions
4.1 Communication
In SYS 600 the IEC 60870-5-101 Slave protocol is implemented only in the PC-NET
software. PC-NET unit communicates over an INTEGRATED link and via the serial or
LAN ports of the base system computer.
Setting the attributes of SYS 600 system objects can modify the communication
parameters.
The base system sees each IEC device as a station (STA object) that has been created to
a line of a NET unit. Each IEC station works as a protocol converter that converts data
between the internal protocol of SYS 600 and the IEC 60870-5-101 protocol.
4.2 Installation
The SYS 600 installation is required.
4.3 Configuration
Configuration can be made either by using the System Configuration Tool or by using
SCIL statements. For more information of the System Configuration Tool, see SYS 600
System Configuration manual, chapter 'PC-NET start-up with System Configuration
Tool' and 'System Configuration Tool'. The usage of the System Configuration Tool is
recommended but if there is a need to create the communication configuration using
SCIL, it is instructed in the following chapters. In this case, the configuration can be
divided into two parts:
• Base system configuration
• Communication system configuration
The attribute descriptions presented in chapter 'Communication system configuration'
are the same for configurations created with System Configuration Tool or with SCIL.
It is assumed here that the base system configuration for other objects but the
communication has been made according to the instructions in the System Configuration
manual.
The extra steps needed to configure the communication are:
1. Define a node number for a PC_NET instance
2. Reserve a link number a PC_NET instance. Creating the link as instructed in step
6 will start the PC_NET instance
11
SYS 600 9.3 MicroSCADA Pro 1MRS756653
3. Create the basesystem STA object for each remote IED (master function) or for
each NCC connection (slave function)
• IEC 60870-5-101 Slave protocol uses the station type IEC (STY type 29)
The STA objects are created to SYS_BASCON.COM using template or with a
separate creation sequence. If the template is not used, the sequence should contain
a line
#create STA'Sta_Nb':B = %Sta
where 'Sta_Nb' is the number of the station object in the basesystem. %Sta is a list
object which should contain at least the following settings: TT = "EXTERNAL",
ST = station type, ND = node number defined in step 1 and TN = translated object
number (usually the same as 'Sta_Nb'. See SYS600 System Objects manual for more
information about the basesystem object attributes for STA object).
4. Edit the PC_NET.CF1 according to the description of chapter 'Start-up definition
file PC_NET.CF1' in the SYS600 System Configuration manual
5. Create a command procedure which will create the lines and stations to the NET
object (= pc_net instance) using the S-attributes.
See Section 4.3.2 Communication system configuration for more information about
the attribute setting. A sample creation script is presented at the end of this manual.
6. Create a command procedure which will create the link of type 'INTEGRATED' to
the basesystem. This procedure should contain a line
#set LIN'i_Integrated_Link_Number':BLT = "INTEGRATED"
Each NET instance contains a set of system objects which specify the existence and the
usage of the communication lines and the station objects connected to those lines. These
objects can be created, modified and deleted by SCIL, and setting the attributes will
define the functionality of these objects.
Access to the attributes can be one of the following:
12
1MRS756653 MicroSCADA Pro SYS 600 9.3
Issued: 31.3.2010 IEC 60870-5-101 Slave Protocol
Version: B/30.9.2012
Configuration Manual
• Read-only: The attribute can only be read. There are still a few exceptions in which
the values can be reset.
• Write-only: The attribute can only be written (set).
• Read, conditional write: The attribute can be both read and written, but the object
must be set out of use (IU = 0) before writing.
• No limitations: The attribute can be both read and written without limitations.
The implementation of the Configuration Manual in SYS 600 can be divided into two
layers: line layer and station layer. Both of these layers have a specific functionality and
a set of attributes of their own.
The purpose of the communication system configuration is to:
• Create all the system objects needed to establish communication between the master
and the slave.
• Adjust the values of the system object attributes to match the physical communication
channel and the properties of the remote partner / partners
Network topologies
The implementation of the IEC 60870-5-101 Slave protocol in SYS 600 supports direct
and serial bus topologies. The direct topology (point-to-point) can be a direct physical
cable from point-to-point or a two-node radio, or modem network. The serial bus topology
(multi-drop) is commonly made up of many modems with their outputs/inputs tied
together, or by using a star-coupler.
13
SYS 600 9.3 MicroSCADA Pro 1MRS756653
When making the IEC connection, an agreement about the used communication
parameters should be made with the supplier or owner of the master system.
The line process of a NET unit performs the functions of the line layer. The purpose of
the line layer is to send and receive messages with external devices using the IEC
60870-5-101 protocol. The line layer provides frame synchronization and link control.
According to the IEC 60870 standards, the line layer performs the following functions:
• Provides access to the transmission medium.
• Serialises and deserialises frames.
• Adds and removes frame delimiters if not performed by data circuit terminating
equipment.
• Detects frame synchronisation errors.
• Detects frame size errors.
• Monitors signal distortion if not performed by data circuit terminating equipment.
• Recognises frames addressed to a designated station.
14
1MRS756653 MicroSCADA Pro SYS 600 9.3
Issued: 31.3.2010 IEC 60870-5-101 Slave Protocol
Version: B/30.9.2012
Configuration Manual
PO Protocol
The data transfer protocol used on the line. The line is defined to the NET by setting
this attribute. By setting the attribute to 0 the line definition including all the line attrib-
utes are deleted.
Data type: Integer
Value: 0...45
Value with IEC 60870-5-101 Slave protocol: 29 (unbalanced mode)
or 30 (balanced mode)
Index range: 1...12 (NET line numbering)
Access: Read, conditional write
15
SYS 600 9.3 MicroSCADA Pro 1MRS756653
BR Baud Rate
Transmission rate used on the line.
Data type: Integer
Value: 1...19200 (384 = 38400 bauds, 576 = 57600 bauds)
Unit: Bits / s
Index range: 1...12 (NET line numbering)
Default value: 9600
Access: Read, conditional write
PY Parity
Specifies the parity check (if any) used for the characters transferred on the line.
Data type: Integer
Value: 0 = no parity check
1 = odd parity
2 = even parity
Index range: 1...12 (NET line numbering)
Default value: 2
Access: Read, conditional write
16
1MRS756653 MicroSCADA Pro SYS 600 9.3
Issued: 31.3.2010 IEC 60870-5-101 Slave Protocol
Version: B/30.9.2012
Configuration Manual
SB Stop Bits
Specifies the number of stop bits attached to each transmitted character.
Data type: Integer
Value: 1 or 2
Unit: Stop bits
Index range: 1...12 (NET line numbering)
Default value: 1
Access: Read, conditional write
PD Polling Delay
Delay between polling messages. The purpose of this attribute depends on the commu-
nication mode.
In the unbalanced mode this attribute is used only to detect if the master is polling the
slave. This watchdog is not used when PD is set to 0. If PD value is larger than 0 and
no polls are received between two expirations of the PD timer, the status of the line is
reported to be 'not OK'. In practice, this means that the time from line disconnection to
reporting is 2 x PD. The status of the line and the stations are reported to be 'not OK'
also if the PD value is larger than 0 in the unbalanced mode and the count of the sub-
sequent 'Request status of link' message reaches the value defined with line attribute
EN. This function can be used to reveal a situation in which the communication line
operates in one direction only.
In the balanced mode, the link layer of the protocol checks the state of the communica-
tion if the time between two consecutive messages is more than the value of the PD
attribute.
Data type: Integer
Value: 0... 65535
Unit: Milliseconds
17
SYS 600 9.3 MicroSCADA Pro 1MRS756653
DE CTS Delay
Maximum waiting time of the rising edge of the CTS signal after the activation of the
RTS signal. Timeout will cause a CTS error and the transmission will not start. A line
disconnection often leads to CTS error.
Data type: Integer
Value: 0...65535
Unit: Milliseconds
Index range: 1...12 (NET line numbering)
Default value: 50
Access: Read, conditional write
HT Header Timeout
Specifies the maximum waiting time in milliseconds within which the first byte of a
line layer response from the IEC slave should have been received after the transmission
of a message. If no response has been received within this time, new attempts are per-
formed the number of times specified by the Enquiry limit. If no response is still ob-
tained, the station will be suspended.
Data type: Integer
Value: 0...65535
Unit: Milliseconds
Index range: 1...12 (NET line numbering)
Default value: 2000
18
1MRS756653 MicroSCADA Pro SYS 600 9.3
Issued: 31.3.2010 IEC 60870-5-101 Slave Protocol
Version: B/30.9.2012
Configuration Manual
TI Response Timeout
The time in seconds that the IEC link waits for the end of the line layer response.
Data type: Integer
Value: 0...255
Unit: Seconds
Index range: 1...12 (NET line numbering)
Default value: 2
Access: No limitations
EN Enquiry Limit
Specifies the maximum number of times that a message is retransmitted after a timeout.
In the unbalanced mode, the attribute specifies the maximum amount of subsequent
'Request status of link' messages before the line is reported to be not OK. This function
is active only if the value of the line attribute PD is bigger than 0, see also the corres-
ponding attribute description.
Data type: Integer
Value: 1...255
19
SYS 600 9.3 MicroSCADA Pro 1MRS756653
SG Modem Signal
An attribute for direct supervision and control of the state of the modem signal. The
attribute applies to all protocols. It is used for diagnostics and testing.
Data type: Integer
Value: 0 = Passive signal
1 = active signal
Index range: 100 * line no + signal no. Signal no. 5 = CTS, 8 = DCD, 20 = DTR
Access: Read-only
MI Message Identification
Object address of system messages.
Data type: Integer
Value: 1...32760
Index range: 1...12 (NET line numbering)
Default value: 6000 + (100 * NET number) + line number
Access: Read, conditional write
MS Message Application
The number of the application that is the receiver of the system messages generated by
the line.
Data type: Integer
Value: 1...250
Default value: 1
Index range: 1...12 (NET line numbering)
Access: Read, conditional write
Example:
In the example of SYS_BASCON.COM earlier in this chapter, the number of the
message application is 1.
LK Link Type
The type of data link connection used on the line. This attribute controls the behaviour
of the RTS-control line.
Data type: Integer
20
1MRS756653 MicroSCADA Pro SYS 600 9.3
Issued: 31.3.2010 IEC 60870-5-101 Slave Protocol
Version: B/30.9.2012
Configuration Manual
CB Carrier Blocking
This attribute determines whether the incoming Carrier Detect (DCD) signal of the
serial port must be set in order for the IEC line to receive messages. If Carrier Detect
is expected (CB=1),the incoming bytes of the messages are discarded while the DCD
signal is not set. Historically, the Carrier detect was used with modems (e.g. V.23) in
order to indicate the direction of the data flow and filter out corrupted characters when
the data flow direction changes. A hardware solution is to connect the DCD pin to DTR
pin in the RS-232 cable, in this case the messages are always received when th line is
in use (IU=1). In versions 9.3FP2 and newer, line attribute CM, bit 2 can be used to
achieve the same effect. The usage of line attribute CM is recommended since it is
supported by all serial protocols.
Data type: Integer
Value: 0 = Carrier blocking not used, messages are received regardless of
the DCD state
1 = Carrier blocking used, DCD must be signaled in order to receive
messages
Default value: 1
Index range: 1...12 (NET line numbering)
Access: Read, conditional write
DC Diagnostic Counters
The line protocols gather statistical information about the events on the lines by incre-
menting a number of diagnostic counters. All the major events and error situations of
the communication have their own counters.
When accessing diagnostic counters, the attribute is indexed according to the formula:
100 * (line number) + (diagnostic counter number)
The IEC 60870-5-101 Slave protocol supports the following counters:
1. Transmitted telegrams
21
SYS 600 9.3 MicroSCADA Pro 1MRS756653
2. Failed transmissions
4. Transmitted commands
5. Transmitted replies
11. Received messages
12. Parity errors
13. Overrun errors
14. Check sum errors
15. Framing errors
16. Buffer overflow errors
Data type: Integer
Value: 0...30000
Index range: See above
Access: Read-only, the values can be reset
OM Operating Mode
This attribute consists of a set of flags which control the behaviour and functionality
of the IEC line. Each flag is one bit of this attribute. The bits are the following:
Data type: Integer
Value: 0..65535
Index range: 1...12 (NET line numbering)
Default value: 0
Access: Read, conditional write (No limitations in balanced mode)
Bit 0: Balanced mode handshake
When this bit is 0, the sending of the handshaking messages (request,
status of link, reset of remote link) are NOT restarted when a ‘request
status of link’ message is received from the remote end.
When the bit is 1, the sending of the handshaking messages are restar-
ted when a ‘request status of link’ message is received. Notice, that
if SYS 600 is used in both ends, only one of them should have this
bit set. This bit is meaningful only in the balanced modes.
22
1MRS756653 MicroSCADA Pro SYS 600 9.3
Issued: 31.3.2010 IEC 60870-5-101 Slave Protocol
Version: B/30.9.2012
Configuration Manual
The main purpose of the station layer is the protocol conversion between the IEC
60870-5-101 and the internal protocol of SYS 600. The station objects also takes care
of the application level communication with the master.
The STA objects created in a NET unit perform the functions of the station object. Several
STA objects of the type IEC devices are allowed on the same line. It is also possible that
multiple station shares the same remote IP-address.
The STA objects created in a NET unit perform the functions of the station object. Some
attributes are used for the station configuration, others are used for device communication.
The configuration attributes are presented in this chapter and the communication attributes
in the next one.
Station attributes
The following attributes can be used for configuring the IEC 60870-5-101 Slave stations
in SYS 600.
IU In Use
Indicates whether the station is in use (value 1) or not in use (value 0).
Data type: Integer
Value: 0 or 1
Default value: 0
23
SYS 600 9.3 MicroSCADA Pro 1MRS756653
Access: No limitations
LI Line Number
The number of the NET line the station is connected to. This attribute is also used for
setting the number of the back-up line, if redundant IEC lines are used. Note that indexes
1 and 2, i.e. the main and back-up line numbers, are switched when a line switch oper-
ation is executed.
Data type: Integer
Value: 1...12 (NET line numbering)
Indexing: None if redundant lines are not used
Index 1 is for the number of the main line
Index 2 is for the number of the back-up line
Access: Read, conditional write
PA Polling Address
The link address of the IEC 60870-5-101 Slave station.
Data type: Integer
Value: 0...254, when PL attribute = 1
0…65535, when PL attribute = 2
Default value: 1
Access: Read, conditional write
SA Station Address
The station address of the IEC 60870-5-101 Slave station, the common address of
ASDU in an IEC message.
24
1MRS756653 MicroSCADA Pro SYS 600 9.3
Issued: 31.3.2010 IEC 60870-5-101 Slave Protocol
Version: B/30.9.2012
Configuration Manual
AL Allocation
25
SYS 600 9.3 MicroSCADA Pro 1MRS756653
Allocates the station to an application. When the AL attribute has the value 1, the station
is reserved by the application specified by the AS attribute. All the spontaneous messages
from the station are sent to this application.
Data type: Integer
Value: 0 or 1
Access: No limitations
AS Allocating Application
Specifies the allocating application of the station (see the AL attribute). The allocating
application will get all the spontaneous process data from the station. This application
is also the only one that is allowed to set the device communication attributes
Data type: Integer
Value: 0...250,
0 = no application
Access: Read-only , conditional write
MI Message Identification
Object address of system messages.
Data type: Integer
Value: 1...32760
Default value: 29000 + station number
Access: No limitations
MS Message Application
The number of the application, that is the receiver of the system messages generated
by the line.
Data type: Integer
Value: 1...250
Default value: 1
Access: No limitations
26
1MRS756653 MicroSCADA Pro SYS 600 9.3
Issued: 31.3.2010 IEC 60870-5-101 Slave Protocol
Version: B/30.9.2012
Configuration Manual
CA Command Address
The object address of bit stream process object in the SYS 600 process database, where
unidentified messages are sent.
Data type: Integer
Value: 1 … 65535
Default value: 32000
Access: No limitations
The unit number (UN attribute) of the bit stream process object
must be the same as the STA object number.
CD Command Delay
The Command Delay attribute specifies the maximum delay for timestamped commands.
If the timestamp of the incoming command message indicates that the transmission
delay has been bigger than the value defined with this attribute, the command is not
accepted. The attribute defines a time window in which the timestamped command is
accepted.
IEC Station attribute CC controls how the “summer time” bit of the incoming command
is handled. See the corresponding description for more information.
The value of the NET node attribute TZ (Time zone) is used to compensate the
timestamps of different time zone.
The timestamped control commands are normally used only in IEC60870-5-104 and
not in IEC60870-5-101.
Value: 0...65535
Unit: Milliseconds
Default: 1000
Access: Read/Write
Example
If STA1:SCD is 2000, only the command with timestamps +-2000 ms around the current
time of the slave computer is accepted.
ML Maximum Message Length
27
SYS 600 9.3 MicroSCADA Pro 1MRS756653
The maximum amount of octets containing information objects. The link header includ-
ing link address and The Application Protocol Control Information (APCI) fields and
Data Unit Identifier fields are excluded from this value. This attribute is automatically
set to a smaller value if the total message length would exceed 253 bytes with the given
value.
Data type: Integer
Value: 20...255
Default value: 253
28
1MRS756653 MicroSCADA Pro SYS 600 9.3
Issued: 31.3.2010 IEC 60870-5-101 Slave Protocol
Version: B/30.9.2012
Configuration Manual
Example 1.
STA1:SEA1=65535 ; Event buffer overflow event is sent to address
65535
STA1:SEA2=80
When event buffer overflow event has been sent, the same event is sent again not until
the total amount of events has gone under or equal to 80% of the total event buffering
space.
XT eXecute Timeout
The maximum time an execute command is waited after a select command. The value
is meaningful only if the bit 4 of the RM attribute is not set. See the RM attribute de-
scription for further information.
Data type: Integer
Value: 0... 65
Unit: Seconds
Default: 30
Access: No limitations
CF ConFirmation Mode
The waiting of the activation termination message. With value 0, the timer defined with
the CT attribute is not started. Value 0 is needed with some IEC 60870-5-101 Slave
implementations, which do not send activation termination messages at all.
Data type: Integer
Value: 0 = Activation termination is not waited
1 = Activation termination is waited
Default value: 1
Access: No limitations
29
SYS 600 9.3 MicroSCADA Pro 1MRS756653
TC Time Synchronization
Determines the behaviour of the slave device when it receives a time synchronization
message as follows:
Data type: Integer
Value: 0...3
0 = The synchronization message is handled and the clock of the base
system is set to the received time. The synchronisation message is not
sent to the process database.
Value 1 = The clock of the base system is set to the received time and
the synchronisation message is also sent to the process database (to
a bit stream process object with address as defined by the CA attrib-
ute).
Value 2 = The clock of the base system is not set, but the synchronisa-
tion message is sent to the process database.
Value 3 = Synchronisation messages are not handled at all.
Default value: 1
Access: No limitations
IV Invalid Time
The "invalid time" information in timestamped messages will follow the value of this
attribute. When a time synchronization is received from IEC60870-5-101/IEC60870-
5-104 line, this attribute is set to value 0 and the timestamped messages are transmitted
with valid time. If the application writes value 1 to this attribute, the timestamped
messages are transmitted with invalid time. If value 0 is written, messages will be
transmitted with valid time. This attribute is useful if e.g. the connection to GPS making
the synchronization is lost. If IV attribute is not written from application, "invalid time"
bit behaves as described in RM attribute bit 1.
Data type: Integer
Value: 0 or 1
Indexing: No
Access: No limitations
RM Running Mode
Consists of a set of flags that control the behaviour and functionality of the IEC Slave
station. Each flag is one bit of this attribute. The bits are as follows:
30
1MRS756653 MicroSCADA Pro SYS 600 9.3
Issued: 31.3.2010 IEC 60870-5-101 Slave Protocol
Version: B/30.9.2012
Configuration Manual
Bit 0: The hour transmission method of the events from the slave station.
When this bit is 0, the slave device sends a spontaneous clock syn-
chronisation message (ASDU 103) to the master whenever the hour
changes. When this bit is 1, the synchronisation message is not sent
and the master can add its own time to events.
Bit 1: Time synchronisation method. When this bit is 0, the slave station
waits for a synchronisation command from the master station and
marks the time stamps as invalid until the synchronisation command
is received. When this bit is 1, the synchronisation message is not
expected and the time stamps are not marked as invalid.
Bit 2: Confirmation queue (significant only in the unbalanced mode). When
this bit is 0, all the confirmation messages are put to class 1 queue.
When this bit is 1, confirmation messages are put to class 2 queue.
Bit 3: Handling of unrecognised commands. When this bit is 0, unrecognised
command messages are ignored. When this bit is 1, unrecognised
command messages sent by the master are forwarded to a bit stream
process object with an address as defined by the CA attribute.
Bit 4: Select-execute timeout enable/disable. When this bit is 0, the validity
of each select and execute command for ‘single command’ or ‘double
command’ types is checked. A negative confirmation is automatically
returned if:
• the execute command is received without a preceding select
command
• the object address, ASDU type or value is not equal to the pre-
cending select command
• another select command is received (except for matching deactiv-
ation which is accepted)
The length of the timeout is defined with the XT attribute. As men-
tioned, this checking applies to ‘single command’ or ‘double com-
mand’ ASDUs only. Up to 10 select commands may be pending at
the same time. When the bit is 1, the commands are not checked and
the process objects are always updated. The value of XT is meaning-
less in this case.
Bit 5: SQ=1 packing enabled/disabled. When this bit is 1, data of ASDUs
1,3,9,11,13 is packed in SQ=1 style. The usage of this packing style
may speed up the communication, if the addresses entered in ComTool
contain blocks. In these blocks the addresses are incremented sequen-
tially. This means that addresses like baseaddr, baseaddr+1 or basead-
dr+2 are used.The SQ=1 packing is not supported for time tagged
data. When this bit is 0, SQ=1 packing is not used and the packing is
made in standard SQ=0 packing style.
31
SYS 600 9.3 MicroSCADA Pro 1MRS756653
DC Diagnostic Counters
The values of the diagnostic counters which the NET unit keeps for the station. The
counters have the following meaning:
32
1MRS756653 MicroSCADA Pro SYS 600 9.3
Issued: 31.3.2010 IEC 60870-5-101 Slave Protocol
Version: B/30.9.2012
Configuration Manual
OS Object Status
The current status of the IEC station object. When value 1 is written to this attribute,
the station object retransmits its current status codeto the system message process object.
Data type: Integer
Value: when Read, 0 = OK_STATUS or
non-zero value = communication is not normal at the moment
Access: No limitations (write is possible only with value 1)
QI Queue Information
Information from the class queues. Returns the amount of unsent ASDUs with matching
values for COT (Cause Of Transmission) or TYPE ID (Type Identification).
When accessed, the formula for indices is
100*OPERATION+FIRST..100*OPERATION+LAST
The different values of OPERATION:
33
SYS 600 9.3 MicroSCADA Pro 1MRS756653
Examples
STAx:SQI103 ;Returns the amount of unsent ASDUs from class 1 with
COT=3
;(Spontaneous)
STAx:SQI(320..336) ;Returns the amount of unsent ASDUs with
COT=20..36
;(Interrogated/Group interrogated)
STAx:SQI513 ;Returns the amount of unsent ASDUs from class 2 with
TYPE
;ID=13 (M_ME_NC_1)
STAX:SQI(699..701) ;Returns the amount of unsent ASDUs from with
TYPE
;ID=99..101 (Interrogation commands)
The maximum time to delay response for writing data to the SD and EV attributes, if
the number of items in the queue is greater than the value of the RW attribute.
34
1MRS756653 MicroSCADA Pro SYS 600 9.3
Issued: 31.3.2010 IEC 60870-5-101 Slave Protocol
Version: B/30.9.2012
Configuration Manual
CC Command Control
This attribute defines how the incoming timestamped control commands and time
synchronization commands are handled.
See NET node attribute TZ (Time Zone) and IEC station object attribute CD (Command
delay) for more information.
The term 'summer time' is used in IEC standards as is a synonym for 'daylight saving
time'.
The timestamped control commands are normally used only in IEC60870-5-104 and
not in IEC60870-5-101.
Values of the 'summer time' bit are:
0 = standard time
1= summer time/daylight saving time
Data type: Integer
Default: 0
Value: 0... 1
Value 0 = The 'summer time' bit of the timestamp in the incoming
command is ignored. The timestamp of the incoming command is
corrected with the value of the NET node attribute TZ (Time zone).
In order to accept the incoming command, the difference between this
timestamp and the arrival time (from local clock) of message must
not be bigger than the time window defined with station attribute CD.
35
SYS 600 9.3 MicroSCADA Pro 1MRS756653
If the value of the 'summer time' bit is different from the daylight saving time information
of the local clock, the 1-hour difference is compensated before clock setting or the
comparison to the arrival time. In order to accept the control command, the difference
must not be bigger than the time window defined with station attribute CD.
SU Summer Time
States whether summer time is used or not. With this attribute the user can change the
SU flag in the IEC time tag. The SU attribute can be used for example to tell a master
system that the time tagged event uses summer time. If the master system does not use
summer time, it is then able to change the time to its own time.
Data type: Integer
Value: 0 or 1
Default value: 0 (summertime not used)
Access: No limitations
Defines how many data items (binary values, analog values) can be written from the
base system to NET without a reply or request from the master. If the slave station
cannot send data items spontaneously to the master, it stores data into local buffers and
creates a local reply to the base system and the execution of the SCIL program can
continue. The slave station stores items until the number of items in local buffers is
equal to RW. After that the slave station delays the replies to the base system until the
number of items drops below RW again (data sent to master and reply received). This
delay is configurable and it is defined by the MT attribute.
Data type: Integer
Value: 0…10000
Default value: 10
Access: No limitations
SYS 600 provides support for redundant IEC 60870-5-101 Slave lines. This means that
one IEC slave station can have two lines. One of them is the main line, initially meant
to be the primary communication channel. The other line is the back-up line, meant to
36
1MRS756653 MicroSCADA Pro SYS 600 9.3
Issued: 31.3.2010 IEC 60870-5-101 Slave Protocol
Version: B/30.9.2012
Configuration Manual
The following station attribute is used with redundant IEC 60780-5-101 lines:
LI Line Number
The number of the back-up line is set to index 2 of the LI attribute. Refer to the LI at-
tribute presented earlier in the Section 4.3.2.1 IEC 60870-5-101 line layer.
Example:
#SET STA1:SLI(2) = 5
When using redundant IEC 60870-5-101 lines, the IEC master must provide the
corresponding functionality. The implementation of the line switch mechanism is
described in Section 5.4.5 Redundancy of this document.
37
SYS 600 9.3 MicroSCADA Pro 1MRS756653
There can be only one IEC station for a pair of redundant lines.
SYS 600 provides support for the Autocaller functionality for the IEC 60870-5-101 Slave
protocol. An Autocaller is a modem with functions for automatic dial-up. The dial-up
can be initiated by the IECmaster or the IECslave.
The Autocaller must use the AT (Hayes) command set. Note that when using odd or
even parity, the modem must support 11-bit word length. In some cases, this feature
must be enabled by using the AT commands. Refer to the documentation of the modem
in use for further details.
The following Autocaller attributes are valid for the IEC 60870-5-101 Slave lines:
AC Autocaller Enabled
The AC attribute states whether an Autocaller is connected to the line (value 1) or not
(value 0).
Data type: Integer
Value: 0 or 1
Default value: 0
Access: No limitations
AS Autocaller State
This attribute indicates the state of the Autocaller.
Data type: Integer
Value: 0...4
0 = IDLE, ready to make a call
1 = CONNECTED, transmission is activated
2 = BUSY, Autocaller is dialling
3 = INITIAL, Autocaller is uninitialized
4 = CONFIGURE, the IU attribute of the line is set to 0
Default value: 0
Access: Read-only
38
1MRS756653 MicroSCADA Pro SYS 600 9.3
Issued: 31.3.2010 IEC 60870-5-101 Slave Protocol
Version: B/30.9.2012
Configuration Manual
CT Connection Time
The maximum time that a connection is allowed to last (in seconds). This attribute is
significant only if time limiting is activated (CL = 1).
Data type: Integer
Value: 0...600
Unit: Seconds
Default value: 120
Access: No limitations
CN Connection
The CN attribute is used for dialling devices from the NET and for breaking telephone
connections. This attribute has significance only in the unbalanced mode.
A call to a station or workplace is initiated by writing the phone number to the CN at-
tribute. The NET unit then commands the autodialling modem to dial the number. The
success of the dialling is reported as a system message. Writing an empty string to CN
breaks the connection.
Data type: Text
Value: Text string of maximum 25 characters
Default value: Empty text string
Access: No limitations
Example:
#SET NET1:SCN5 = "123456789S11"
CS Connected Station
39
SYS 600 9.3 MicroSCADA Pro 1MRS756653
MC Modem Command
Using this attribute, a modem can be controlled directly from SCIL with the AT/Hayes
commands. When an AT command is written to the MC attribute, it is transmitted to
the modem on the line. The response from the modem is read using the same attribute.
Data type: Text
Value: Text string, an AT/Hayes command
Default value: 0
Access: No limitations
Example:
#SET NET1:SMC3 = ("AS0?")'
PU Pulse Dialing
This attribute determines the dialing principle used.
Data type: Integer
Value: 0 = tone dialing
1 = pulse dialing
Default value: 0
Access: No limitations
40
1MRS756653 MicroSCADA Pro SYS 600 9.3
Issued: 31.3.2010 IEC 60870-5-101 Slave Protocol
Version: B/30.9.2012
Configuration Manual
The RC attribute states whether remote calls are enabled on a line, that is if the NET
unit can be called from the stations connected to the line in question. The attribute applies
to lines with autocaller (AC = 1).
Data type: Integer
Value: 0 = remote calls not enabled
1 = remote calls enabled
Default value: 0
Access: No limitations
SR Autocaller AT S Register
The S registers used by the Autocallers follow the AT (Hayes) de facto standard.
All the Autocallers which use the AT command set have a number of S registers. The
number of registers used and the meaning of the individual registers slightly varies
from one Autocaller model to another. The contents of the S registers are therefore not
described in this document. Refer to the modem manuals.
Using the SR attribute, the S registers number 2, 6, 7, 8, 9, 10, 11 and 12 are accessed.
By using the MC attribute (see above), other S registers can also be accessed. The S
registers 11 and 12 cannot be set.
Data type: Integer
Value: See the modem manuals
Indexing: Seconds
Access: 100 * line number + register number
Example:
The S register number 6 of line 2 in NET1 is set = 4:
#SET NET1:SSR206 = 4
41
SYS 600 9.3 MicroSCADA Pro 1MRS756653
The IEC file transfer feature transmits all types of files between relay and the SYS 600
computer. Only one transmission per one STA object can be active at the same time. If
the another file transfer request is made during the first file transfer is in progress, the
status code is returned and the second file transfer progress does not start.
FI File Information
The FI attribute initializes the file transfer system with needed base information.
Value: Vector of 5 integers
1 = internally used
2 = SEGMENTCOUNT
3 = internally used
4 = QUEUE (unbalanced slave)
5 = PRIORITY (slave)
6 = Section request delay IN (0.1 seconds)
7 = Section filling delay OUT (0.1 seconds)
Indexing: 1..7
Access: Read/Write
Default value: 1=0
2=8
3=0
4=2
5 = 3 (1 is lowest value)
6 = 0 (0 milliseconds)
7 = 10 (1000 milliseconds)
Example:
The following example defines five segments in the each file section.
#SET STA'sta':SFI(2)=5
FD File Directory
The FD attribute defines to which directory the received files are stored. PC_NET in-
terrupts file receiving, if the directory does not exist or if it is write-protected.
42
1MRS756653 MicroSCADA Pro SYS 600 9.3
Issued: 31.3.2010 IEC 60870-5-101 Slave Protocol
Version: B/30.9.2012
Configuration Manual
Example:
The following example defines C:\SC\DATA to the active directory.
#SET STA'sta':SFD="C:\SC\DATA"
FT File Timeout
The FT attribute defines the maximum delay for incoming ack section or ack file request.
If the time expires, PC_NET interrupts the file transmission.
Value: 0..255
Unit: Seconds
Access: Read/Write
Default value: 30 seconds
FB File Bytes
43
SYS 600 9.3 MicroSCADA Pro 1MRS756653
The FB attribute returns both counts of received or transmitted bytes from the beginning
of the file transfer session (index 1) and the file size (index 2). At the beginning of the
file reception, the value of index 1 is automatically set to zero (0). The value of index
2 is updated when the FB attribute is written and a correct file index is given.
Value: 0..4294967295
Indexing: When read
1 = Number of bytes (DWORD), out
2 = File size in bytes (DWORD), out
3 = File name in relay (DWORD), out
4 = Number of bytes (DWORD), in
5 = File size in bytes (DWORD), in
6 = File name in relay (DWORD), in
Access: Read
Default: 0
FN File Name
The FN attribute collects the information address to certain file in the file system. When
the remote end requests the directory, the information address is reported as a real file,
not as a subdirectory (FOR = 0).
Value: When written
IOA
NAMEOFFILE
FILETYPE
STATUSOFFILE
NAMEINFILESYSTEM
SIZEINFILESYSTEM
DATEINFILESYSTEM
MSECSINFILESYSTEM
When read
NAMEINFILESYSTEM
When read
44
1MRS756653 MicroSCADA Pro SYS 600 9.3
Issued: 31.3.2010 IEC 60870-5-101 Slave Protocol
Version: B/30.9.2012
Configuration Manual
IOA
Information object address.
Type: DWORD
NAMEOFFILE
Defines the name of file field in the file transfer messages.
Type: WORD
FILETYPE
Type: WORD
Values: 1 = Transparent file
Other types are not supported at the moment.
STATUSOFFILE
Type: BYTE
Values: 0 = File waits for transfer
NAMEINFILESYSTEM
String contains a valid file name in the disk with maximum length of 100 charaters. If
the string is empty, the file is deleted from the list.
SIZEINFILESYSTEM (optional)
The file size.
Type: DWORD
DATEINFILESYSTEM (optional)
Creates file’s timestamp (seconds from 1.1.78).
Type: TIME
MSECSINFILESYSTEM (optional)
Creates file’s timestamp (milliseconds).
Type: WORD
Example of writing
#SET STA'sta':SFN=(1000, 1,1,0, "error.log", 5000, %clock)
Example of reading
45
SYS 600 9.3 MicroSCADA Pro 1MRS756653
The second file is read from the outgoing file list and returns the error.log file.
STA'sta':SFN(102)
FV File Values
The FV attribute checks the status of the defined file. During the reading process, the
attribute’s index defines where the file value is taken, either from the outgoing files list
or from the incoming files list.
Value: Vector
IOA
NAMEOFFILE
FILETYPE
CTRLANDSTATUSOFFILE
SIZEINFILESYSTEM
DATEINFILESYSTEM
MSECSINFILESYSTEM
Indexing: When read, word (0..65535)
Queue out: index = 100+FILENUM
Queue in: index = 200+FILENUM
If the FILENUM offset is bigger than the number of files in the list,
status code 13887 ICCC_NO_SUCH_FILE is returned.
For more information about status codes, see Section 5.8 Status codes
46
1MRS756653 MicroSCADA Pro SYS 600 9.3
Issued: 31.3.2010 IEC 60870-5-101 Slave Protocol
Version: B/30.9.2012
Configuration Manual
47
SYS 600 9.3 MicroSCADA Pro 1MRS756653
STA'sta':SFV(102)
3 ;Information object address
3 ;Name of file
1 ;Transparent file
1536 ;CTRL=(transmitted, acked), SOF=0
10006 ;Filesize=10006 bytes
847636153 ;Timestamp
If the FILENUM offset is bigger than the number of files in the list, status code 13887
ICCC_NO_SUCH_FILE is returned.
For more information about status codes, see Chapter 5.8 Status codes
SS Send Subdirectory
The SS attribute initiates the transmission of the directory listing from the specified
address.
Value: IOA, (COT) vector
Access: Write, Where
IOA
Type: DWORD
Is not in use at the moment
COT (optional)
Type: BYTE
Defines the cause of transmission.
If the value is not given, value three (3) is used.
Example
The following example initiates the file directory’s transmission by using cause of
transmission 3.
#SET STA'sta':SSS=(1,3)
48
1MRS756653 MicroSCADA Pro SYS 600 9.3
Issued: 31.3.2010 IEC 60870-5-101 Slave Protocol
Version: B/30.9.2012
Configuration Manual
49
SYS 600 9.3 MicroSCADA Pro 1MRS756653
For MicroSCADA version 9.3 and newer, protocol analyzer included in PC-NET can
be used. See the NET line attributes AO and AU from the SYS 600 System Objects
manual.
One possible way to test the configuration is to use SYS 600 also as the IEC master/slave.
In this case you have to make the base system and communication system configuration
for the IEC 60870-5-101 Slave line and station(s). The IEC master can be even in the
same computer. Another benefit of using SYS 600 as the test master is that the application
pictures can be reused. However, the process database has to be recreated to an IEC.
50
1MRS756653 MicroSCADA Pro SYS 600 9.3
Issued: 31.3.2010 IEC 60870-5-101 Slave Protocol
Version: B/30.9.2012
Configuration Manual
5 Technical description
51
SYS 600 9.3 MicroSCADA Pro 1MRS756653
5.4 Communication
This section gives a more detailed description of the implementation of the IEC
60870-5-101 Slave protocol in SYS 600, describing also the attributes that can be used
for device communication. Examples of how to exchange data between the master and
the slave are also given in this section along with information of the IEC 60870-5-101
Slave status codes.
The IEC 60870-5-101 protocol has two modes or link layer transmission procedures:
unbalanced mode and balanced mode. In the unbalanced mode a master station controls
the data traffic by polling the outstations sequentially. In this case the master is the
primary station that initiates all the message transfer. The outstations are secondary
stations (slaves) that may transmit only when they are polled.
In the balanced mode each station, master and slave, may initiate message transfers. The
communication mode of a NET line can be selected by using the PO attribute when the
line is created, and must of course be matched with the communication mode of the
master station.
52
1MRS756653 MicroSCADA Pro SYS 600 9.3
Issued: 31.3.2010 IEC 60870-5-101 Slave Protocol
Version: B/30.9.2012
Configuration Manual
Each IEC 60870-5-101 Slave station configured on a line of a NET unit acts as a protocol
converter between the IEC 60870-5-101 protocol and a base system. An internal protocol
of SYS 600 is used in communication between the SYS 600 nodes, for example, between
a base system and a NET unit.
Unlike in some other slave protocols, a IEC 60870-5-101 Slave station does not have a
database in the NET unit, all data is sent directly to the master station. Therefore no
database intialisation procedures are needed. If needed, messages are stored temporarily
into queues inside the NET unit.
In IEC 60870-5-101 data sent from the slave to the master can be assigned to two classes:
class 1 or class 2. The data from the classes is sent to the master either by polling
(unbalanced mode) or spontaneously (balanced mode). In SYS 600 the class assignment
is done when the IEC message is written to the NET unit by using SCIL statements. In
general, class 1 is used for high priority data and class 2 for lower priority data. The class
is defined with the index value in the SD- and EV-attribute writes.
Both class 1 and class 2 queues contain space for 200 IEC60870-5-104 messages. At its
maximum, one queue may buffer about 4000 binary events (ASDU 30, M_SP_TB_1).
5.4.3 Addressing
53
SYS 600 9.3 MicroSCADA Pro 1MRS756653
types of addresses just demonstrate two different ways of presenting the same address.
For example, a two-byte address can be represented as follows:
unstructured = 256*upper byte + lower byte.
Figure 5.1 describes the data flow between the process devices and the IEC master. Both
directions are described separately since the data is handled in a different way depending
on the direction.
See manual COM 500i User's guide for detailed information about the data flow
configuration.
Figure 5.1: Data flow between the process devices and the IEC master in COM 500i
Input data
When input data, for example indications and measured values, are sent from the process
devices to the IEC master, the following steps are taken:
54
1MRS756653 MicroSCADA Pro SYS 600 9.3
Issued: 31.3.2010 IEC 60870-5-101 Slave Protocol
Version: B/30.9.2012
Configuration Manual
1. The process devices send data to the SYS 600 process database.
2. The updated process object activates an event channel.
3. The event channel executes a command procedure. Some of the attributes of the
process object are given as arguments to the command procedure.
4. The command procedure sends the data to the NET database by using the SD and
EV attributes based on specific cross-reference information.
5. The NET unit sends data to the IEC master either as static or unsolicited data.
The cross-reference information is the data needed to deliver the signal to the IEC master,
for example object address and message type.
The number event channels and command procedures needed to deliver data to the master
depends on the application, one solution is to have one command procedure for each
process object type. Examples of the command procedures are given later in this
document.
Output data
When output data, for example object commands and analog setpoints, are sent from the
IEC master to the process devices, the following steps are taken:
1. The command is received by the SYS 600 process database. There must be a separate
input process object for each IEC command address. This part of the process object
is created manually when the signal engineering is done.
2. The updated process object activates an event channel.
3. The event channel executes a command procedure. Some of the attributes of the
process object are given as arguments to the command procedure.
4. The command procedure sends the process devices by setting the corresponding
output process object(s) and, if required, sends a confirmation to the IEC master via
the NET unit.
Cross-reference data can also be used with commands. It can contain, for example,
information of the logical names and indices of the output process objects. Examples of
the command procedures are given later in this document.
Other messages
In addition to the input and output data described above, there are also some other
messages transferred between the master and the slave. These messages contain for
example synchronization commands and interrogation commands. Some of these
commands are handled automatically by the NET unit while others require SCIL
programming. The ones that require SCIL programming are described in detail later in
this document.
System and application commands are sent to the process database as follows:
• System commands (for example test command) are sent to a bit stream process
object.
• Application commands (for example general interrogation) are sent to an analog
input (AI) process object.
55
SYS 600 9.3 MicroSCADA Pro 1MRS756653
Using these process objects the messages can be interpreted and processed by using
SCIL. Unrecognised commands from the IEC master can be received by the bit stream
process object. This feature is configurable by using the RM attribute of the IEC slave
station.
5.4.5 Redundancy
SYS 600 supports redundant lines for both the balanced and unbalanced mode. The use
of this feature requires that the corresponding functionality is also implemented in the
IEC master, as stated in the document “Norwegian User Conventions for IEC
60870-5-101”.
The master controls the mechanism that activates a line switch. The main line
communication works as without redundancy. However, the master sends only a cyclical
“request status of link” message on the back-up line, to which the slave responses with
a “status of link” message. No other messages are allowed. When the master wants to
switch lines, it sends a “reset of link” message to the redundant line, which the slave
acknowledges. After this the former main line acts as the former back-up line and vice
versa. In the balanced mode, the links are initialized in both directions in the main line
and also in the backup line. The main line operates normally and a cyclical “test function
of link” message is transmitted on the backup line. The line switch occurs only when
the master issues a command to the backup line. Bit 1 of the line attribute OM provides
an optional functionality in the behaviour of the backup line.
TD Transparent Data
The TD attribute is used for sending transparent data (for example SPA messages) to
the IEC master as a response to the Read command (ASDU 102).
Data type: Vector
Value Vector (TYPE, ADDR, COT, TDT)
Value range: 0...255, for other parameters but ADDR
Access: Write-only
Description of the vector parameters:
TYPE: Type identification of the ASDU, integer. The type identifications
shown in Table 5.2 are allowed when transparent data is sent to the
IEC master/slave by using the TD attribute.
Table 5.2: The type identifications allowed when using the TD attribute
Type id ASDU Description
130 M_SB_NA_1 101 Encapsulated SPA bus reply message
56
1MRS756653 MicroSCADA Pro SYS 600 9.3
Issued: 31.3.2010 IEC 60870-5-101 Slave Protocol
Version: B/30.9.2012
Configuration Manual
For more detailed information, see the examples and the interoperability list later in this
document.
SD Spontaneous Data
Enables SYS 600 to send spontaneous or cyclic data to the IEC master. This data is sent
without time stamp. By reading the SD attribute the user can enquire the number of data
messages (ASDUs) in the queues not yet sent to the IEC master. When reading, the
station attribute QI is recommeded since it provides more specific information about the
contents of the queues during runtime.
Data type: Vector or integer
Value: When writing:
Vector (TYPE, ADDR, VAL, COT, QU, PRI, OW)
When reading: Integer
Index range: 1...2, 101...102
When writing:
The number of the class the message is assigned to.If value 101 is
given, the item is added to class 1 queue but is not sent until an index
value 1 or 2 is written.
If value 102 is given, the item is added to class 2 queue but is not sent
until an index value 1 or 2 is written.
When reading: the index is meaningless, the returned value is the
number of ASDUs not yet sent to the IEC master.
If station attribute MT is bigger than 0, instead of reading of the SD-
attribute, it is preferable to use the attribute QI.
Indexes 101 and 102 are useful only in the balanced mode.
Access: No limitations
Description of the vector parameters:
TYPE: Type identification of the ASDU as a text string (for example
“M_IT_NA_1”)
The type identifications presented in Table 5.3 are allowed when data is sent to the IEC
master by using the SD attribute.
57
SYS 600 9.3 MicroSCADA Pro 1MRS756653
Table 5.3: The type identifications allowed when using the SD attribute
Type id ASDU Description
1 M_SP_NA_1 Single-point information without time
tag
3 M_DP_NA_1 Double-point information without time
tag
5 M_ST_NA_1 Step position information
7 M_BO_NA_1 Bit string of 32 bit
9 M_ME_NA_1 Measured value, normalised value
11 M_ME_NB_1 Measured value, scaled value
13 M_ME_NC_1 Measured value, short floating point
number
15 M_IT_NA_1 Integrated totals
70 M_EI_NA_1 End of initialisation
110 P_ME_NA_1 Parameter of measured values, normal-
ized value
111 P_ME_NB_1 Parameter of measured values, scaled
value
112 P_ME_NC_1 Parameter of measured values, short
floating point number
58
1MRS756653 MicroSCADA Pro SYS 600 9.3
Issued: 31.3.2010 IEC 60870-5-101 Slave Protocol
Version: B/30.9.2012
Configuration Manual
4 Initialised
5 Request or requested
11 Return information caused by a remote command
12 Return information caused by a local command
QU: Integer 1...255, bit mask of the qualifier descriptor bits of the ASDU.
Qualifier descriptor bits indicate the current state of the data object.
The bits in the qualifier byte are different for different ASDUs (see
the examples later in this document). The relation between the quali-
fier descriptor bits and process object attributes is presented in
Table 5.5.
Table 5.5: The relation between the qualifier descriptor bits and process object
attributes
Bit Name Description Attr.
IV Invalid A value is valid if it was correctly acquired. OS ==1
After the acquisition function recognises ab-
normal conditions of the information source
(missing or non-operating updating devices),
the value is then marked invalid. The value
of the information object is not defined under
this condition. The mark Invalid is used to
indicate to the destination that the value may
be incorrect and cannot be used.
NT Not topical A value is topical if the most recent update OS ==2
was successful. It is not topical if it was not
successfully updated during a specified time
interval or it is unavailable.
SB Substituted The value of the information object is SB
provided by input of an operator (dispatcher)
or by an automatic source.
BL Blocked The value of the information object is BL
blocked for transmission; the value remains
in the state that was acquired before it was
blocked. Blocking and deblocking may be
initiated e.g. by a local lock or a local auto-
matic cause.
CA Counter adjusted Counter was/was not adjusted since the last -
reading.
OV Overflow The value of the information object is beyond OR
a predefined range of value (mainly applic-
able to analogue values).
CY Carry Counter overflow occurred/did not occur in OF
the corresponding integration period.
PRI: Priority of the information object. This parameter defines how the
information object sent using the SD attribute is placed in the class 1
and class 2 queues. This parameter can be used for setting the priority
of data types or individual objects.
59
SYS 600 9.3 MicroSCADA Pro 1MRS756653
Value: Integer 0 … 3:
0 = The information object is always placed in the end of the queue.
1 or 2 = The information object is placed in the queue according to
the priority value. Objects with higher priority pass the lower priority
objects. If the queue contains more than one object with the same
priority, the new object is placed behind them.
3 = The information object is always placed in the beginning of the
queue.
OW: This parameter defines whether a new information object overwrites
an older information object in the queue.
Value: Integer 0 or 1
0 = No overwriting
1 = A new information object overwrites an older object in the queue
By writing data to the EV attribute the user can send event data, that is, time-tagged
messages from SYS 600 to the master. By reading the EV attribute the user can enquire
the number of information objects (events) in the queue not yet sent to the IEC master.
The maximum value of the EV attribute is limited by the RW attribute of the IEC slave
station.
Data type: Vector or integer
Value: When writing: Vector (TYPE, ADDR, VAL, COT, QU, PRI, RT,
RM, [CTRL])
When reading, Integer 0...65535
Index range: 1...2, 101...102
When writing: the number of the class the message is assigned to.
If value 101 is given, the item is added to class 1 queue but is not sent
until an index value 1 or 2 is written. If value 102 is given, the item
is added to class 2 queue but is not sent until an index value 1 or 2 is
written.
When reading: the index is meaningless, returned value is the number
of data items not yet sent to the IEC master. If station attribute MT is
bigger than 0, instead of reading of the EV-attribute, it is preferable
to use the attribute QI.
Indexes 101 and 102 are useful only in the balanced mode.
Access: No limitations
60
1MRS756653 MicroSCADA Pro SYS 600 9.3
Issued: 31.3.2010 IEC 60870-5-101 Slave Protocol
Version: B/30.9.2012
Configuration Manual
TYPE: Type identification of the ASDU, either as a text string (for example
“M_IT_NA_1”) or as an integer
The type identifications presented in Table 5.6 are allowed when data is sent to the IEC
master by using the EV attribute.
Table 5.6: The type identification allowed when using the EV attribute
Type id ASDU Description
2 M_SP_TA_1 Single-point information with time tag
4 M_DP_TA_1 Double-point information with time tag
6 M_ST_TA_1 Step position information with time tag
8 M_BO_TA_1 Bit string of 32 bit
10 M_ME_TA_1 Measured value, normalised value
with time tag
12 M_ME_TB_1 Measured value, scaled value with
time tag
14 M_ME_TC_1 Measured value, short floating point
number with time tag
16 M_IT_TA_1 Integrated totals with time tag
30 M_SP_TB_1 Single-point information with time tag
CP56Time2a
31 M_DP_TB_1 Double-point information with time tag
CP56Time2a
32 M_ST_TB_1 Step position information with time tag
CP56Time2a
34 M_ME_TD_1 Measured value, normalised value
with time tag CP56Time2a
36 M_ME_TF_1 Measured value, short floating point
number with time tag CP56Time2a
37 M_IT_TB_1 Integrated totals with time tag
CP56Time2a
61
SYS 600 9.3 MicroSCADA Pro 1MRS756653
62
1MRS756653 MicroSCADA Pro SYS 600 9.3
Issued: 31.3.2010 IEC 60870-5-101 Slave Protocol
Version: B/30.9.2012
Configuration Manual
CTRL: This is an optional field, which can be given to define the contents of
the information object more specifically. The value is a bit pattern.
Bits 1 and 2 control the 'summer time' bit of the timestamp of the
outgoing event messages. The term 'summer time' is used in IEC
standards as a synonym for 'daylight saving time'.
Values of the 'summer time' bit are:
0 = standard time
1= summer time/daylight saving time.
This bit exists only in ASDU types with extension 'with time tag
CP56tIME2a'. In monitor direction the corresponding ASDU numbers
are 30..40. These ASDU numbers are usually used only with
IEC60870-5-104 slave protocol and not with IEC60870-5-101 slave.
Bit 0 = 0: The 'time invalid' bit of the timestamp of this information
object is not explicitly set, but it follows the value of the station attrib-
ute IV.
Bit 0 = 1: The 'time invalid' bit of the timestamp of this information
object is set to state 1 = invalid.
Bit 1 = 0: The 'summer time' bit of the timestamp of this information
object is not explicitly set, but it follows the value of the station attrib-
ute SU.
Bit 1 = 1: The 'summer time' bit of the timestamp of this information
object is set to state 1 = summertime.
Bit 2 = 0: No conversion from UTC (Coordinated Universal Time)
time to local time is requested. The given timestamp is sent as such
and the state 'summer time' bit follows the rules defined in the descrip-
tion of the bit 1 above.
Bit 2 = 1: The timestamp is given as an UTC time and the conversion
to the local time is requested. The timestamp of the event message
will be converted to the local time of the computer and the 'summer
time' bit of the timestamp will be set according to the localized event
timestamp. The setting of bit 2 will override the 'summer time' bit
setting rules defined in the description of the bit 1 above.
CF Command Confirmation
63
SYS 600 9.3 MicroSCADA Pro 1MRS756653
In SYS 600 the CF attribute is used to confirm received messages manually. When the
user writes only the COT value to the CF attribute, NET sends the confirmation message
with written COT to the master. In this case the confirmation message is formed from
the latest received command.
The user may also define which command is confirmed. NET automatically stores the
incoming commands to an internal table (70 latest commands are stored). In case ADDR
(or ADDR and TYPE) is given in CF-writing, the confirmed command is searched (latest
first) from the table. If no command with matching address (or address and ASDU-type)
is found, error ICCC_NO_ACTIVE_COMMAND is returned and the confirmation
message is not sent. If a matching command is found, the given COT is set and the
command is sent as a confirmation.
Data type: Vector
Value Vector (COT, [ADDR, [TYPE, [PRIO]]])
Access: Write-only
64
1MRS756653 MicroSCADA Pro SYS 600 9.3
Issued: 31.3.2010 IEC 60870-5-101 Slave Protocol
Version: B/30.9.2012
Configuration Manual
The priority of the confirmation message cannot be specified, if the transparent data is
sent described below. For other ASDU types, the defining of the priority is possible and
the used values are the same as in the SD and EV attributes. A bigger value means higher
priority.
The messages are sorted in the transmission queue so that the higher priority messages
are sent first. The priority is optional and if not specified, fixed values which depend on
a given COT value are used. If the value of the PRIO is 100..104, the confirmation
messages are always placed to the class 1 queue. Correspondingly, if the value of the
PRIO is 200..204, the confirmation messages are always placed to the class 2 queue.
When the queue is explicitly defined using PRIO values >= 100, the actual priority in
the queue will be PRIO modulo 100. With PRIO values 0..4 or when the PRIO is not
defined, the queue selection is based on the value of the RM attribute, bit 2.
The type identifications presented in Table 5.8 are allowed commands ASDUs confirmed
by the CF attribute.
Table 5.8: The type identifications allowed when using the CF attribute
Type id ASDU Description
45 C_SC_NA_1 Single command
46 C_DC_NA_1 Double command
47 C_RC_NA_1 Regulating step command
48 C_SE_NA_1 Set point command, normalised value
49 C_SE_NB_1 Set point command, scaled value
50 C_SE_NC_1 Set point command, short floating point number
51 C_BO_NA_1 Bit string of 32 bit
58 C_SC_TA_1 Single command with time tag CP56Time2a
59 C_DC_TA_1 Double command with time tag CP56Time2a
60 C_RC_TA_1 Regulating step command with time tag CP56Time2a
61 C_SE_TA_1 Set point command, normalized value with CP56Time2a
62 C_SE_TB_1 Set point command, scaled value withCP56Time2a
63 C_SE_TE_1 Set point command, short floating point number with CP56Time2a
64 C_BO_TA_1 Bit string of 32 bit with CP56Time2a
100 C_IC_NA_1 Interrogation command
101 C_CI_NA_1 Counter interrogation command
102 C_RD_NA_1 Read command
103 C_CS_NA_1 Clock synchronisation command
104 C_TS_NA_1 Test command
105 C_RP_NA_1 Reset process command
107 C_TS_TA_1 Test command with CP56Time2a
110 P_ME_NA_1 Parameter of measured values, normalized value
111 P_ME_NB_1 Parameter of measured values, scaled value
65
SYS 600 9.3 MicroSCADA Pro 1MRS756653
TDT: Transparent data (SPA message) as a text string. For more detailed
information, see the examples and the interoperability list later in this
document.
RS is used for clearing the content of event queues in the slave station. If an optional
COT (Cause of Transmission) value is given, only the ASDUs with a matching COT
are cleared from the specified queue. If the COT is not specified, the whole queue(s) are
cleared.
Data type: Integer or Integer’s vector
Value: (VAL, [COT])
VAL= 1..3
1: reset the class 1 queue
2: reset the class 2 queue
3: reset both queues
COT= Integer 0..255 (optional)
If specified, only the ASDUs with the Cause of Transmission field matching with COT
are cleared.
Access: Write-only
Example
66
1MRS756653 MicroSCADA Pro SYS 600 9.3
Issued: 31.3.2010 IEC 60870-5-101 Slave Protocol
Version: B/30.9.2012
Configuration Manual
Signals are sent from the process units to a NCC and commands from a NCC to the
process unit. COM 500i reroutes the signals using command procedures and
cross-references, see Figure 5.2. The command procedures, which are used for signal
rerouting, are described here.
If the IEC 60870-5-101 Slave protocol is used with COM 500i, the command procedures
available for COM 500i are used. The cross-reference information is entered in the Signal
Cross-reference tool. In order to receive more information, see SYS 600 COM 500i
User’s Guide Table 5.10 shows the used COM 500i command procedures and event
channels.
Table 5.10: Used event channels and command procedures
Process Object Type Event Channel Command Procedure
Analog Input COM_USAI COM_USAI
Single Indication COM_USDI COM_USDI
Double Indication COM_USDB COM_USDB
Digital Input COM_USDI COM_USDI
67
SYS 600 9.3 MicroSCADA Pro 1MRS756653
The command procedures presented in this chapter cannot cover all combinations and
requirements, but they provide examples of the implementation.
The connection between the SYS 600 process objects and messages to and from the IEC
master is made by using cross-reference data. The cross-reference data is written to the
FX (Free teXt) attribute of the process objects by using the Process Object Definition
Tool.
The cross-references for data transfer from SYS 600 to the IEC master are kept in the
FX attribute, which is a string of max 30 characters (10 before revision 8.4.2). The general
syntax for a cross-reference is:
<STA_NUMBER><TYPE><CLASS><ADDRESS><PRI><OW>
68
1MRS756653 MicroSCADA Pro SYS 600 9.3
Issued: 31.3.2010 IEC 60870-5-101 Slave Protocol
Version: B/30.9.2012
Configuration Manual
PRI: The priority of the information object in the NET queues. The
value is stored as one ASCII digit. Priority parameter uses the
FX string position 24.
OW: The parameter that determines whether the information object
overwrites an older one with the same address in the NET queues.
Stored as one ASCII digit. The overwrite parameter uses the FX
string position 25.
The used STA object attribute depends on whether the information object is sent with
or without a time tag, i.e. as static data or event. The qualifier byte is derived from the
attributes of the process object.
An example of the cross-reference of a double indication signal assigned to class 1 and
sent with time tag, overwrite and high priority.
FX 1 M _ D P _ T A _ 1 1 5 6 2 0 3 3 1
CHAR 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0
Another example of the cross-reference of a scaled analog input signal assigned to class
2 and sent without time tag, no overwrite and low priority.
FX 1 M _ M E _ N B _ 1 2 7 7 1 9 0 0
CHAR 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0
Analog inputs
In the IEC 60870-5-101 protocol analog values can be sent in three different ways:
• As 32-bit floating point values.
• As normalised values, i.e. as 16-bit fixed point values with range –1...1-(2/32768).
• As scaled values, i.e. as 16-bit integers with range –32768...32767.
When analog values are sent to NET by using the SD and EV attributes, both the
normalised and scaled values are handled as signed 16-bit integers. This means that the
maximum value of the analog signal is written as value 32767 and the minimum value
is written as value –32768. The interpretation of the value is done by the IEC master
based on the type identification of the ASDU.
If an analog signal is sent as a normalised or scaled value, it must be limited or scaled
to the value range –32768...32767. This can happen, for example, by using a specific
scale object and the SCIL SCALE function.
All the analog values are connected to the same event channel/command procedure
combination. The command procedure is activated each time the process object is updated.
It reads the updated value, and if necessary, limits or scales it and sends it to NET by
using the cross-reference data. An example of the command procedure is listed below.
A linear scale object AI_TO_S16 is used for the scaling of the analog values with the
value range as presented in Table .
69
SYS 600 9.3 MicroSCADA Pro 1MRS756653
Table 5.11: The value range for analog values that are to be sent to NET
Process SYS 600 Data-
base
Low -32768 -32767
High 32768 32767
This object does not scale the value but limits it to the correct range. If scaling is also
wanted, it can be done by changing the “process” side value range.
ERROR CONTINUE
;read cross-reference data
@FX = 'LN':PFX'IX'
@STA_NR = DEC_SCAN(SUBSTR(%FX,1,5))
@TYPE = SUBSTR(%FX,6,9)
@CLASS = DEC_SCAN(SUBSTR(%FX,15,1))
@ADDR = DEC_SCAN(SUBSTR(%FX,16,8))
@PRI = DEC_SCAN(SUBSTR(%FX,24,1))
@OW = DEC_SCAN(SUBSTR(%FX,25,1))
;scale the value if scaled or normalised value, and set the
overfow bit
#CASE SUBSTR(%TYPE,7,1)
#WHEN "A","B" #BLOCK
#IF %AI < -32768 OR %AI > 32767 #THEN #BLOCK
@VALUE = ROUND(SCALE(%AI,"AI_TO_S16","INPUT"))
@OR = 1
#BLOCK_END
#ELSE #BLOCK
@VALUE = ROUND(%AI)
@OR = 0
#BLOCK_END
#BLOCK_END
#OTHERWISE #BLOCK
@VALUE = %AI
@OR = 0
#BLOCK_END
#CASE_END
;calculate the qualifier byte
#IF %OS == 2 #THEN @NT = 1
#ELSE @NT = 0
#IF %OS == 1 OR %OS == 10 #THEN @IV = 1
#ELSE @IV = 0
@QUALIFIER = %OR+16*%BL+32*%SB+64*%NT+128*%IV
;send data to NET with spontaneous COT
#IF SUBSTR(%TYPE,6,1) == "T" #THEN - ;send with time tag
#SET
STA'STA_NR':SEV(%CLASS)=(%TYPE,%ADDR,%VALUE,3,%QUALIFIER,%PRI,%RT,%RM)
#ELSE - ;send without time tag
70
1MRS756653 MicroSCADA Pro SYS 600 9.3
Issued: 31.3.2010 IEC 60870-5-101 Slave Protocol
Version: B/30.9.2012
Configuration Manual
#SET
STA'STA_NR':SSD(%CLASS)=(%TYPE,%ADDR,%VALUE,3,%QUALIFIER,%PRI,%OW)
Single indications
All the binary inputs are connected to an event channel/command procedure combination
that sends the process value to the NET unit. The command procedure is activated each
time the process object is updated. It reads the updated value and sends it to NET by
using cross-reference data. An example of the command procedure is listed below:
#ERROR CONTINUE
Double indications
All the double binary inputs are connected to an event channel/command procedure
combination that sends the process value to the NET unit. The command procedure is
activated each time the process object is updated. It reads the updated value and sends
it to NET by using the cross-reference data. An example of the command procedure is
listed below:
#ERROR CONTINUE
71
SYS 600 9.3 MicroSCADA Pro 1MRS756653
@ADDR = DEC_SCAN(SUBSTR(%FX,16,8))
@PRI = DEC_SCAN(SUBSTR(%FX,24,1))
@OW = DEC_SCAN(SUBSTR(%FX,25,1))
Digital inputs
In IEC 60870-5-101 there is no direct equivalent of the digital input data type. Digital
values can be sent as analog values, or as step position information as in this information.
Step position information is 8-bit data, where the 7 least significant bits are for the value
and the most significant bit is set if the equipment is in transient state. A typical example
of the use of this ASDU is the position of a tap changer. The command procedure for
sending step position information is listed below.
#ERROR CONTINUE
@FX = 'LN':PFX'IX'
@STA_NR = DEC_SCAN(SUBSTR(%FX,1,5))
@TYPE = SUBSTR(%FX,6,9)
@CLASS = DEC_SCAN(SUBSTR(%FX,15,1))
@ADDR = DEC_SCAN(SUBSTR(%FX,16,8))
@PRI = DEC_SCAN(SUBSTR(%FX,24,1))
@OW = DEC_SCAN(SUBSTR(%FX,25,1))
#ELSE @NT = 0
72
1MRS756653 MicroSCADA Pro SYS 600 9.3
Issued: 31.3.2010 IEC 60870-5-101 Slave Protocol
Version: B/30.9.2012
Configuration Manual
#ELSE @IV = 0
#ELSE @OR = 0
@QUALIFIER = %OR+16*%BL+32*%SB+64*%NT+128*%IV
#SET
STA'STA_NR':SEV(%CLASS)=(%TYPE,%ADDR,%BI,3,%QUAL,%PRI,%RT,%RM)
#SET STA'STA_NR':SSD(%CLASS)=(%TYPE,%ADDR,%BI,3,%QUAL,%PRI,%OW)
Pulse counters
Pulse counters are called integrated totals in the IEC 60870-5-101 protocol. All the pulse
counters are connected to an event channel/command procedure combination that sends
the process value to the NET unit. The command procedure is activated each time the
process object is updated. It reads the updated value and sends it to NET by using
cross-reference data.
The qualifier byte of the IEC 60870-5-101 integrated totals has a five-bit sequence
number that is increased every time the information object is successfully sent to the
IEC master. In this example the sequence number is stored in the RI attribute of the
process object.
#ERROR CONTINUE
;reset status
@S = STATUS
73
SYS 600 9.3 MicroSCADA Pro 1MRS756653
Bit strings
The IEC 60870-5-101 protocol provides ASDUs 7 and 8 for transferring 32-bit strings.
In the SYS 600 implementation the bit string must be converted into an integer, when
the string is sent to the IEC master by using the SD and EV attributes. This conversion
is done by using the BIT_SET function as shown in the example below.
;read cross-reference data
@FX = 'LN':PFX'IX'
@STA_NR = DEC_SCAN(SUBSTR(%FX,1,5))
@TYPE = SUBSTR(%FX,6,9)
@CLASS = DEC_SCAN(SUBSTR(%FX,15,1))
@ADDR = DEC_SCAN(SUBSTR(%FX,16,8))
@PRI = DEC_SCAN(SUBSTR(%FX,24,1))
@OW = DEC_SCAN(SUBSTR(%FX,25,1))
74
1MRS756653 MicroSCADA Pro SYS 600 9.3
Issued: 31.3.2010 IEC 60870-5-101 Slave Protocol
Version: B/30.9.2012
Configuration Manual
Command confirmation
The IEC 60870-5-101 protocol includes the concept of command confirmations. Basically
a confirmation is a message sent by the slave indicating that a command has been received,
executed or rejected. Commands are confirmed in two steps as follows:
• A command is confirmed when it is received. An activation confirmation can be
positive (command accepted) or negative (command rejected).
• A command is terminated when its execution is finished. An activation termination
can be positive (command successfully completed) or negative (command failed).
The following exceptions apply:
• Select-type data commands, test commands (ASDU 104) and reset process commands
(ASDU 105) are only confirmed, not terminated.
• Clock synchronisation commands (ASDU 103) are confirmed automatically by the
PC-NET.
In the IEC 60870-5-101 Slave protocol commands are confirmed and terminated by
using the CF (Command Confirmation) attribute of the IEC slave station.
If bit 8 of the RM-attribute is set, the incoming commands are checked and if the
command contains an unsupported cause of transmission, information object address or
the ASDU type itself is not supported, a negative confirmation with cause of transmission
44,45 or 47 is sent automatically and the process object in the database is not updated.
In addition to this, if bit 3 (Process commands with invalid CAA) of the line attribute
OM is set and no STA object with matching Common Address of ASDU is configured,
a negative confirmation with cause of transmission 46 is sent. See the descriptions of
the station attribute RM and line attribute OM.
The meaning of these cause of transmission values:
44 unknown type identification
45 unknown cause of transmission
46 unknown common address of asdu
47 unknown information objects address
Command transactions
In the SYS 600 implementation of the IEC 60870-5-101 slave protocol 60 command
transactions can be open at the same time. When a command is confirmed by using the
CF attribute, a command with a matching ASDU number and address is searched from
the buffer. If a match is found, a confirmation or termination message is sent to the master
and if not, status 13860 = ICCC_NO_ACTIVE_COMMAND is returned.
75
SYS 600 9.3 MicroSCADA Pro 1MRS756653
The commands sent from the IEC master to SYS 600 are seen as input data and received
by IEC type input process objects.
When this kind of input is updated the value is read by a command procedure and, if
necessary, converted before it is written to the actual output objects which send the
command to the process devices. The command procedure is activated through an event
channel, which is bound to the input object.
The number of the output process objects and the SCIL statements used for sending the
commands to the process devices depend on the protocol of the device. Each controllable
SPA object, for example the circuit breaker, has four output process objects, whereas
each RTU or IEC object has only one.
It is also possible to utilize the input data to perform arbitrary internal operations in the
application program. The procedures that are presented below cover the basic cases when
IEC commands and setpoints can be mapped directly onto the corresponding SYS 600
outputs. If a more complex relationship between input and outputs is desired, it is
necessary to build application specific command procedures.
Object commands
Object commands, such as switching device open/close commands or tap changer
raise/lower commands contain the ASDUs shown in Table 5.12 below. The table also
includes the type of process object that can receive these commands.
Table 5.12: ASDUs of the object commands and process objects that receive these
commands
Type id ASDU Description Process Object Type
45 C_SC_NA_1 Single Command Binary Input
76
1MRS756653 MicroSCADA Pro SYS 600 9.3
Issued: 31.3.2010 IEC 60870-5-101 Slave Protocol
Version: B/30.9.2012
Configuration Manual
The unit number (UN attribute) of the input process object must be the same as the STA
object number of the corresponding IEC slave station, and the address of the process
object must equal to the address of the command in the IEC master. Table 5.13 shows
the updated attributes of the input process objects, which receive commands.
Table 5.13: Updated attributes of the input process objects
Attribute Values Description
TY 45... 47, 58...60 Type identification of the ASDU
OV 0,1,2 Value of the command 0 = off, 1 = on (single command),
1 = off, 2 = on (double command), 1 = lower, 2 = higher
(regulating step command)
RA 0, 1 Execution information of the command: 1 = select, 0 =
execute
RB 0... 255 Qualifier of the command
CT 6, 8 Cause of transmission of the command
OG 0... 255 Originator address of the command
In the following examples the process object receiving the command has the same logical
name as the output objects. The station number of the IEC slave station is assumed to
be 1. The first example is a single command for a SPA device with output process object
indices as follows: open select 11, close select 12, execute 13 and cancel 13.
;send activation confirmation if execute command
#IF %RA == 0 #THEN #SET STA1:SCF = (256*%OG+%CT+1,'LN':POA'IX')
;reset status
@S = STATUS
;select
#IF %RA == 1 #THEN #BLOCK
#IF %OV == 0 #THEN #SET 'LN':POV11 = 1 ; open select
#ELSE #SET 'LN':POV12 = 1 ; close select
#BLOCK_END
;execute
77
SYS 600 9.3 MicroSCADA Pro 1MRS756653
The second example is a double command for a RTU device with one
output process object with index 13.
;reset status
@S = STATUS
;select
#IF %RA == 1 #THEN #BLOCK
#IF %OV == 0 #THEN #SET 'LN':POV11 = 1 ; open select
#ELSE #SET 'LN':POV12 = 1 ; close select
#BLOCK_END
;execute
#ELSE #SET 'LN':POV13 = 1
#BLOCK_END
Analog setpoints
Analog output block messages from the IEC master can be received by AI (Analog Input)
process objects.
The unit number (UN attribute) of the input process object must be the same as the STA
object number of the corresponding IEC slave station, and the address of the process
object must be equal to the address of the command in the IEC master.
The attributes in the following Table of the input process objects receiving the commands
are updated.
78
1MRS756653 MicroSCADA Pro SYS 600 9.3
Issued: 31.3.2010 IEC 60870-5-101 Slave Protocol
Version: B/30.9.2012
Configuration Manual
Table 5.14: The updated attributes of the input process objects receiving setpoint
commands
Attribute Values Description
TY 48...50, 61...63 Type identification of the ASDU
OV Real Value, range depends on the ASDU
RA 0, 1 Execution information of the command:
1 = select, 0 = execute
RB 0...255 Control status of the command
If the value of the setpoint command is a scaled or normalised value, its value range is
–32768...32767. It may be necessary to scale the value to another range by using a
procedure inverse to the one used for sending normalised and scaled analog values to
the IEC master. The scale object used in the following example is the same as the one
with analog inputs. The process device in this example does not support
select-before-execute analog setpoint commands.
;send activation confirmation if execute command
#IF %RA == 0 #THEN #SET STA1:SCF = (256*%OG+%CT+1,'LN':POA'IX')
;reset status
@S = STATUS
Bit strings
In IEC protocol it is possible to send 32-bit strings also from the master to the slave.
ASDU 51 and 64 are reserved for this purpose. Bit strings can be received by analog
input process objects as unsigned 32 bit integers. This analog value can be coverted to
a bit string by using SCIL statements.
79
SYS 600 9.3 MicroSCADA Pro 1MRS756653
Application commands are received by an IEC type analog input with a unit number
(UN attribute) equal to the STA object number of the IEC slave station. In addition to
this, the object address (OA attribute) should be 0. When an application command is
received, the attributes of the process object are updated as presented in Table 5.16.
Table 5.16: Updated attributes of the process object
Attribute Values Description
OV 100... 105 Type identification of the ASDU.
RA 0... 16777215 Information object address of the com-
mand. Depends on the value of the IL
attribute.
RB 0... 255 Qualifier of the command.
CT 6, 8 Cause of transmission of the command.
OG 0... 255 Originator address of the command. De-
pends on the value of the CL attribute.
This process object should execute the event channel and command procedures, which
recognise the incoming command, execute other command procedures depending on the
command and confirm the commands. An example of this kind of command procedure
is listed below. The sub-procedures are presented in the following sections.
#ERROR CONTINUE
;STA number and originator of the NCC
@STA_NR = 'LN':PUN'IX'
@ORIG = 'LN':POG'IX'
;general interrogation
#WHEN 100 #EXEC GENINT:C (@STA_NUMBER = %STA_NR,@ORIGINATOR =
%ORIG)
;counter interrogation
80
1MRS756653 MicroSCADA Pro SYS 600 9.3
Issued: 31.3.2010 IEC 60870-5-101 Slave Protocol
Version: B/30.9.2012
Configuration Manual
;read
#WHEN 102 #EXEC RDDATA:C (@STA_NUMBER =
%STA_NR,@READ_OBJECT_ADDRESS = %RA)
;reset process
#WHEN 105 #EXEC RESPRC:C (@STA_NUMBER = %STA_NR,@ORIGINATOR =
%ORIG)
#CASE_END
;cross-reference data
@FX = XREF_OBJECTS:VFX(%SIGNAL)
@STA_NR = DEC_SCAN(SUBSTR(%FX,1,5))
@TYPE = SUBSTR(%FX,6,9)
@CLASS = DEC_SCAN(SUBSTR(%FX,15,1))
@ADDR = DEC_SCAN(SUBSTR(%FX,16,8))
@PRI = DEC_SCAN(SUBSTR(%FX,24,1))
@OW = DEC_SCAN(SUBSTR(%FX,25,1))
81
SYS 600 9.3 MicroSCADA Pro 1MRS756653
IEC 60870-5-101 also contains a group interrogation function. When this function is
used, the signals to be sent to the IEC master are divided into groups which can be
interrogated one at the time. The command procedure listed above can be modified to
support group interrogations as follows:
• Interrogation group number (integer 1...16) is added to the cross-reference data
stored in the FX attribute.
• The number of the interrogation group is read from the RB attribute of the AI process
object that receives the command.
• The query condition of the command procedure is modified to search only the process
objects with the specified group number. Note that the group 20 stands for the general
interrogation and in this case all signals must be sent.
• When executing the group interrogation commands, the cause of transmission of
the signals must be set to 20+group number.
82
1MRS756653 MicroSCADA Pro SYS 600 9.3
Issued: 31.3.2010 IEC 60870-5-101 Slave Protocol
Version: B/30.9.2012
Configuration Manual
;cross-reference data
@FX = XREF_OBJECTS:VFX(%SIGNAL)
@STA_NR = DEC_SCAN(SUBSTR(%FX,1,5))
@TYPE = SUBSTR(%FX,6,9)
@CLASS = DEC_SCAN(SUBSTR(%FX,15,1))
@ADDR = DEC_SCAN(SUBSTR(%FX,16,8))
@PRI = DEC_SCAN(SUBSTR(%FX,24,1))
@OW = DEC_SCAN(SUBSTR(%FX,25,1))
;reset status
@S = STATUS
83
SYS 600 9.3 MicroSCADA Pro 1MRS756653
Read command
By using the Read command, the user can request the value of an individual signal from
the IEC master. The requested signal is sent with the cause of transmission value 5. Note
that pulse counters are not included in the Read command.
#ERROR CONTINUE
;cross-reference data
@FX = READ_OBJECT:VFX(1)
@STA_NR = DEC_SCAN(SUBSTR(%FX,1,5))
@TYPE = SUBSTR(%FX,6,9)
@CLASS = DEC_SCAN(SUBSTR(%FX,15,1))
@ADDR = DEC_SCAN(SUBSTR(%FX,16,8))
@PRI = DEC_SCAN(SUBSTR(%FX,24,1))
@OW = DEC_SCAN(SUBSTR(%FX,25,1))
84
1MRS756653 MicroSCADA Pro SYS 600 9.3
Issued: 31.3.2010 IEC 60870-5-101 Slave Protocol
Version: B/30.9.2012
Configuration Manual
@SUBS_VALUE = 1
@QUAL = %OR+16*%BL+32*%SB+64*%NT+128*%IV
#BLOCK_END
#WHEN 6 #BLOCK ; digital input
@SUBS_VALUE = 0
#BLOCK_END
#WHEN 9 #BLOCK ;analog input
@SUBS_VALUE = 0
@QUAL= %OV+2+16*%BL+32*%SB+64*%NT+128*%IV
#BLOCK_END
#WHEN 12 #BLOCK ;double binary input
@SUBS_VALUE = 1
@DPIS = (0,2,1,3)
@DPI = %DPIS(%OV+1)
@QUAL = BIT(%DPI,0)+2*BIT(%DPI,1)+16*%BL+32*%SB+64*%NT+128*%IV
#BLOCK_END
#CASE_END
85
SYS 600 9.3 MicroSCADA Pro 1MRS756653
System commands are received by a bit stream process object with a unit number equal
to the STA object number of the IEC slave station, and an address as defined by the CA
attribute of the IEC slave station. NET sends the messages to this process object as
transparent data and they must be interpreted by using SCIL statements.
Commands not recognised by NET are also sent to this process object, if this feature is
enabled by the RM attribute of the IEC slave station.
Since synchronisation is handled by the NET and the test command requires only a
confirmation, the only action needed is the confirmation of the system commands.
This process object should execute the event channel and command procedures, which
recognise the incoming command, interpret the address of the command, and confirm
the commands. An example of this kind of command procedure is listed below:
;STA number and originator address of the NCC
@STA_NR = 'LN':PUN'IX'
@ORIGINATOR = 'LN':POG'IX'
;unpack the system command
@SYS_CMD = UNPACK_STR(%BS,8)
;type of command
@CMD_TYPE = %SYS_CMD(3)
86
1MRS756653 MicroSCADA Pro SYS 600 9.3
Issued: 31.3.2010 IEC 60870-5-101 Slave Protocol
Version: B/30.9.2012
Configuration Manual
It is possible to exchange transparent messages between a SYS 600 IEC slave and an
IEC master. An example of this kind of messages could be SPA messages. Transparent
SPA messages are received by a bit stream process object and the corresponding reply
is sent as a confirmation by using the CF attribute of the IEC slave station.
The example shown in Figure 5.3 has two SYS 600 base systems, one as the network
control system (IEC master) and one as the substation control system (IEC slave). The
latter acts also as the master for several SPA devices. In this example, a transparent SPA
command is sent from the IEC master to the SPA unit via the SYS 600 IEC slave and
the answer from the SPA unit is sent back to the IEC master. The following steps are
taken according to Figure 5.3.
Step 1 : The SPA command “RF:” is sent from the IEC master to the
IEC slave to address 12345 as an encapsulated SPA message
(ASDU 133) by using the TD attribute as in the following:
Step 2 and 3: The message is received by the IEC slave in a bit stream process
object with the UN attribute equal to the STA object number of
the IEC slave station and the OA attribute value equal to the ad-
dress of the command, which is 12345 in this case. Attached to
this process object is an event channel, which activates a com-
mand procedure. The SPA message is parsed by the command
procedure as in the following:
@SPA_MSG = TYPE_CAST(%BS,"TEXT")
The SPA message is sent to the SPA unit and the corresponding
answer is read by using the SM attribute of the SPA station as in
the following:
Step 4: The answer is sent back to the IEC master as an activation con-
firmation of the command, i.e. the encapsulated SPA reply mes-
sage, as in the following:
@IEC_STA_NR = 'LN':PUN'IX'
@ORIG = 'LN':POG'IX'
@CMD_ADDR = 'LN':POA'IX'
@CMD_TYPE = 'LN':PTY'IX'
#SET STA'IEC_STA_NR':SCF = -
(256*%ORIG+7,%CMD_ADDR,%CMD_TYPE,%SPA_ASW)
87
SYS 600 9.3 MicroSCADA Pro 1MRS756653
The message is received by the IEC master in a bit stream process objects with the UN
attribute equal to the STA object number of the IEC slave station and the OA attribute
equal to the address of the command. In this case, the message can also be interpreted
by using the TYPE_CAST function to convert the message into text.
IEC 60870-5-101
By using a mechanism like the one described above, it is possible to read and write the
parameters of SPA units over an IEC 60870-5-101 line. The same kind of mechanism
can also be used for other purpose, e.g for exchanging free-format text messages between
the master and the slave.
In COM 500i command procedures COM_USFT and COM_IEFT handle the file
transmission. Command procedures check cyclically, if the source directory contains
files to be transmitted. Source directory is defined with the cross-reference tool. When
requested, the directory listing of transferable files is sent to the IEC 60870-5-101 master
protocol. File transfer commands contain the ASDUs shown in Table 5.18.
Table 5.18: ASDUs for File Transfer
Type id ASDU Description
120 F_FR_NA_1 File Ready
121 F_SR_NA_1 Section ready
122 F_SC_NA_1 Call directory, se-
lect file
88
1MRS756653 MicroSCADA Pro SYS 600 9.3
Issued: 31.3.2010 IEC 60870-5-101 Slave Protocol
Version: B/30.9.2012
Configuration Manual
In the IEC 60870-5-101 protocol the slave station sends a specific message, end of
initialisation (ASDU 70), after the slave station is initialised (i.e. when it is ready to
normal operation after start-up).
An example of a command procedure sends the end of initialisation message to the IEC
master. This command procedure can be executed, for example, from the predefined
command procedure APL_INIT_1. The execution should be timed so that the message
is sent after all the process objects are updated from the process devices.
;send end of initialization (zero address and value)
In case RM bit 7 is set to 0, these ASDUs can be received by the same bit stream process
object as system commands, and their handling can be included in the same command
procedure that handles the system commands.
By using the UNPACK_STR function, the parameter ASDU can be converted into a
vector whose elements are the octets of the message. The position and number of the
89
SYS 600 9.3 MicroSCADA Pro 1MRS756653
elements depend on the address lengths, i.e. the value of the PL, SL and IL attributes of
the IEC slave station.
In case RM bit 7 is set to 1, the incoming ASDUs 110-112 are handled as set-point
commands. In this case the updated process object is of type analog input and the OA
of the process object is defined by the information object address field of the incoming
message. With this configuration, the bitstream process object is not updated.
Table 5.20 presents the information elements of an ASDU 110 message as decimal
numbers. The IEC slave station has the following address length attributes: PL=1, SL=2,
IL=3, CL=2.
Table 5.20: The information elements of an ASDU 110 message
Octet Value Description
1 243 Control byte
2 12 Link address
3 110 Type id of ASDU
4 1 Variable structure qualifier (one ob-
ject)
5 6 Cause of transmission (activation)
6 0 Originator address
7 12 First byte of common address of
ASDU
8 0 Second byte of common address of
ASDU
9 123 First byte of information object ad-
dress
10 0 Second byte of information object ad-
dress
11 0 Third byte of information object ad-
dress
12 111 First byte of the value of the paramet-
er
13 0 Second byte of the value of the para-
meter
14 2 Qualifier of the parameter
15 108 Checksum of the message
The actions taken depend on the value of some of the octets. The values listed in
Table 5.21 are possible.
Table 5.21: The values of information elements
Octet Values
Type id of ASDU 110…113, see Table 5.19
Cause of transmission 6 = activate, 8 = deactivate
90
1MRS756653 MicroSCADA Pro SYS 600 9.3
Issued: 31.3.2010 IEC 60870-5-101 Slave Protocol
Version: B/30.9.2012
Configuration Manual
91
SYS 600 9.3 MicroSCADA Pro 1MRS756653
5.9 Interoperability
5.9.1 Interoperability
This companion standard presents sets of parameters and alternatives from which subsets
have to be selected to implement particular telecontrol systems. Certain parameter values,
such as the number of octets in the common address of ASDUs represent mutually
exclusive alternatives. This means that only one value of the defined parameters is
admitted per system. Other parameters, such as the listed set of different process
information in command and in monitor direction allow the specification of the complete
set or subsets, as appropriate for the applications. This clause summarises the parameters
of the previous clauses to facilitate a suitable selection for a specific application. If a
system is composed of equipment stemming from different manufacturers, it is necessary
that all the partners agree on the selected parameters.
The selected parameters should be marked in the white boxes as follows:
Function or ASDU is not used
(system-specific parameter)
System definition
92
1MRS756653 MicroSCADA Pro SYS 600 9.3
Issued: 31.3.2010 IEC 60870-5-101 Slave Protocol
Version: B/30.9.2012
Configuration Manual
(network-specific parameter)
Point-to-point Multipoint-partyline
(network-specific parameter)
93
SYS 600 9.3 MicroSCADA Pro 1MRS756653
(network-specific parameter)
Frame format FT 1.2, single character 1 and the fixed time out interval are used
exclusively in this companion standard.
Link transmission produce Address field of the link
Balanced transmission Not present (balanced transmission only)
Unstructured
When using an unbalanced link layer, the following ASDU types are returned in class
2 messages (low priority) with the indicated causes of transmission:
The standard assignment of ASDUs to class 2 messages is used as follows:
94
1MRS756653 MicroSCADA Pro SYS 600 9.3
Issued: 31.3.2010 IEC 60870-5-101 Slave Protocol
Version: B/30.9.2012
Configuration Manual
Three octets
Cause of transmission
(system-specific parameter)
One octet Two octets
95
SYS 600 9.3 MicroSCADA Pro 1MRS756653
96
1MRS756653 MicroSCADA Pro SYS 600 9.3
Issued: 31.3.2010 IEC 60870-5-101 Slave Protocol
Version: B/30.9.2012
Configuration Manual
File transfer
(station-specific parameter)
97
SYS 600 9.3 MicroSCADA Pro 1MRS756653
<2> M_SP_TA_1
<3> M_DP_NA_1
<4> M_DP_TA_1
<5> M_ST_NA_1
<6> M_ST_TA_1
<7> M_BO_NA_1
<8> M_BO_TA_1
<9> M_ME_NA_1
<10> M_ME_TA_1
<11> M_ME_NB_1
98
1MRS756653 MicroSCADA Pro SYS 600 9.3
Issued: 31.3.2010 IEC 60870-5-101 Slave Protocol
Version: B/30.9.2012
Configuration Manual
<13> M_ME_NC_1
<14> M_ME_TC_1
<15> M_IT_NA_1
<16> M_IT_TA_1
<17> M_EP_TA_1
<18> M_EP_TB_1
<19> M_EP_TC_1
<20> M_PS_NA_1
<21> M_ME_ND_1
<30> M_SP_TB_1
<31> M_DP_TB_1
<32> M_ST_TB_1
<33> M_BO_TB_1
<34> M_ME_TD_1
<35> M_ME_TE_1
<36> M_ME_TF_1
<37> M_IT_TB_1
<38> M_EP_TD_1
<39> M_EP_TE_1
<40> M_EP_TF_1
<45> C_SC_NA_1
<46> C_DC_NA_1
<47> C_RC_NA_1
<48> C_SE_NA_1
<49> C_SE_NB_1
<50> C_SE_NC_1
99
SYS 600 9.3 MicroSCADA Pro 1MRS756653
<70> M_EI_NA_1
<100> C_IC_NA_1
<101> C_CI_NA_1
<102> C_RD_NA_1
<103> C_CS_NA_1
<104> C_TS_NA_1
<105> C_RP_NA_1
<106> C_CD_NA_1
<110> P_ME_NA_1
<111> P_ME_NB_1
<112> P_ME_NC_1
<113> P_AC_NA_1
<120> F_FR_NA_1
<121> F_SR_NA_1
<122> F_SC_NA_1
<123> F_LS_NA_1
<124> F_AF_NA_1
<125> F_SG_NA_1
<126> F_DR_TA_1*
* Blank or X only.
Station initialization
(station-specific parameter)
Remote initialization
100
1MRS756653 MicroSCADA Pro SYS 600 9.3
Issued: 31.3.2010 IEC 60870-5-101 Slave Protocol
Version: B/30.9.2012
Configuration Manual
Read procedure
(station-specific parameter)
Read procedure
Spontaneous transmission
(station-specific parameter)
Spontaneous transmission
Bitstring of 32 bit M_BO_NA_1, M_BO_TA_1 and M_BO_TB_1 (if defined for a specific
project, see 7.2.1.1????????)
Measured value, normalized value M_ME_NA_1, M_ME_TA_1, M_ME_ND_1 and
M_ME_TD_1
Measured value, scaled value M_ME_NB_1, M_ME_TB_1 and M_ME_TE_1
Measured value, short floating point number M_ME_NC_1, M_ME_TC_1 and M_ME_TF_1
Station interrogation
(station-specific parameter)
global
101
SYS 600 9.3 MicroSCADA Pro 1MRS756653
Clock synchronization
(station-specific parameter)
Clock synchronization
Command transmission
(station-specific parameter)
Direct command transmission
No additional definition
Persistent output 1)
1) The qualifier field of the command updates the RB attribute of the process object. This
value is freely used by the MicroSCADA application.
Counter read
102
1MRS756653 MicroSCADA Pro SYS 600 9.3
Issued: 31.3.2010 IEC 60870-5-101 Slave Protocol
Version: B/30.9.2012
Configuration Manual
Counter reset
Parameter loading
(station-specific parameter)
Threshold value
Smoothing factor
Parameter activation
(station-specific parameter)
Act/deact of persistent cyclic or periodic transmission of the addressed object
Test procedure
(station-specific parameter)
Test procedure
File transfer
(station-specific parameter)
File transfer in monitor direction
Transparent file
103
SYS 600 9.3 MicroSCADA Pro 1MRS756653
Background scan
(station-specific parameter)
Background scan
104
1MRS756653 MicroSCADA Pro SYS 600 9.3
Issued: 31.3.2010 IEC 60870-5-101 Slave Protocol
Version: B/30.9.2012
Configuration Manual
The following SCIL procedures make the communication system configuration which
is related to the base system configuration example presented earlier in this document.
The first procedure creates an IEC 60870-5-101 Slave line and two stations on this line.
;***************************************************************************
; INPUT PARAMETERS
@NET = 3 ; NODE NUMBER OF THE PC-NET
@MODE = 0 ; BALANCED MODE
@LINE = 1 ; LINE NUMBER
@STATIONS = (1,2) ; SLAVE STATION NUMBERS
@APPLIC = 1 ; APPLICATION NUMBER
;***************************************************************************
; CREATE A IEC 60870-5-101 LINE TO NET
#IF NET'NET':SPO'LINE'==0 #THEN #BLOCK
#IF %MODE==0 #THEN #BLOCK
#SET NET'NET':SPO'LINE' = 30 ;balanced IEC 60870-5-101
;slave
#SET NET'NET':SLK'LINE' = 12 ;link type
#SET NET'NET':SPD'LINE' = 5000;polling detection (ms)
#BLOCK_END
#ELSE_IF %MODE==1 #THEN #BLOCK
#SET NET'NET':SPO'LINE' = 29 ;unbalanced IEC 60870-5-101
;slave
#SET NET'NET':SLK'LINE' = 4 ;link type
#SET NET'NET':SPD'LINE' = 30000 ;polling detection (ms)
#BLOCK_END
#SET NET'NET':SSD'LINE' = "COM1" ;system device name
#SET NET'NET':SMS'LINE' = %APPLIC ;message application
#SET NET'NET':SMI'LINE' = %LINE+(6000+(%NET*100)) ;message
identifier
#SET NET'NET':SBR'LINE' = 9600 ;baud rate
#SET NET'NET':SPY'LINE' = 2 ;parity
#SET NET'NET':SRD'LINE' = 8 ;receive bit count
#SET NET'NET':STD'LINE' = 8 ;transmit bit count
#SET NET'NET':SSB'LINE' = 1 ;stop bit count
#SET NET'NET':SPS'LINE' = 20 ;buffer pool size
#SET NET'NET':SDE'LINE' = 50 ;CTS delay (ms)
#SET NET'NET':STW'LINE' = 0 ;transmission wait delay (ms)
#SET NET'NET':SHT'LINE' = 2000 ;header timeout (ms)
#SET NET'NET':STI'LINE' = 2 ;timeout interval (s)
#SET NET'NET':SRK'LINE' = 0 ;RTS keep up padding
;characters
#SET NET'NET':SRI'LINE' = 0 ;receiver disabling time (ms)
#SET NET'NET':SEN'LINE' = 3 ;enquiry limit
105
SYS 600 9.3 MicroSCADA Pro 1MRS756653
#BLOCK_END
;***************************************************************************
; CREATE IEC 60870-5-101 STATIONS TO NET
#LOOP_WITH I = 1..LENGTH(%STATIONS)
@STA=%STATIONS(%I)
#SET NET'NET':SDV(29) = (%STA,%LINE) ;create station to line
#SET STA'STA':SAL = 1 ;allocated
#SET STA'STA':SAS = %APPLIC ;allocated system
#SET STA'STA':SMI = 1000+%STA ;message identification
#SET STA'STA':SMS = %APPLIC ;message application
#SET STA'STA':SSE = 1 ;system messages enabled
#SET STA'STA':SSA = %STA ;station address
#SET STA'STA':SSL = 2 ;station address length (bytes)
#SET STA'STA':SPA = %STA ;polling address link address)
#SET STA'STA':SPL = 1 ;polling address length (bytes)
#SET STA'STA':SIL = 3 ;info addr. length (bytes)
#SET STA'STA':SCL = 1 ;COT length (bytes)
#SET STA'STA':STC = 0 ;time synchronisation (0,1,2,3)
#SET STA'STA':SCA = 32000 ;command address
#SET STA'STA':SPC = 0 ;data conf. (0=man, 1=auto)
#SET STA'STA':SMT = 15 ;manual conf waiting time (s)
#SET STA'STA':SST = 5000 ;SYS waiting time (ms)
#SET STA'STA':SSU = 0 ;summer time (0=no, 1=yes)
#SET STA'STA':SRW = 10 ;reply window size
#SET STA'STA':SML = 230 ;max. message length
#SET STA'STA':SDR = 0 ;direction
#SET STA'STA':SSR = 0 ;single char response
#SET STA'STA':SRM = 0 ;running mode
#SET STA'STA':SIU = 1 ;set station in use
#LOOP_END
; Set line in use
#SET NET'NET':SIU'LINE' = 1
The second example is for configuring one IEC station with redundant lines:
@NET = 3 ; NODE NUMBER OF THE PC-NET
@MODE = 1 ; UNBALANCED MODE
@LINE = 2 ; LINE NUMBER
@RED_LINE= 7 ; REDUNDANT LINE
@STA = 2 ; SLAVE STATION NUMBER
@APPLIC = 1 ; APPLICATION NUMBER
;***************************************************************************
; CREATE THE IEC 60870-5-101 MAIN LINE TO NET
#IF NET'NET':SPO'LINE'==0 #THEN #BLOCK
#IF %MODE==0 #THEN #BLOCK
#SET NET'NET':SPO'LINE' = 30 ;balanced IEC 60870-5-101
;slave
#SET NET'NET':SLK'LINE' = 12 ;link type
106
1MRS756653 MicroSCADA Pro SYS 600 9.3
Issued: 31.3.2010 IEC 60870-5-101 Slave Protocol
Version: B/30.9.2012
Configuration Manual
107
SYS 600 9.3 MicroSCADA Pro 1MRS756653
108
1MRS756653 MicroSCADA Pro SYS 600 9.3
Issued: 31.3.2010 IEC 60870-5-101 Slave Protocol
Version: B/30.9.2012
Configuration Manual
The third example is for an IEC 60870-5-101 slave line with dial-up and two IEC stations.
;***************************************************************************
; INPUT PARAMETERS
@NET = 3 ; NODE NUMBER OF THE PC-NET
@MODE = 1 ; 0 = BALANCED MODE, 1 = BALANCED MODE
@LINE = 2 ; LINE NUMBER
@STATIONS = (1,2) ; MASTER STATION NUMBERS
@APPLIC = 1 ; APPLICATION NUMBER
;***************************************************************************
; CREATE A IEC 60870-5-101 SLAVE DIAL-UP LINE TO NET
#IF NET'NET':SPO'LINE'==0 #THEN #BLOCK
#IF %MODE==0 #THEN #BLOCK
#SET NET'NET':SPO'LINE' = 32 ;balanced IEC 60870-5-101
;master
#SET NET'NET':SLK'LINE' = 12 ;link type
#SET NET'NET':SPD'LINE' = 5000;polling delay (ms)
#SET NET'NET':SRI'LINE' = 0 ;receiver disabling time (ms)
#BLOCK_END
#ELSE_IF %MODE==1 #THEN #BLOCK
#SET NET'NET':SPO'LINE' = 31 ;unbalanced IEC 60870-5-101
;master
#SET NET'NET':SLK'LINE' = 1 ;link type
#SET NET'NET':SPD'LINE' = 500 ;polling delay (ms)
#SET NET'NET':SRI'LINE' = 5 ;receiver disabling time (ms)
#SET NET'NET':SPL'LINE' = 10 ;polling limit
#BLOCK_END
#SET NET'NET':SPP'LINE' = 10 ;polling period(ms)
#SET NET'NET':SRP'LINE' = 1 ;reply polling
#SET NET'NET':SMS'LINE' = %APPLIC ;message application
#SET NET'NET':SMI'LINE' = %LINE+(6000+(%NET*100));message
identifier
#SET NET'NET':SBR'LINE' = 9600 ;baud rate
#SET NET'NET':SPY'LINE' = 2 ;parity
#SET NET'NET':SRD'LINE' = 8 ;receive bit count
#SET NET'NET':STD'LINE' = 8 ;transmit bit count
#SET NET'NET':SSB'LINE' = 1 ;stop bit count
#SET NET'NET':SPS'LINE' = 20 ;buffer pool size
#SET NET'NET':SDE'LINE' = 50 ;CTS delay (ms)
#SET NET'NET':STW'LINE' = 0 ;transmission wait delay (ms)
#SET NET'NET':SHT'LINE' = 50 ;header timeout (ms)
#SET NET'NET':STI'LINE' = 50 ;timeout interval (ms)
#SET NET'NET':SRK'LINE' = 0 ;RTS keep up padding characters
#SET NET'NET':SEN'LINE' = 3 ;enquiry limit
#SET NET'NET':SAC'LINE' = 1 ;autocaller enabled
#SET NET'NET':SIU'LINE' = 1 ;set line in use, initialize modem
#BLOCK_END
109
SYS 600 9.3 MicroSCADA Pro 1MRS756653
110
1MRS756653 MicroSCADA Pro SYS 600 9.3
Issued: 31.3.2010 IEC 60870-5-101 Slave Protocol
Version: B/30.9.2012
Configuration Manual
Index
Command
A Procedures, 67
AA, 76 Transaction, 75
AC, 38 Command Address, 27
Addressing, 53 Command Confirmation, 63
AF, 76 Command Control, 35
AI, 78 Command Delay, 27
AL, 25 Command procedures, 67
Allocating Application, 26 Command transaction, 75
Allocation, 25 Common address of ASDU, 53
AN, 76 Configuration, 11
Analog ConFirmation Mode, 29
Inputs, 69 Connected Station, 39
setpoints, 78 Connection, 39
Analog Inputs, 69 Connection Time, 39
APDU, 16 Connection Time Limited, 39
Application Backup, 9 Counter interrogation, 83
Application commands, 80 Cross-reference data, 68
Application Service Data Units (ASDUs), 24, 25, 51 CS, 39
AS, 26, 38 CT, 29, 39, 80
AT command, 38, 40, 41 CTS, 18, 20
Autocaller AT S Register, 41 CTS Delay, 18
Autocaller Enabled, 38 CTS signal, 18, 49
Autocaller State, 38 CY, 59
B D
Backup copies, 9 Data commands, 76
Balanced mode, 52 Data flow, 54
Baud Rate, 16 DC, 21, 32
Bit Strings, 74 DCD, 20
BL, 59 DCD signal, 21, 41, 49
BR, 16 DD, 40
Buffer Pool Size, 16 DE, 18
Diagnostic Counters, 21, 32
Digital Inputs, 72
C Double Indications, 71
CA, 27, 30, 59, 86
Carrier Blocking, 21 E
Cause of transmission (COT), 58, 61, 63, 80, 81, 90
Cause of Transmission (COT), 25 EA, 28
CB, 21 EN, 19
CC, 35 End of initialisation, 89
CD, 27 Enhanced Protocol Architecture (EPA), 51
CF, 29, 63, 75, 85 Enquiry Limit, 19
CL, 25, 39 EV, 34, 55, 60, 69, 74
CN, 39 Event buffer overflow Address, 28
COM 500i, 67 Event channel, 55, 68
111
SYS 600 9.3 MicroSCADA Pro 1MRS756653
H N
Header Timeout, 18 NCC, 67
HT, 18 NET, 32, 53
Network topologies, 13, 14
I No limitations, 13
NT, 59
IEC 60870-5-101 master protocol, 6
IEC 60870-5-101 slave protocol, 11 O
IEC Slave
COM 500i, 67 OA, 80
IL, 25, 68, 89 Object commands, 76
Information Address Length, 25 Object Status, 33
Information object address, 53 OF, 59
Input data, 54 OG, 80
Integrated link, 11 OM, 22
Integrated totals, 73 Open Systems Interconnection, 51
In Use, 15, 23 Open Systems Interconnection (OSI), 51
Invalid Time, 30 Operating Mode, 22
IU, 15, 23, 38 OR, 59
IU attribute, 15, 23 OS, 33
IV, 30, 59 Output data, 55
OV, 59, 79, 80
112
1MRS756653 MicroSCADA Pro SYS 600 9.3
Issued: 31.3.2010 IEC 60870-5-101 Slave Protocol
Version: B/30.9.2012
Configuration Manual
113
SYS 600 9.3 MicroSCADA Pro 1MRS756653
114
Contact us
www.abb.com/substationautomation