Skip to content
IEC 60870-5-101

IEC 60870-5-101

Serial telecontrol between control centres and RTUs: the same data model as IEC 104, on point-to-point and multidrop lines, radio and modem links.

Transport
FT 1.2 on a serial line (9600 8E1 by default), modem or radio; or a terminal server that passes the line through
Link
Unbalanced (polled, multidrop) or balanced (point to point)
Library
go-iec60870-5 (iec101)
CLI
iec101ctl
Interop
iec60870-5-interop v0.5.0

IEC 60870-5-101 (IEC 101) is the serial companion standard of the IEC 60870-5 telecontrol family. A controlling station in a control centre talks to controlled stations (RTUs in substations, pumping stations, wind and solar parks) over a serial line, a leased line, a modem or a radio link. Its data model is the one IEC 104 took over: stations with a common address, data points with an information object address, general interrogation, spontaneous events with time tags and commands with select-before-operate. What differs is underneath: FT 1.2 frames with checksums (IEC 60870-5-1) and the link procedures of IEC 60870-5-2, which either poll stations one by one (unbalanced, one line can serve many stations) or let both ends send (balanced, point to point).

IEC 101 is also flexible where IEC 104 is fixed: the link address, the cause of transmission, the common address and the information object address each have a size of one to three octets, chosen per project. Nothing on the wire says which sizes a station uses, so the controlling station has to be told.

Where you meet it

  • Distribution grids and older transmission networks, where RTUs hang on serial or radio links that were never replaced by IP
  • Multidrop lines and radio networks that poll many stations from one port
  • Pipelines, water and district heating SCADA, and remote substations on leased lines or modems
  • Behind a terminal server or a 101-to-104 gateway, when the control centre is already on IEC 104

Quickstart

From the command line

Install iec101ctl with curl -fsSL https://get.otfabric.io/iec101ctl | sh, or on Windows irm https://get.otfabric.io/iec101ctl.ps1 | iex (all install options). No station at hand? Start a simulated one, on TCP port 2401 as a terminal server would offer it:

Terminal window
iec101ctl server start

and talk to it from another terminal:

Terminal window
# What does this station hold? (general interrogation)
iec101ctl client interrogate --url tcp://127.0.0.1:2401
# Watch events and measured values as they arrive, until Ctrl-C
iec101ctl client monitor --url tcp://127.0.0.1:2401 --interrogate
# Operate a disconnector with select-before-operate
iec101ctl client command --url tcp://127.0.0.1:2401 --type double --ioa 5001 --value off --mode sbo

On a real line, give the serial port and the station’s addresses and field sizes:

Terminal window
iec101ctl client interrogate --url serial:///dev/ttyUSB0 --link-address 3 --ca 3
iec101ctl client interrogate --url tcp://10.0.0.5:2401 --link-mode balanced --ioa-size 3

From Go

Terminal window
go get github.com/otfabric/go-iec60870-5

The transport is any io.ReadWriter: a serial port (for example go-serial), a TCP connection to a terminal server, or a pipe in tests. For a balanced link, set p.Mode = iec101.ModeBalanced.

main.go
package main
import (
"context"
"fmt"
"log"
"net"
"time"
"github.com/otfabric/go-iec60870-5/asdu"
"github.com/otfabric/go-iec60870-5/iec101"
"github.com/otfabric/go-iec60870-5/iec101/client"
)
func main() {
// A terminal server that passes the serial line through; a serial port works the same way.
conn, err := net.DialTimeout("tcp", "10.0.0.5:4001", 5*time.Second)
if err != nil {
log.Fatal(err)
}
// Unbalanced, 1-octet link address, COT 1, CA 1, IOA 2: the most common sizes.
p := iec101.DefaultParams()
c, err := client.New(conn, client.Config{
Params: p,
LinkAddr: 3, // link address of the controlled station
Handler: func(a *asdu.ASDU) { fmt.Println(a) }, // spontaneous and polled data
})
if err != nil {
log.Fatal(err)
}
defer c.Close()
ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
defer cancel()
if err := c.WaitUp(ctx); err != nil { // link initialized
log.Fatal(err)
}
data, err := c.Interrogate(ctx, 3, asdu.QOIStation)
if err != nil {
log.Fatal(err)
}
fmt.Printf("interrogation returned %d ASDUs\n", len(data))
}

What go-iec60870-5 and iec101ctl support

Roles Controlling station (client) and controlled station (server)
Link Unbalanced and balanced; request status and reset of remote link, FCB/FCV repetition, class 1 and class 2 polling driven by ACD, DFC flow control, single character E5h
Field sizes Link address 0, 1 or 2 octets (0 in balanced mode only), cause 1 or 2, common address 1 or 2, object address 1, 2 or 3
Client General, group and counter interrogation, read, clock synchronization, test command, reset process, delay acquisition (C_CD_NA_1), direct and select-before-operate commands
Profile checks Optional strict mode that rejects what IEC 60870-5-101:2003 does not allow on a 101 link, such as the CP56Time2a commands of IEC 104
CLI Interrogate, counters, read, command, clock, reset, delay, monitor, ping, scan a line for stations, discover terminal servers, simulate a station from YAML
Not yet File transfer, IEC 62351-5 on 101, one client polling several stations of a multidrop line
Dependencies Go standard library only

Interoperability

iec60870-5-interop runs three independent IEC 101 stacks in containers: MZ Automation lib60870-C, cB-Sigma/iec60870 and digitalpetri/iec60870. The serial byte stream crosses one TCP connection unchanged, as through a terminal server. go-iec60870-5 passes as client and server against all three, unbalanced and balanced, with the default field sizes and four other sets. The one gap is digitalpetri’s balanced station, which sends data before it has reset its own link direction, as the standard requires it to; that is a known upstream bug. cB-Sigma’s IEC 101 was debugged against lib60870-C, which is why digitalpetri, the third stack, matters. Interoperability is not conformance: nothing here is certified.

OT Fabric projects for IEC 60870-5-101

go-iec60870-5

The IEC 60870-5 telecontrol family in one module: IEC 101 on serial lines, IEC 102 for meter readings, IEC 103 for protection relays and IEC 104 over TCP/IP, each as controlling and controlled station, on shared FT 1.2, link-layer and time-tag packages. IEC 104 keeps TLS, IEC 62351-5, file transfer and redundancy groups. Pure Go, standard library only.

go get github.com/otfabric/go-iec60870-5
  • IEC 101
  • IEC 102
  • IEC 103
  • IEC 104
GitHub

iec101ctl

Interrogate, monitor and command IEC 101 stations on a serial port or behind a terminal server, unbalanced or balanced, with any field sizes; measure the line delay, scan a line for stations, or simulate an RTU. Part of iec60870ctl.

iec60870-5-interop

Independent IEC 60870-5 implementations in containers behind one contract, per companion standard: IEC 101 (lib60870-C, cB-Sigma, digitalpetri), IEC 102 (gisce/iec870ree, REE profile), IEC 103 (vitusdong, ARIEC103, Open103, go-iecp5 cs103) and IEC 104 (lib60870-C, OpenMUC j60870, wendy512, cB-Sigma, part5). OT Fabric's own go-iec60870-5 stack is published behind the same contract, one image per standard, for testing your stack against.

  • IEC 101
  • IEC 102
  • IEC 103
  • IEC 104
GitHub

Who is behind IEC 60870-5-101

The organizations that publish, test, certify or host open-source work for IEC 60870-5-101. Listed for reference, not as partners. Compare membership and fees.