Skip to main content

IEC 60870-5-101 over TCP

The IEC 60870-5-101 driver connects YTCC to RTUs that speak IEC 101, through a TCP connection: a terminal server, a serial-to-Ethernet converter or an RTU with a TCP port. For what all drivers have in common, see How drivers work.

Protocol and role​

RoleControlling station (master). YTCC connects to the RTUs and polls them.
TransportIEC 101 frames (FT 1.2) over TCP, unbalanced transmission
PortNo default; enter the port of the terminal server or the RTU
Devices per driverAny number of RTUs, one RTU per host and port
Driver typeIEC 101 (iec101)

Device parameters​

Set these on the device in Drivers → devices (see Add drivers and devices). An empty box uses the default shown in it. The help mark next to each parameter shows a short description.

New device form of an IEC 101 device, scrolled to Data bits, Dir bit, Frame log, GI on connect, GI period (s), GI QOI, GI timeout (s), Host, IOA size 3 and Link addr size 1.

ParameterDefaultRangeMeaning
Transport— (required)TCPUse TCP.
Host— (required)IP address or host nameAddress of the terminal server or the RTU.
Port— (required)1–65535TCP port.
Serial path, Baud rate, Parity, Data bits, Stop bits—, 9600, Even, 8, 1—For a serial transport; not used with TCP.
Connect timeout (ms)50000 and moreHow long the driver waits when it opens the TCP connection.
Reconnect max (ms)5000500–600000Longest wait between two connection attempts; see Reconnecting.
Link modeUnbalancedUnbalancedUse Unbalanced.
Link address— (required)must fit Link addr sizeLink address of the RTU.
Link addr size— (required)1 or 2 bytesSize of the link address.
Response timeout (ms)100050 and moreHow long the driver waits for each answer of the RTU.
Max retries30–10How often a frame is sent again before the link counts as lost.
Poll interval (ms)25010 and morePause between class 2 polls when the RTU has no data.
Use link status requestonon / offAsk for the link status before resetting the link.
Dir bit, Link test interval (ms), Send single char ackon, 10000, off—For the balanced link mode; not used with Unbalanced.

Application layer​

ParameterDefaultRangeMeaning
COT size— (required)1 or 2 bytesSize of the cause of transmission.
CA size— (required)1 or 2 bytesSize of the common address.
IOA size— (required)1, 2 or 3 bytesSize of the information object address.
Common addressthe link addressmust fit CA sizeCommon address of the ASDU.
Originator address00–255Originator address; sent only with a 2-byte COT.

The sizes have no default: take them from the RTU's interoperability list.

Interrogation, counters and clock​

ParameterDefaultMeaning
GI on connectonSend a general interrogation each time the link comes up. Keep it on.
GI QOI20Qualifier of the interrogation: 20 station, 21–36 group 1–16.
GI period (s)0Repeat the general interrogation at this interval; 0 is off.
GI timeout (s)60How long the driver waits for the end of an interrogation (also of a counter interrogation).
Counter interrogation period (s)0Send a counter interrogation at this interval; 0 is off.
Counter QCC5Qualifier of the counter interrogation.
Clock sync on connectonSet the RTU clock each time the link comes up.
Clock sync period (s)3600Repeat the clock synchronisation at this interval; 0 is off.
Clock sync modeSequentialSequential, Once per host or Parallel: how RTUs behind the same host are synchronised.
Time offset minutes0Offset of the RTU clock from UTC. For an RTU on Turkish local time, enter 180.

Commands and other​

ParameterDefaultMeaning
Cmd timeout (ms)10000How long the driver waits for the confirmation of each command step.
Cmd wait terminationoffCount a command as complete only after the activation termination, for all signals of the RTU.
Set invalid on disconnectonWhen the link is lost, mark all signals of the RTU as Bad · Not connected. When off, nothing changes on screen.
Read cmdonAsk for the current value of a signal that is added while the driver runs.
Frame logOffOff, Asdu or All: write the frames to the driver log, for troubleshooting.

Changing any device parameter except Read cmd reconnects that RTU. Adding, removing or changing signals takes effect without dropping the link and without a new interrogation.

Signal address​

Set the address on the Value source tab of the signal, under Address — IEC 101: the IOA, 0–16777215, and it must fit IOA size. In import files, write the number, optionally with IOA in front (see Import and export with Excel or CSV).

Value source tab of the signal Feeder7.Breaker with the IOA field under Address — IEC 101.

The monitoring type is not configured: YTCC takes it from the messages of the RTU. A monitored point and a command point can use the same IOA; incoming data goes to the monitored point.

Monitoring types​

TypeWithout timeWith CP24 timeWith CP56 timeValue in YTCC
Single point1 M_SP_NA2 M_SP_TA30 M_SP_TBOn or off
Double point3 M_DP_NA4 M_DP_TA31 M_DP_TB0 intermediate, 1 off, 2 on, 3 indeterminate
Step position5 M_ST_NA6 M_ST_TA32 M_ST_TBInteger; Uncertain while in transition
Bitstring of 32 bits7 M_BO_NA8 M_BO_TA33 M_BO_TBUnsigned number
Measured value, normalised9 M_ME_NA (21 without quality)10 M_ME_TA34 M_ME_TD−1 to +1
Measured value, scaled11 M_ME_NB12 M_ME_TB35 M_ME_TEInteger
Measured value, short float13 M_ME_NC14 M_ME_TC36 M_ME_TFFloating-point number
Integrated totals15 M_IT_NA16 M_IT_TA37 M_IT_TBInteger; Bad when the counter is invalid

