> 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/analog-digital-and-sfp-ios/opal-rt-board-workflow.md).

# OPAL-RT Board Workflow

The **OPAL-RT Board Workflow** uses **RT-LAB** to configure hardware and I/O modules, and **Dashboards** to map model signals to active I/O modules, reducing reliance on Simulink blocks. This approach produces lighter models and shortens compilation time compared to the S-Function Workflow.

Using the **OPAL-RT Board Workflow** is mandatory for multi-unit systems connected through MuSE.

{% stepper %}
{% step %}

### Configure the OPAL-RT Board

1. In RT-LAB Project Explorer, right-click **I/O Interfaces**, select **New I/O Interface**, and choose **OPAL-RT Board**. Double-click the newly created interface to begin configuration.

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

2. Locate the **OPAL-RT Board Configuration section** in your **System Description Document** and follow the instructions to configure the board accordingly. For details about **OPAL-RT Board Configuration**, see the [OPAL-RT Board Configuration](https://www.opal-rt.com/docs/rt-lab/configure-ios/analog-digital-and-sfp-ios/opal-rt-board-workflow/opal-rt-board-configuration.md) documentation.
3. Click **Bitstream configuration file** and browse for your bitstream configuration file (`.opal` or `.opbin`), located on the USB drive or CD under: **Test Models >­ RT-LAB > test model > firmware**. Before selecting an `.opal` file, ensure that the associated `.bin` file is in the same folder. **Do not rename bitstream files**, as their naming convention is critical for correct operation. Once the bitstream is selected, RT-LAB will automatically list all available I/O channels and their locations in the unit.
4. Select the channels you want to enable, configure settings, and save. Once the OPAL‑RT Board is configured, connectable points for the enabled I/O module channels are exposed. For details, see the [Analog & Resolver Configuration](https://www.opal-rt.com/docs/rt-lab/configure-ios/analog-digital-and-sfp-ios/opal-rt-board-workflow/analog-and-resolver-configuration.md), the [Digital & Encoder Configuration](https://www.opal-rt.com/docs/rt-lab/configure-ios/analog-digital-and-sfp-ios/opal-rt-board-workflow/digital-and-encoder-configuration.md), and [Raw FPGA Data & SFP Configuration](https://www.opal-rt.com/docs/rt-lab/configure-ios/analog-digital-and-sfp-ios/opal-rt-board-workflow/raw-fpga-data-and-sfp-configuration.md) documentation.
   {% endstep %}

{% step %}

### Add OpInput and OpOutput blocks to the Simulink model

Although most block outputs in the model can be mapped to physical output modules, and most block parameters can be driven by physical input modules, OPAL-RT recommends using the **OpInput** and **OpOutput** blocks to handle I/Os in the model.

From the [RT-LAB library](https://www.opal-rt.com/docs/rt-lab/simulink-blocks-reference/rt-lab-library.md), add **OpInput** and/or **OpOutput** blocks to the real-time subsystem (**SM\_** or **SS\_**). Although each block can handle a vector of up to 1000 signals, **it is recommended to use one block per I/O module** in your simulator or expansion unit. This approach simplifies mapping model signals to I/O modules later in **Dashboards** and ensures better organization and maintainability. To further streamline this process, clearly name each block based on its function. This naming convention will make configuration much easier.
{% endstep %}

{% step %}

### Connect the OpInput and OpOutput blocks

**Analog Input modules**

When reading signals from Analog Input modules, each signal is expressed in volts (e.g., **1 V from the module = 1 in the model**).\
By default, the **OpInput** block outputs a **1-element vector**. To configure multiple channels, open the block parameters and set the **Default Value** parameter to `zeros(1,8)` for an 8-element vector, for example. Use a **Demux** block to split the vector into individual signals for easier processing.

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-882077c7498a837f2e9db3f743ab67053c1a4c8e%2FDR-opinput-default-value.png?alt=media" alt="" width="317"><figcaption></figcaption></figure>

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

**Analog Output modules**

When sending signals to Analog Output modules, each signal is expressed in volts (e.g., **1 in the model = 1 V to the module**).\
The **OpOutput** block accepts a vector of any size (up to 1000 scalar values). Use a **Mux** block to combine individual signals into a single input vector.

**Digital Input modules**

When reading signals from Digital Input modules, there are three common types available:

* **Static:** Measures a **single 0/1 state** per channel at each model time step. Commonly used for control elements such as breakers. Only one **OpInput** block is required. For multiple channels, set the block’s **Default Value** as a vector and use a Demux block to split it into individual signals.
* **Pulse Width Modulated (PWM):** Measures a **PWM frequency** and **duty cycle** per channel at each model time step. Commonly used for high-frequency PWM signals. It is recommended to use **one OpInput block for frequencies** and **another for duty cycles**. For multiple channels, set each block’s **Default Value** as a vector and use a **Demux** block to split it into individual signals.

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-09806564ea71d9f4847048d2c5a0581cd9700f51%2FDR-opinput-vector.png?alt=media" alt="" width="356"><figcaption></figcaption></figure>

* **EventDetector:** Captures precise timing of signal transitions asynchronously, ideal for high-speed or irregular signals where timing accuracy is critical. Each channel provides two vectors at every model time step: one for **Timestamps** and one for **Events**. It is recommended to use **one OpInput block for Timestamps** and **another for Events**. For multiple channels, set each block’s **Default Value** as a vector and use a **Demux** block to split it into individual signals.

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

**Digital Output modules**

When sending signals to Digital Output modules, there are three common types available:

* **Static:** Generates a **single 0/1 state** per channel at each model time step. Commonly used for control elements such as breakers. Only one **OpOutput** block is required.
* **Pulse Width Modulated (PWM):** Generates a PWM signal per channel at each model time step. Commonly used for high-frequency PWM signals. Each channel requires a **Frequency** and **Duty cycle** value. It is recommended to use **one OpOutput block for frequencies** and **another for duty cycles**.
* **EventDetector:** Generates precise timing of signal transitions asynchronously, ideal for high-speed or irregular signals where timing accuracy is critical. Each channel requires two vectors at every model time step: one for **Timestamps** and one for **Events**. It is recommended to use **one OpOutput block for Timestamps** and **another for Events**.

{% hint style="danger" %}
Most digital output modules require an external DC power source. Verify voltage ranges in the I/O module specifications to ensure safe operation.
{% endhint %}
{% endstep %}

{% step %}

### Save and build the model

1. Save and run the Simulink model to confirm that everything works as expected.
2. In RT-LAB, build the model.
3. Go to the **Execution** tab and ensure that the **Real-time simulation mode** is set to **Hardware synchronized**.

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

4. Open the **Assignation** tab and ensure that the **XHP** box is checked (enabled).
   {% endstep %}

{% step %}

### Open Dashboards to map model signals to active I/O modules

In the RT-LAB Project Explorer, double-click **Dashboards** within your current project.

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-33e4d7a7ee2b6c509e5c302468e3b292af0659f9%2FDR-open-dashboards.png?alt=media" alt="" width="183"><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Review all enabled I/O modules channels in Dashboards

In **Dashboards**, navigate to **Interfaces > OPAL-RT Board** to view all enabled I/O modules channels.

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-0349809dc1fd19cc6e175d7b9c2310c1cc51b198%2FDR-dashboards-opal-board.png?alt=media" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
The list of I/O module channels in **Dashboards** is automatically updated whenever changes are made to the OPAL-RT Board configuration in RT-LAB.
{% endhint %}
{% endstep %}

{% step %}

### Connect a model signal to a channel

To connect a model signal to a channel, click the **+** icon next to the desired channel and double-click the desired signal from the model. Use the search function to quickly find and select the desired signal. Once connected, the link will appear at the bottom of the window and as a link icon under the **Connection** column. Repeat for all desired connections.

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-37c4317f89fc97754bd26adc1b9e707573c83028%2FDR-connect-signal-to-channel.gif?alt=media" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Connect a model’s signal vector to a group of channels

You can often connect a model’s signal vector to a set of channels. To do this, click the **\[+]** icon next to the desired channel group, then double-click the model’s signal vector. Use the search function to quickly find and select the desired signals.

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-945512a4987246041276a5f132285c5c7dd79c64%2FDR-connect-vector-to-channel.gif?alt=media" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Manage connections: view or delete <a href="#manage-connections-delete-deactivate-or-reactivate" id="manage-connections-delete-deactivate-or-reactivate"></a>

To **delete a connection**, hover over the connection until the **trash icon** appears, then click it.

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-e50c1e73779f53c67ffe765d97ef0fd550c3765e%2FDR-delete-connection.gif?alt=media" alt=""><figcaption></figcaption></figure>

To **view all existing connections**, click **Connections** in the navigation menu. This opens a complete list of connections for easy review and management. The list includes not only connections between model signals and I/O modules, but also connections between model signals and Dashboard panel widgets.

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

{% step %}

### Prepare the Hardware setup

Refer to the **Connect Analog & Digital I/Os** section of your simulator and/or expansion unit documentation for detailed instructions on connecting external hardware or a DUT through its I/O modules.
{% endstep %}

{% step %}

### Load and execute the model

If the **Real-time simulation mode** is already set to **Hardware synchronized** and **XHP** is enabled, you can load and execute the model directly from **Dashboards**.

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

Alternatively, you can return to RT-LAB to load and execute the model.
{% 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/analog-digital-and-sfp-ios/opal-rt-board-workflow.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.
