Skip to content
IEC 61850-8-1 (MMS, GOOSE) and IEC 61850-9-2 (Sampled Values)

IEC 61850

IEC 61850 communication for substation automation: client/server services over MMS on TCP port 102, GOOSE events and Sampled Values streams on the station and process bus, all configured from SCL.

Mappings
MMS, GOOSE, Sampled Values
Default port
102 (MMS); GOOSE and SV are layer 2
Libraries
go-iec61850, go-mms
CLI
iec61850ctl
Interop suite
iec61850-interop
UI app
IEC 61850 Explorer

IEC 61850 describes a substation as a model: an IED (intelligent electronic device) holds logical devices, each with logical nodes such as MMXU (measurements) or XCBR (circuit breaker), which hold data objects and data attributes grouped by functional constraint (MX, ST, CO, CF and so on). Devices and their configuration are described in SCL files (.icd, .cid, .scd).

The same model travels three ways. MMS (Manufacturing Message Specification, ISO 9506) carries client/server communication on TCP port 102: browsing, reads and writes, reports, controls, files and logs. GOOSE multicasts dataset values in Ethernet frames for fast events between IEDs, such as a trip or an interlock. Sampled Values stream digitized currents and voltages from merging units, thousands of samples a second. OT Fabric implements all three in one library, go-iec61850, with the MMS layer in go-mms.

This page covers communication. The classes, data objects and attributes themselves are the IEC 61850 information model, which OT Fabric implements separately, without a transport, in go-iec61850-model.

Where you meet it

  • Protection relays, bay controllers and merging units in substations
  • Station buses carrying GOOSE between IEDs, and process buses carrying Sampled Values from instrument transformers
  • Battery storage, solar and wind plants connected at medium and high voltage
  • Gateways between station buses and SCADA

Quickstart

From the command line

Install iec61850ctl with curl -fsSL https://get.otfabric.io/iec61850ctl | sh, or on Windows irm https://get.otfabric.io/iec61850ctl.ps1 | iex (all install options), then:

Terminal window
# List logical devices
iec61850ctl list lds --host 192.0.2.10
# Read a measurement (FC MX)
iec61850ctl get object --host 192.0.2.10 \
--object MNSREF615LD0/FMMXU1.Hz.mag.f --fc MX
# Subscribe to a buffered report (Ctrl+C to stop)
iec61850ctl subscribe report --host 192.0.2.10 \
--ld MNSREF615LD0 --ln LLN0 --report rcbMeasFlt01 --type BR \
--show-values --interrogation
# Watch GOOSE and Sampled Values on the station bus
iec61850ctl goose sniff --iface eth0 --count 5
iec61850ctl sv subscribe --iface eth0 --scl station.scd --svcb MSVCB01 --duration 10s
# Run a local MMS server from SCL
iec61850ctl server start --scl device.cid --host 0.0.0.0 --port 102

In a desktop app

IEC 61850 Explorer is the graphical workbench for the same work. Connect to an IED and read its values with quality and time, without being able to change anything on it; open an SCD or CID to browse a device before it exists and search it by quantity; compare an IED with its SCL file to find a changed setting; and open a packet capture of the station bus to see the MMS timeline, reports, GOOSE and Sampled Values streams and what went wrong. Writes and controls happen only in a Commission mode you grant with a reason and a time limit, and every action is recorded. Download it from GitHub Releases for macOS, Windows or Linux, or run its daemon on a gateway and use it in a browser. The capture analysis is also a library and CLI on its own, go-mms-trace with mmstracectl.

From Go

Terminal window
go get github.com/otfabric/go-iec61850

List logical devices and read one attribute by its IEC 61850 reference, retrying the connection with backoff:

main.go
package main
import (
"context"
"fmt"
"log"
"github.com/otfabric/go-iec61850"
"github.com/otfabric/go-mms"
)
func main() {
ctx := context.Background()
client, err := iec61850.Dial(ctx, "10.0.0.1:102", iec61850.DialOptions{
Retry: mms.DefaultRetryPolicy(),
})
if err != nil {
log.Fatal(err)
}
defer client.Close(ctx)
devices, err := client.ListLogicalDevices(ctx)
if err != nil {
log.Fatal(err)
}
for _, ld := range devices {
fmt.Println(ld.Name)
}
ref, _ := iec61850.ParseRef("PROT1LD/MMXU1.TotW.mag.f[MX]")
val, err := client.Read(ctx, ref)
if err != nil {
log.Fatal(err)
}
fmt.Println(val)
}

