> 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-slave/configure-c37.118-slave.md).

# Configure C37.118 Slave

When working with communication protocols, it is recommended to begin by configuring the protocol through the **I/O Interfaces** section in <code class="expression">space.vars.Software</code> before proceeding with other steps.

## Configure the C37.118 slave I/O interface

{% stepper %}
{% step %}

### Add a new I/O interface

In RT-LAB Project Explorer, right-click **I/O Interfaces**, select **New I/O Interface**, and choose **C37.118 Slave**. Double-click the newly created interface to begin configuration.
{% endstep %}

{% step %}

### Configure the general settings

In the **Folders** list, click **General** and configure the general settings.

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

<table><thead><tr><th width="170">Parameter</th><th>Value (Description)</th></tr></thead><tbody><tr><td><strong>Use external clock</strong></td><td><p><strong>Checked:</strong> Timestamps are expected to be taken from an external synchronization source. The parameter <strong>Auto‑connect to external synchronization</strong> becomes visible:</p><ul><li>When <strong>checked</strong>, the driver automatically detects and uses the available synchronization source. Currently supported: <strong>Oregano Syn1588 PCIe</strong> card. The card must be installed and the <strong>Synchronization</strong> interface properly configured. For detailed configuration instructions, refer to the <strong>Time Synchronization Driver</strong> section of the documentation.</li><li>When <strong>unchecked</strong>, the <strong>Synchronized</strong>, <strong>Epoch</strong>, and <strong>Nanoseconds</strong> connectable points are exposed. These connectable points allow their values to be modified and controlled directly <strong>from the model</strong> during execution.<br><strong>Note:</strong> If the <strong>Synchronization</strong> interface outputs a shifted timestamp, verify the value of its <strong>Time offset (s)</strong> parameter.</li></ul><p><strong>Unchecked:</strong> No external synchronization source is used; timestamps are computed locally.</p></td></tr><tr><td><strong>Use RT core(s) for asynchronous computation</strong></td><td><strong>Checked:</strong> The driver reserves one or multiple real‑time CPU cores for its communication system, enabling support for a larger number of PMUs and larger data sets (phasors, analogs, digitals). The driver automatically scales across multiple cores based on the number of PMUs, their data rate, and data size.<br><strong>Unchecked:</strong> The communication system runs on core 0.</td></tr><tr><td><strong>Add monitoring on queues</strong></td><td><strong>Checked:</strong> Enables monitoring of internal driver queue usage and exposes these values through connection points.<br><strong>Unchecked:</strong> Queue usage monitoring is disabled.</td></tr><tr><td><strong>Enable verbose mode</strong></td><td><strong>Checked:</strong> Displays the full configuration during model loading for debugging.<br><strong>Unchecked:</strong> Only standard log messages are displayed.</td></tr><tr><td><strong>Enable virtual mode</strong></td><td><strong>Checked:</strong> Allows the model to execute even if the I/O interface is not compatible with the system’s hardware configuration. Connections are initialized, but the I/O interface does not perform any actual data exchange. Useful for troubleshooting without hardware or preparing models for future platforms.<br><strong>Unchecked:</strong> The interface behaves normally and requires compatible hardware.</td></tr></tbody></table>
{% endstep %}

{% step %}

### Manage slaves: add, remove, rename, or reorder

Click **Slaves** and use:

* **+** icon to add devices
* **–** icon to remove devices
* **Arrow** icons to reorder devices

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-5385784612cd42d03d4937d45ef43b0e0801796e%2FDR-rtlab-c37sl-slave.png?alt=media" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Configure the slave(s) settings

Click a slave under the **Slaves** folder to configure its settings. Repeat this step for each additional slave that needs to be reached.

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

