> 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/c37.118-master/c37.118-master-example.md).

# C37.118 Master Example

## Description <a href="#description" id="description"></a>

The **C37.118 Master** 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\_ > C37118\_Master** and select **C37\_118\_Master**, then click **Finish**. This example demonstrates how to use the C37.118 master interface to communicate with a C37.118 slave (PMU) and receive phasor, analog, and digital measurement channels. The main objective of this example is to show how to configure the C37.118 master, establish a connection to a PMU, and observe data flowing into the master and console subsystems.

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

In this example:

* The model receives 8 phasor channels, 2 analog channels, and 2 digital channels, all displayed in the console subsystem.
* The phasor representation (polar or rectangular) and format (INT16 or FLOAT) can be changed in the interface configuration without recompiling the model.

## Requirements <a href="#requirements" id="requirements"></a>

In addition to the requirements stated in the C37.118 Master **Requirements, Features & Limitations** section, this example requires an external C37.118 slave (PMU) to provide data to the master interface. The slave can be any external PMU‑capable tool that streams C37.118 data.

## Detailed explanation <a href="#detailedexplanation" id="detailedexplanation"></a>

This example illustrates the steps required to configure the C37.118 master interface and exchange data with a C37.118 slave device.

### Model preparation and configuration <a href="#modelpreparationandconfiguration" id="modelpreparationandconfiguration"></a>

1. Start the external C37.118 slave first.
2. Adjust the C37.118 master interface parameters (protocol, port, IP address, phasor representation, phasor format, etc.) as required.
3. Build the C37.118 Master model.
4. Load and execute the model.

By default, **Enable automatic data request** is active. This means the master automatically requests data from the PMU as soon as the connection is established. If this option is disabled, the model must trigger the request manually using an **OpOutput block** connected to the C37.118 master interface.

## Simulation and results <a href="#simulationandresults" id="simulationandresults"></a>

Once communication is established, the C37.118 master and C37.118 slave begin exchanging data according to their configured read and control parameters.

Users can modify measurement values in the slave external tool, and observe the updated values in the model console, confirming proper data exchange between the two systems.


---

# 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/c37.118-master/c37.118-master-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.