GOOSE and Sampled Values publishers and subscribers are built from the SCL control block in the same way: goose.ControlBlockFromSCL and sv.ControlBlockFromSCL return the address, the dataset layout and the validation rules. The Go library guide has both.

What the libraries support

MMS client Browse, typed reads and writes, datasets, URCB and BRCB reports with EntryID resume, direct, SBO and SBOw controls with CommandTermination wait and time-activated operate, setting groups, journals, files, GoCB and MSVCB access
MMS server Built from SCL: reports with BufTm and a pluggable BRCB buffer, controls with CommandTermination, interlocking and synchrocheck checks (CILO, RSYN), setting groups with a value bank per group, journals, file services through a provider, Identify and Status, graceful shutdown
GOOSE Publisher with stNum, sqNum and retransmission; subscriber with SCL validation and supervision; server GoCBs published on data change
R-GOOSE and R-SV GOOSE and SV over UDP, unicast or multicast, with the session protocol of IEC TR 61850-90-5 and HMAC-SHA256 authentication
Sampled Values 9-2LE and generic datasets; paced publisher with noASDU batching; subscriber with loss, duplicate and reorder accounting; server MSVCBs
SCL SCD, ICD, CID and IID, schema editions 1.7 to 2007C5, semantic validation, flattening and export
go-mms MMS client and server: variable access, named variable lists, file and journal services, information reports, typed errors, metrics, retry and timeouts. The v1 API is stable.
Not covered IEC 62351-6 security for layer-2 GOOSE and SV, encryption on R-GOOSE and R-SV, unicast SV, MMS semaphore, event and program invocation services
Platforms MMS and SCL everywhere Go runs; GOOSE and SV on Linux (AF_PACKET) and macOS and the BSDs (BPF)
Go version 1.26 or later for go-iec61850

Interoperability

iec61850-interop, formerly mms-interop, publishes container images of five independent IEC 61850 stacks: libiec61850 (C), IEC61850bean (Java), dscsystems/go-iec61850 and cB-Sigma (Go) and iec61850-rust (Rust), and an image of OT Fabric’s own stack for others to test against. go-mms, go-iec61850 and iec61850ctl run their tests against those images in both directions, GOOSE and Sampled Values included. The Testing and interop page has the per-stack matrix. The libraries are not certified and have not yet been validated against physical IEDs.

OT Fabric projects for IEC 61850

go-iec61850

IEC 61850 in one library: MMS client and SCL-driven server, GOOSE and Sampled Values publishers and subscribers, and SCL parsing, with logical nodes, reports, controls and control blocks as first-class Go types.

go get github.com/otfabric/go-iec61850

go-mms

MMS (ISO 9506) client and server with the full ISO upper-layer stack, the transport underneath IEC 61850: typed errors, metrics, retries and graceful shutdown, fuzzed and interop tested.

go get github.com/otfabric/go-mms

go-mms-trace

Read pcap and pcapng captures of IEC 61850 traffic offline: MMS associations, every confirmed service with its status and latency, reports, GOOSE and Sampled Values streams, and what the capture lost. Library and mmstracectl.

go get github.com/otfabric/go-mms-trace

iec61850ctl

IEC 61850 from the terminal: browse IEDs, read and write, operate controls and subscribe to reports over MMS, and sniff, subscribe to and publish GOOSE and Sampled Values on the station bus.

go-cotp

COTP TP0 transport service over RFC 1006, plus a full X.224 TPDU codec.

go get github.com/otfabric/go-cotp

go-tpkt

TPKT framing for RFC 1006 and RFC 2126 transport profiles.

go get github.com/otfabric/go-tpkt

iec61850-interop

IEC 61850 reference stacks as containers: libiec61850, IEC61850bean, dscsystems/go-iec61850, iec61850-rust and cB-Sigma, for MMS, IED services, GOOSE and Sampled Values. Formerly mms-interop.

IEC 61850 Explorer

Connect to an IEC 61850 IED, open its SCL file or a packet capture of the station bus, and see the model, the values with quality and time, and what happened on the wire. Read-only by default; controls and writes only in a granted, audited Commission mode.

  • IEC 61850
GitHub

go-iec61850-model

The IEC 61850 information model without a transport: an edition-aware catalog of logical nodes, data objects, CDCs and data attributes from every official NSD release, with reference validation, type resolution and semantic mapping.

go get github.com/otfabric/go-iec61850-model
  • IEC 61850 model
GitHub

Who is behind IEC 61850

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