IEC 870-5-104 Sinaut
IEC 60870-5-104 Sinaut communication protocol
Supported device types and versions
Communication line configuration
Communication station configuration
Station protocol parameters
I/O tag configuration
Tell commands
Literature
Document revisions
Supported device types and versions
The protocol is a modification of the IEC 870-5-104 protocol working on the basis of TCP network communication. The protocol has been modified specifically for redundant communication with the Siemens Sinaut Spectrum system. It supports the balanced mode and both active and passive establishment of the communication (a connecting party and a listening party) according to the station protocol parameters and therefore allows to interconnect not only the D2000 system with the Sinaut system but also two D2000 systems.
Picture: the D2000 redundant system communicating with Sinaut redundant system in a redundant network
The picture above shows TCP connections - each process D2000 KOM (D2000 Hot, D2000 StandBy) with each Sinaut (Sinaut Hot, Sinaut StandBy)
Implementation according to the standard IEC870-5-104 is following:
Originator ASDU address - is 1 byte, it is defined as a line number.
ASDU address - is 2 bytes, it is defined as station address. For each station on one line, a different ASDU address must be defined.
Note: Because of the Sinaut data model, the low and high address bytes are exchanged (in contrast to the standard IEC 104 implementation), i.e. a big-endian instead of a little-endian is used.
Example:
station address=1, ASDU address is sent as bytes 0, 1
station address=513 (2*256+1), ASDU address is sent as 2, 1 bytes
For better orientation, station address may be defined in the form of ByteHI, ByteLO, i.e. address 2,1 is the same as 513Cause of transmission - is 2 bytes (it also contains Originator ASDU address)
Information object address - 3 bytes, it is defined as I/O tag address
Note: Because of the Sinaut data model, the low and high address bytes are exchanged (in contrast to the standard IEC 104 implementation), i.e. a big-endian instead of a little-endian is used.
Example:
I/O tag address=1, ASDU address is sent as bytes 0, 0, 1.
I/O tag address=66051(1*65536+2*256+3), ASDU address is sent as bytes 1, 2, 3.
For better orientation, the I/O tag address may be defined in the form of ByteLO, ByteMIDDLE, ByteHI, i.e. address 1,2,3 is sent as bytes 1, 2, 3.
The following ASDU types in the monitoring direction (from Sinaut system to D2000 system and also vice-versa in balanced mode) are implemented:
Table 1
ASDU type | I/O tag types |
|---|---|
1 - Single-point information | Di, Qi (On/Off), Ai, Ci |
2 - Single-point information with a time tag | Di, Qi (On/Off), Ai, Ci |
3 - Double-point information | Qi, Ai, Ci |
4 - Double-point information with a time tag | Qi, Ai, Ci |
5 - Step position information | Ci, Ai * |
6 - Step position information with a time tag | Ci, Ai * |
7 - Bitstring of 32 bits | Ci, Ai |
8 - Bitstring of 32 bits with a time tag | Ci, Ai |
9 - Measured value, normalized value | Ai |
10 - Measured value, normalized value with time tag | Ai |
11 - Measured value, scaled value | Ci, Ai |
12 - Measured value, scaled value with time tag | Ci, Ai |
13 - Measured value, short floating point value | Ai |
14 - Measured value, short floating point value with time tag | Ai |
15 - Integrated totals | Ci, Ai |
16 - Integrated totals with time tag | Ci, Ai |
17 - Event of protection equipment with time tag | Ci, Ai, TiR ** |
18 - Packed start events of protection equipment with time tag | Ci, Ai, TiR *** |
20 - Packed single-point information with status change detection | Ci, Ai |
21 - Measured value, normalized value without quality descriptor | Ai |
30 - Single-point information with time tag CP56Time2a | Di, Qi (On/Off), Ai, Ci |
31 - Double-point information with CP56Time2a tag | Qi, Ai, Ci |
32 - Step position information with CP56Time2a tag | Ci, Ai * |
33 - Bitstring of 32 bits with CP56Time2a tag | Ci, Ai |
34 - Measured value, normalized value with CP56Time2a tag | Ai |
35 - Measured value, scaled value with CP56Time2a tag | Ci, Ai |
36 - Measured value, short floating point value with time tag CP56Time2a | Ai |
37 - Integrated totals with time tag CP56Time2a | Ci, Ai |
38 - Event of protection equipment with time tag CP56Time2a | Ci, Ai, TiR ** |
39 - Packed start events of protection equipment with time tag CP56Time2a | Ci, Ai, TiR *** |
40 - Packed output circuit information of protection equipment with time tag CP56Time2a | Ci, Ai, TiR *** |
Note: Individual bits of the quality byte (SIQ for ASDU 1,2,30; DIQ for ASDU 3,4,31; QDS for 5..14,20,32..36) are mapped to the flags A (bit 0), B (bit 1) .. H (bit 7).
For example:
for ASDU 4: A=DPI bit 0, B=DPI bit 1, C=0, D=0, E=BL bit, F=SB bit, G=NT bit, H=IV bit.
for ASDU 16: A..E = Sequence number bits 0..4, F=CY bit, G=CA bit, H=IV bit
Moreover:
if IV (Invalid) bit is set, the value status will be Invalid
if any of NT (Not topical), SB (Substituted), BL (Blocked), OV (Overflow), CA (Counter adjusted), CY (Counter overflow) bits are set for corresponding ASDU types, the value status will be Weak.
* - T-bit of the value of these ASDUs is mapped to the I flag, a number in range -64 .. +63 goes to a variable of Ci/Ai type
** - ASDU 17 and 38: SEP byte is in the flags A (bit 0), B (bit 1) .. H (bit 7), following 2 bytes (CP16Time2a) are in a variable of Ci/Ai type as a positive number (0-60 000) or they are in a variable of TiR type as a relative time (0-60 seconds)
The following ASDU types are implemented in the control direction (from D2000 system to Sinaut system and vice-versa in balanced mode):
Table 2
ASDU type | I/O tag type |
|---|---|
45 - Single command | Dout |
46 - Double command | Dout, Co |
47 - Regulating step command | Dout |
48 - Set point command, normalised value | Ao |
49 - Set point command, scaled value | Co |
50 - Set point command, short floating point value | Ao |
51 - Bitstring of 32 bit | Co |
58 - Single command with time tag CP56Time2a | Dout |
59 - Double command with time tag CP56Time2a | Dout, Co |
60 - Regulating step command with time tag CP56Time2a | Dout |
61 - Set point command, normalised value with time tag CP56Time2a | Ao |
62 - Set point command, scaled value with time tag CP56Time2a | Co |
63 - Set point command, short floating point value with time tag CP56Time2a | Ao |
64 - Bitstring of 32 bit with time tag CP56Time2a | Co |
To set the bits of the "status" byte (SCO for ASDU 45,58; DCO for ASDU 46,59; RCO for ASDU 47,60; QOS for ASDU 48..50,61..63), flags A (bit 0), B (bit 1) .. H (7.bit) are used except the bits, which are directly set by the variable value ( SCO bit 0, DCO and RCS bits 0-1). Having received a response (positive/negative), the A .. H flags are set according to the bits of the "status" byte.
When sending commands (ASDUs 45-64), the value of 6 [Activation] is used as CauseOfTransmission. Whether a response is expected from the controlled station depends on the CMDC parameter. These options are available:
Writing is considered successful if a packet with RSN confirming the SSN packet with the write command is received.
Writing is considered finished if a response with CauseOfTransmission=7 [Activation Confirmation] and/or 10 [Activation Termination] is received. Success/failure depends on the setting of the P/N bit in received CauseOfTransmission.
Redundant communication with Siemens Sinaut system - basic features:
One communication line of a TCP/IP-TCP Redundant type communicates with two redundant Sinaut partners, one of them is HOT, the other is STANDBY.
Communication with each of the partners is performed via two redundant networks (i.e. two TCP connections are created for each Sinaut, so altogether there are four TCP connections by every D2000 KOM process).
Only the HOT partner (D2000 or Sinaut) is allowed to send new values and reply to ASDU 100 [Interrogation Command]. Having established the connection, the STANDBY partner only sends confirmations (S-frames) and test frames. However, the STANDBY partner may also send ASDU 100 [Interrogation Command].
Each participant communicates with a partner through a single TCP connection. It sends new values, command confirmations, ASDU 100, and replies to ASDU 100 through this connection. The second connection is not used (except for sending test frames) and it is only used when a failure on the first connection is detected.
Establishing a connection:
In the active mode, the D2000 KOM process connects to specified TCP ports. It sends a StartDT Act U-frame to each of the ports and waits for StartDT Con reply.
In the passive mode, the D2000 KOM process waits on a specified TCP port (see the SP, SH parameters). When the clients are connected, the process waits for a StartDT Act U-frame and sends a StartDT Con reply.
Further communication is completely symmetrical. Both partners can send ASDU 100 [Interrogation Command] in order to read all current values and then the partners receive and send changed values and commands.
Having established the connection, a partner may send I-frame with ASDU 100 [Interrogation Command] with CauseOfTransmission=6 [Activation] and with ASDUAddres=FFFF, whereby it requests the values of I/O tags for all stations. As a replay, the partner waits for:
receiving an I-frame with ASDU 100 [Interrogation Command] and with CauseOfTransmission=7 and ASDU Address=FFFF
receiving the current values of all I/O tags
receiving an I-frame with ASDU 100 [Interrogation Command] and with CauseOfTransmission=10 and ASDU Address=FFFF
Forced disconnection: If all communication stations on the line are in the simulation mode or the communication is stopped for them, the communication line will be disconnected (communication sockets will be closed). When the simulation mode is turned off or the communication is enabled for at least one station (the Parameters tab of the Station type object), the line will be reconnected (and Interrogation Command and/or Counter Interrogation Command will be sent to this active station). Then, when other stations are enabled, the Interrogation Command and/or Counter Interrogation Command is sent to this station; see the next point.
Forced sending of Interrogation Command or Counter Interrogation Command: If a station is not in the simulation mode and the communication is not disabled (the Parameters tab of the Station type object), the D2000 KOM process sends Interrogation Command and/or Counter Interrogation Command (see the OIC and OCIC parameters).
The IEC870-5-104 Sinaut protocol supports the balanced mode described in the communication protocol IEC 870-5-104 - it is partly a server, so it must comply with the rules of server protocols.
Communication line configuration
Communication line category: TCP/IP-TCP Redundant
TCP parameters:
Host: string containing at most 80 characters – two comma-separated server IP addresses in the form of a.b.c.d
In the active mode, they are the addresses of the server, to which the D2000 KOM process is connecting.
In the passive mode (see the parameters SP, SH), they are the IP addresses of clients, which are accepted by the D2000 KOM process (if the client is connecting from other IP address, it will be disconnected).Port: TCP port number (0...65535)
In the active mode, it is the server port, where the D2000 KOM process is connecting to.
In the passive mode (see the SP, SH parameters), the parameter will be ignored (however it must be specified, set it e.g. to 0).Line number: it is used as Originator ASDU address (1 byte, 0-255).
Communication station configuration
Communication protocol: IEC870-TCP Sinaut.
The station address is a decimal number within the range of 0 až 65535, it defines the ASDU address.
For better orientation, the station address may be defined in the form of ByteHI, ByteLO, i.e. address 2,1 is the same as 513 (2*256 + 1). See a note about the ASDU address.
Note: The protocol supports sending long timestamps (CP56Time2a tag) in local time or UTC time with defined offset (see the Use monotonic UTC time+ parameter ).
Station protocol parameters
Station configuration dialog box - tab Protocol parameters.
They influence some of the optional protocol parameters. The following station protocol parameters can be defined:
Table 3
Full name | Meaning | Unit | Default value |
|---|---|---|---|
Command Confirm | Confirmation of control ASDUs. | - | 3 |
Debug Input | A mask for a debug level of the input data. Meaning of individual bits:
| 0 .. 255 | 0 |
Debug Output | A mask for a debug level of the output data. Meaning of individual bits:
| 0 .. 255 | 0 |
ICCP compatible flags | It allows a flag mapping that is compatible with the Sinaut Spectrum ICCP OPC communication. For more information see ICCP compatible flag mapping. | YES/NO | NO |
Ignore Flagged | The parameter allows specifying the flags of values (data ASDUs 1-40), which - if set - will cause the incoming value to be discarded. The parameter was implemented when it was necessary to filter out the "Non-topical" flag values that came from the communication partner. The mapping of individual flags from ASDU to A..H flags is as follows:
| A..H | - |
Ignore Unknown Addresses | If this parameter is set to True, the D2000 KOM process will not report an error (display an error on its console or write it into the line log file) in case that incoming value has an address which does not match any of the addresses of I/O tags defined in the D2000 system. | - | False |
Interrogation Covers Counter Interrogation | As a reply to Interrogation, also values of I/O tags configured as ASDUs 15,16,37 (Integrated Totals) will be sent, which are usually requested by ASDU 101 [Counter Interrogation]. | - | True |
K (max outstanding I APDUs) | Sending window size i.e. number of packets, which are sent by the D2000 KOM process without receiving a confirmation (S-frame or I-frame). According to the standard, the default value is 12. | - | 12 |
No Flags | If the parameter is True, then the status byte of incoming ASDUs is ignored and not saved into the flags A...H. Flags of output I/O tags are also ignored and they not written to the status byte. | - | False |
Order of Counter IC | The order for sending of sending ASDU 101 [Counter Interrogation Command] when the station starts to communicate or when a new station is created. If OCIC<OIC, ASDU 101 will be sent before ASDU 100. If OCIC=0, ASDU 101 will not be sent. The parameter can be set separately for each station. | - | 0 |
Order of IC | The order for sending ASDU 100 [Interrogation Command] when the station starts to communicate or when a new station is created. If OIC<OCIC, ASDU 100 will be sent before ASDU 101. If OIC=0, ASDU 100 will not be sent. The parameter can be set separately for each station. | - | 1 |
Ping Count | A number of repetitions, after which the IP address not responding to ping is to be known as non-functional. | - | 3 |
Ping TimeOut | If the parameter is non zero, it defines the timeout (in milliseconds) of a server response to a ping (ICMP echo) packet. In the background, the D2000 KOM process sends ping packets to all four configured IP addresses. If an IP address repeatedly does not respond Ping Count-times, it is marked as non-functional and the connection is terminated. If the parameter PTO=0, sending ping packets to IP addresses is disabled. | - | 0 |
Post Start Delay | When the connection is being established, this parameter defines the delay between receiving StartDT Con response and sending Interrogation Command and/or Counter Interrogation Command. | ms | 0 |
Send Sequence Number | Initial SSN. According to the standard, after establishing the connection the SSN is set to 0, values other than zero could be used e.g. for testing. | - | 0 |
Server Port, Server Host | The port number and IP address of the interface where the D2000 KOM process should listen (in a listening mode). If both parameters are defined, the D2000 KOM process works as passive (it is waiting for connecting Sinaut clients). If the process should listen on all network interfaces, Server Host must be set to ALL. | - |
|
Standby Keep Open |