Reading​

The driver polls the RTU: class 1 data whenever the RTU reports it has some, otherwise class 2 data, with Poll interval (ms) between empty answers. When the link comes up, it synchronises the clock and sends a general interrogation (if switched on). When the RTU reports a restart (end of initialisation), the start-up sequence runs again.

Commands​

A signal can be commanded when its Access is Read / Write or Write only. Its settings are under IEC 60870-5 on the Command tab of the signal:

SettingMeaning
Command typeSingle (C_SC), Double (C_DC), Regulating step (C_RC), Setpoint normalized (C_SE_NA), Setpoint scaled (C_SE_NB) or Setpoint float (C_SE_NC).
Qualifier (0 … 31)The qualifier of the command (QU), sent as it is.
Select before operateSend SELECT first and EXECUTE only after the RTU confirms the selection.
Wait for ACTTERMReport the command as complete only after the activation termination of the RTU.
  • For a double command and a regulating step, the value 1 is OFF or LOWER and 2 is ON or HIGHER.
  • Each step waits up to Cmd timeout (ms) for the confirmation. A negative confirmation, or causes 44–47, rejects the command with the reason.
  • A command must reach the RTU within 2 seconds of being sent. With select before operate, the EXECUTE step also has to go out within these 2 seconds, otherwise the command ends as expired.
  • The RTU accepts one command at a time; a second command is rejected as Previous command in progress. If the link is down, the command is rejected at once.

For how operators send and confirm commands, see Send commands.

Quality mapping​

Quality descriptor of the RTUQuality in YTCC
IV (invalid) or BL (blocked)Bad
SB (substituted)Good · Substituted, value origin manual in the field
NT (not topical)Uncertain · Stale (last usable)
OV (overflow)Uncertain · EU exceeded
noneGood

When the link is lost, the signals are marked Bad · Not connected and keep their last value; after the link comes back, the general interrogation refreshes them. With Set invalid on disconnect off, the signals keep Good with an old value; keep it on.

Time tags​

Time tagTime in YTCC
CP56Time2a, validThe RTU time; time source device
CP24Time2a (minutes and milliseconds)Date and hour are taken from the arrival time
Invalid bit set, impossible date, more than 5 minutes ahead or 7 days behindArrival time; device time invalid
No time tagArrival time; protocol carries no time

YTCC converts RTU times to UTC with Time offset minutes. The clock synchronisation sends UTC plus the same offset.

Reconnecting​

After the link is lost, the driver opens it again after 100 ms and doubles the wait (0.1, 0.2, 0.4, 0.8, 1.6, 3.2 s …) up to Reconnect max (ms), 5 seconds by default. After a cable is plugged back in, the RTU is connected again within about 10 seconds with the defaults.

Diagnostics​

Read now on the Value source tab sends a read command for the IOA and waits 2 seconds:

TextMeaning
A type and valueThe RTU answered
Not connected — … ; IOA … was not readThe link to the RTU is down
Timeout — no response from … within 2000 msThe RTU did not answer the read command
RTU refused read command C_RD_NA_1 — unknown information object address (COT 47) …The IOA does not exist in the RTU
Link failed before the answer — …The link dropped during the read
SymptomLikely cause
The RTU does not startTransport is not TCP, Link mode is not Unbalanced, missing sizes, or a second RTU on the same host and port
Connected, but no valuesWrong Link address, Common address or sizes; GI on connect off
Values arrive slowlyPoll interval (ms) or Response timeout (ms) too long; a slow line behind the terminal server
Times wrong by hoursWrong Time offset minutes
Command expired with select before operateThe RTU confirms SELECT too slowly for the 2-second limit

Set Frame log to Asdu or All to see the frames in the driver log; set it back to Off afterwards.

Interoperability​

Monitoring direction​

TypeSupported
1, 3, 5, 7, 9, 11, 13, 15, 21 without time tagYes
2, 4, 6, 8, 10, 12, 14, 16 with CP24 time tagYes
30–37 with CP56 time tagYes
70 end of initialisationYes (start-up sequence repeats)

Control direction​

TypeSupported
45 C_SC, 46 C_DC, 47 C_RC, 48 C_SE_NA, 49 C_SE_NB, 50 C_SE_NCYes, with select before operate

System commands​

CommandSupported
100 C_IC general interrogation (station and groups)Yes
101 C_CI counter interrogation (periodic)Yes
102 C_RD readYes
103 C_CS clock synchronisationYes
FunctionSupported
Unbalanced transmissionYes
Reset of remote link, request status of linkYes
Request user data class 1 and class 2, ACD and DFCYes
Single character E5 as acknowledgementReceived