> For the complete documentation index, see [llms.txt](https://www.opal-rt.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.opal-rt.com/docs/rt-lab/configure-ios/communication-protocol-ios/iec-61850-8-1-goose/iec-61850-8-1-goose-example.md).

# IEC 61850‑8‑1 GOOSE Example

## Description

The **IEC 61850 example** can be created by starting a new RT‑LAB project. From the menu bar, select **File > New > RT‑LAB Project**. Enter a name and location for your project, then click **Next**. From the available templates list, navigate to **IO > \_Generic\_ > IEC\_61850** and select **IEC\_61850**, then click **Finish**. This example demonstrates how to interface the RT‑LAB simulator with Intelligent Electronic Devices (IEDs) and with Human‑Machine Interface (HMI) clients that comply with the IEC 61850 standard.

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-cf4e4e714bd6ed0a5afd455c164391ba13d11f86%2FDR-rtlab-iec-ex.png?alt=media" alt="" width="422"><figcaption></figcaption></figure>

The model showcases high‑speed, peer‑to‑peer communication using **GOOSE** and **Sampled Values (SV)**, enabling distributed applications based on current and voltage data exchanged over the IEC 61850 **Process Bus** and **Station Bus**.\
It also illustrates how to instantiate an **MMS server** in the simulator for reporting and for client read/write services.

This example includes:

* 2 GOOSE publishers
* 2 GOOSE subscribers
* 1 SV publisher (IEC 61850‑9‑2LE)
* 1 SV subscriber (IEC 61850‑9‑2LE)
* 1 SV publisher (IEC 61850‑61869‑9)
* 1 SV subscriber (IEC 61850‑61869‑9)
* 1 unbuffered MMS report
* 1 buffered MMS report
* 2 MMS data points for direct client read/write access

Each subscriber is configured to receive its corresponding publisher stream. For MMS interaction, an external client is required; for example, the free **IED Explorer** tool may be used.

The full IEC 61850 configuration can be edited in the I/O configuration panel:\
**Project Explorer → YOUR\_PROJECT → I/Os → IEC 61850**.

GOOSE data comes from an SCL file included in the project (`models/iec_61850/icd61850.icd`). Two GOOSE messages are transmitted on the **eth0** interface:

* **Goose\_TRIP1** – contains one Data Object composed of three Boolean Data Attributes
* **Goose\_OV2PTOV** – contains two Data Objects, each containing two unsigned (32‑bit) Data Attributes

For Sampled Values, two streams of **80 samples per cycle at 60 Hz** (4800 frames/s) are sent on **eth1**:

* `OPALRT_MU_1` (MAC: `01‑0C‑CD‑04‑01‑00`) — IEC 61850‑9‑2LE
* `xxxxMU0101` (MAC: `01‑0C‑CD‑04‑00‑00`) — IEC 61869‑9

The MMS server communicates via TCP/IP using **eth0** on port **104**.\
Its IED data model is loaded from `models/iec_61850/iec61850_mms.scd`. Two report control blocks (RCBs) are used:

* **Buffered report** — `OPALLD0/LLN0.brcba` (FC = ST status values)
* **Unbuffered report** — `OPALLD0/LLN0.urcba` (FC = MX measurements)

Two MMS data attributes are available for direct read/write access:

* **Writable:** `OPAL/AP1/Measurement/MMXU1/A/phsA.units.SIUnit`\
  (value comes from the last update from the model or from the MMS client)
* **Read‑only:** `OPAL/AP1/Measurement/MMXU1/W/phsA.cVal.mag.f`\
  (server computes an RMS over 10 000 samples, gain = 1)

Time synchronization is set to **Poll CPU clock**, meaning sampling and transmission times follow the target system clock.

## Requirements

[Verify that an active RT-LAB license](https://github.com/Opal-RT-Technologies/product-docs-rt-lab/tree/main/.gitbook/licensing-reference/simulator-license/README.md) with the following features is installed on the simulator:

<table><thead><tr><th width="320">Feature Name</th><th width="155">Required Status</th><th width="265">Description</th></tr></thead><tbody><tr><td>DP_IEC61850_GOOSE_PUB</td><td>enabled</td><td>Enables IEC 61850 GOOSE publishing</td></tr><tr><td>DP_IEC61850_GOOSE_SUB</td><td>enabled</td><td>Enables IEC 61850 GOOSE subscribing</td></tr><tr><td>DP_IEC61850_SAMPLED_VALUES_PUB</td><td>enabled</td><td>Enables IEC 61850 Sampled Values publishing</td></tr><tr><td>DP_IEC61850_SAMPLED_VALUES_SUB</td><td>enabled</td><td>Enables IEC 61850 Sampled Values subscribing</td></tr><tr><td>DP_IEC61850_MMS_SERVER</td><td>enabled</td><td>Enables IEC 61850 MMS Server option</td></tr><tr><td>DP_TOTAL_NUMBER</td><td>50 enabled (or more)</td><td>Number of activated I/O data points for Ethernet-based communication protocols</td></tr></tbody></table>

In addition to the simulator license, this example requires:

* An **IEC 61850 MMS client** (e.g., *IED Explorer*) for MMS-based access and testing
* A **network infrastructure supporting multicast** for GOOSE and Sampled Values (SV) traffic
* **At least two enabled network interfaces** on the simulator, with **one interface dedicated to SV streaming**

For **SV loopback scenarios**, the dedicated SV network interface **must be physically connected to an Ethernet switch** (NIC-to-NIC loopback is not supported).

## Detailed explanation

This example illustrates how to simulate a complete IEC 61850 communication environment using RT‑LAB. The model simultaneously publishes and subscribes to **GOOSE**, **SV**, and **MMS** data streams in real‑time.

GOOSE and SV interfaces use dedicated communication threads that run in parallel with the real‑time simulation. Process data is exchanged via shared memory between the real‑time engine and each communication service, ensuring deterministic behavior and minimal latency.

The MMS server runs concurrently and exposes the IED data model to external MMS clients for reporting and direct read/write operations.

### Model preparation and configuration

1. Configure GOOSE publishers/subscribers in the IEC 61850 I/O panel (dataset, VLAN, MAC, control block).
2. Configure SV publishers/subscribers (sample rate, protocol type, MAC address, Ethernet interface).
3. Configure the MMS server options (TCP port, Ethernet interface, reports, data attributes).
4. Build the IEC 61850 model.
5. Load and execute the model in RT‑LAB.
6. Start external MMS clients or monitoring tools as required.

## Simulation and results

Once the simulation starts, the GOOSE publishers and subscribers begin exchanging dataset values over Ethernet. SV publishers transmit voltage and current phasors at 80 samples/cycle, and subscribers decode them. MMS clients can read/write exposed data attributes. Reports (buffered and unbuffered) are sent automatically based on dataset triggers.

From the **sc\_user\_interface** subsytem, users can:

**For GOOSE publishers**

* Pause or resume each GOOSE publisher
* Modify GOOSE dataset values
* Modify associated quality flags
* Immediately observe the retransmission of updated GOOSE frames

**For GOOSE subscribers**

* Monitor decoded data attribute values
* Observe state number and sequence number updates
* Verify dataset changes triggered by the upstream publisher

**For Sampled Values (SV) publishers**

* Pause or resume SV publishers
* Modify SV voltage and current values
* Modify associated SV quality attributes
* Observe immediate impact on transmitted SV streams

**For Sampled Values (SV) subscribers**

* View decoded SV voltage and current values
* Observe quality changes propagated from the publisher

**For MMS / Reporting scenarios**

* Trigger report transmission by modifying monitored data attributes
* Observe MMS‑client‑written attributes directly inside the simulation

{% hint style="info" %}
RMS calculation for MMS read‑only attributes must be viewed from the MMS client, not the RT‑LAB console.
{% endhint %}

**For mixed scenarios**

* Validate inter‑IED logic involving multiple IEC 61850 services (e.g., GOOSE‑based tripping with SV measurements)
* Test peer‑to‑peer behavior under different timing, availability, or quality conditions
* Pause or resume publishers/subscribers to simulate communication loss and recovery across services


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://www.opal-rt.com/docs/rt-lab/configure-ios/communication-protocol-ios/iec-61850-8-1-goose/iec-61850-8-1-goose-example.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
