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:
# List logical devicesiec61850ctl 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 busiec61850ctl goose sniff --iface eth0 --count 5iec61850ctl sv subscribe --iface eth0 --scl station.scd --svcb MSVCB01 --duration 10s
# Run a local MMS server from SCLiec61850ctl server start --scl device.cid --host 0.0.0.0 --port 102In 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
go get github.com/otfabric/go-iec61850List logical devices and read one attribute by its IEC 61850 reference, retrying the connection with backoff:
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.