<table><thead><tr><th width="145">Parameter</th><th>Value (Description)</th></tr></thead><tbody><tr><td><strong>ID</strong></td><td>Unique identifier for each PMU. The C37.118 master must use this ID to correctly associate incoming data with the corresponding PMU stream.</td></tr><tr><td><strong>Protocol</strong></td><td>Select <strong>TCP</strong>, <strong>UDP</strong>, or <strong>TCP and UDP</strong>, depending on the required behavior.<br>When using <strong>TCP</strong> or <strong>TCP+UDP</strong>, the combination of <strong>IP address + TCP port</strong> must be unique for each PMU. Three configurations are possible:<br>• Same IP address with unique TCP ports<br>• Unique IP addresses via IP aliasing using the same TCP port<br>• Both IP address (via IP aliasing) and TCP port unique for each PMU<br>The same rules apply to the <strong>UDP port</strong> for <strong>UDP</strong> or <strong>TCP+UDP</strong>. In <strong>TCP+UDP</strong>, TCP is used for commands, and UDP is used for data; the two ports must be different.</td></tr><tr><td><strong>TCP port</strong></td><td>TCP port used by the C37.118 master to establish a connection with the PMU. Visible only when using <strong>TCP</strong> or <strong>TCP+UDP</strong>.</td></tr><tr><td><strong>UDP port</strong></td><td>UDP port used by the C37.118 master to exchange data with the PMU. Visible only when using <strong>UDP</strong> or <strong>TCP+UDP</strong>.</td></tr><tr><td><strong>NIC name</strong></td><td>Network interface name. Select the correct interface based on your <strong>System Description Document</strong> or Linux <code>ifconfig</code> command. For local testing on the same simulator, use the loopback interface <strong>lo</strong>.</td></tr><tr><td><strong>IP address</strong></td><td>IP aliasing may be used to assign each PMU a unique IP address even when using a single network interface (e.g., <code>eno1:0</code>, <code>eno1:1</code>). These aliases must appear in <code>ifconfig</code>.<br>For local testing on the same simulator, use <strong>127.0.0.1</strong>.<br>The keyword <strong>any</strong> may be used to automatically select the first network interface of the simulator for this stream.</td></tr><tr><td><strong>Frequency</strong></td><td>Nominal system frequency for the PMU stream: <strong>50 Hz</strong> or <strong>60 Hz</strong>.</td></tr><tr><td><strong>Data rate</strong></td><td>Number of frames per second to transmit.</td></tr><tr><td><strong>Custom data rate</strong></td><td>Allows defining a non‑standard frame rate between <strong>1 and 512 fps</strong>.</td></tr><tr><td><strong>Phasors representation</strong></td><td>Select <strong>polar</strong> or <strong>rectangular</strong>, depending on the required phasor format.</td></tr><tr><td><strong>Phasors format</strong></td><td>Select <strong>INT16</strong> or <strong>FLOAT</strong>, according to the PMU configuration.</td></tr><tr><td><strong>Analogs format</strong></td><td>Select <strong>INT16</strong> or <strong>FLOAT</strong>, depending on how analog channels are transmitted.</td></tr><tr><td><strong>Frequency format</strong></td><td>Select <strong>INT16</strong> or <strong>FLOAT</strong>, depending on how frequency and ROCOF values are encoded.</td></tr><tr><td><strong>Header</strong></td><td>Optional text information returned to the master when it issues a <strong>Header frame</strong> request.</td></tr><tr><td><strong>Round packet timestamp</strong></td><td><strong>Checked:</strong> The sub‑second timestamp field is rounded to align with the UTC boundary. If an external synchronization source is present, the time quality code is set to <strong>0 (normal operation)</strong>. Without external synchronization, the code is set to <strong>F (fault, clock failure, time not reliable)</strong>, as defined by the standard.<br><strong>Unchecked:</strong> The interface behaves normally.</td></tr></tbody></table>
{% endstep %}

{% step %}

### Configure the slave(s) channels

1. Expand a slave to reveal it's channel types.

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

2. Click a channel type (**Phasors**, **Analogs**, or **Digitals**) and use:

* **+** icon to add data points
* **–** icon to remove data points
* **Arrow** icons to reorder data points

3. Change names and parameters if desired and save the configuration when finished.

* Phasors

<table data-header-hidden><thead><tr><th width="130">Parameter</th><th>Value (Description)</th></tr></thead><tbody><tr><td><strong>Phasor name</strong></td><td>Unique name assigned to the phasor channel. This name is used to connect model signals to the interface and appears in the list of available connection points. Each phasor must have a unique name.</td></tr><tr><td><strong>Phasor type</strong></td><td>Select the phasor type: <strong>CURRENT</strong> or <strong>VOLTAGE</strong>.</td></tr><tr><td><strong>Phasor unit</strong></td><td>Specifies the measurement unit for the phasor. When using the <strong>INT16</strong> data format, each unit corresponds to a scaling factor of <span class="math">10^{-5}</span> volts or amperes applied to the magnitude.<br><strong>Example:</strong> If the connected signal has a magnitude of 11 000 and the selected phasor unit is 100, the C37.118 master interprets the value as:<br><span class="math">11000\times100\times10^{-5}=11</span><br>This scaling behavior is defined in the C37.118 standard. When using the <strong>FLOAT</strong> data format, no scaling is applied.</td></tr></tbody></table>

* Analogs

<table data-header-hidden><thead><tr><th width="130">Parameter</th><th>Value (Description)</th></tr></thead><tbody><tr><td><strong>Analog name</strong></td><td>Unique name assigned to the analog channel. This name appears in the list of connection points and is used to connect signals from the model. Each analog channel must have a unique name.</td></tr><tr><td><strong>Analog type</strong></td><td>Select the analog type: <strong>SINGLE POINT</strong>, <strong>PEAK</strong>, or <strong>RMS</strong>, depending on the magnitude representation required by the C37.118 stream.</td></tr><tr><td><strong>Analog unit</strong></td><td>Specifies the measurement unit applied to the analog value. This is a user‑defined scaling factor included in the transmitted data frame so the C37.118 master can correctly interpret the measurement.</td></tr></tbody></table>

* Digitals

<table data-header-hidden><thead><tr><th width="130">Parameter</th><th>Value (Description)</th></tr></thead><tbody><tr><td><strong>Digital name</strong></td><td>Unique name assigned to the digital channel. This name appears in the list of connection points and is used to connect signals from the model. Each digital channel must have a unique name.</td></tr><tr><td><strong>Digital unit</strong></td><td>Defines the bitmask associated with each digital channel. Each digital word includes <strong>two 16‑bit mask fields</strong>:<br><strong>Status word:</strong> Indicates the normal state of each digital bit. A logic XOR with the received digital value returns <strong>0</strong> when the bit is in its expected state.<br><strong>Valid‑bit word:</strong> Identifies which digital inputs are valid by setting the bit corresponding to each valid digital input to <strong>1</strong>, with all other bits set to <strong>0</strong>.<br>If the digital status words are used for non‑Boolean purposes (e.g., minimum or maximum limits), interpretation of the mask is left to the user.</td></tr></tbody></table>
{% endstep %}

{% step %}

### Save the configuration

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-44bd03ce3c41f8ba5c990b61c29b38c9b80ae5f2%2FDR-rtlab-save.png?alt=media" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}


---

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