> 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/hyperlab/configure-i-os/analog-and-digital-i-os.md).

# Analog and Digital I/Os

When running the model on the user workstation using the Simulator Setup **This PC**, no interfaces are shown in the navigation pane. They are displayed only when a **Simulator Setup** using a real-time simulator is selected.

## Adding a new Simulator Setup

<figure><img src="https://2712201518-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fbs0l9jugXixa0ghErrqs%2Fuploads%2FjZeZgNB0twc9Ph4rMV0N%2FAddSetup.png?alt=media&amp;token=1b722b81-375e-4c5f-87d9-85701a657905" alt=""><figcaption></figcaption></figure>

{% stepper %}
{% step %}

### Add a new Simulator Setup

* Click on the **+ Add Setup** button
  {% endstep %}

{% step %}

### Configure the Simulator Setup

* Set a **Setup Name**
* Set a **Description**
* Select the real-time simulator
* Click on the **Add Setup** button
  {% endstep %}

{% step %}

### Select the Simulator Setup

* Click on the **Use this Setup** button
  {% endstep %}

{% step %}

### Check that the Simulator Setup is selected

* Check that the interface displays **✓ Setup in use**

{% endstep %}
{% endstepper %}

{% columns %}
{% column width="33.33333333333333%" %}

<figure><img src="https://2712201518-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fbs0l9jugXixa0ghErrqs%2Fuploads%2FAYiL52N2x8Bg4h5BF0Ca%2FInterfaces_2.png?alt=media&amp;token=9ba23d65-811c-455a-bfa4-f5b701b854b7" alt=""><figcaption></figcaption></figure>
{% endcolumn %}

{% column width="66.66666666666667%" %}
The available physical interfaces are now displayed in the navigation pane. User can map model signals/parameters to the desired I/O interfaces.
{% endcolumn %}
{% endcolumns %}

## Mapping model signals to I/Os

<figure><img src="https://2712201518-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fbs0l9jugXixa0ghErrqs%2Fuploads%2FYGSUNrRVIF66Xwnrsjw9%2FInterfaces_3.png?alt=media&amp;token=4f843415-d5a7-41db-b664-290875e95426" alt=""><figcaption></figcaption></figure>

{% stepper %}
{% step %}

### Select the I/O interface type

Choose which kind of I/O you want to connect by **clicking** on it in the navigation pane, among *Analog Inputs*, *Analog Outputs*, *Digital Inputs*, *Digital Outputs*
{% endstep %}

{% step %}

### Select the I/O channel

Choose the channel you want to use and click on the **+** to select the model signal to be associated to it. You can also change here the **Alias** of the channel for better identification.
{% endstep %}

{% step %}

### Select the model signal

Browse the list of model signals and double-click on the signal you want to map to the I/O
{% endstep %}

{% step %}

### Apply scaling parameters

If applicable, set the scaling parameters (Gain, Offser, Min, Max) to convert the physical values into electrical values or *vice versa*. There parameters typically apply to analog interfaces.
{% endstep %}
{% endstepper %}

When model signals/parameters are mapped to I/O interfaces, they are physically available on the hardware connectors.

<figure><img src="https://2712201518-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fbs0l9jugXixa0ghErrqs%2Fuploads%2F6Fe1bXtU2tYtAYahjvjk%2FConnector_Aout.png?alt=media&amp;token=78bd0731-88a2-4fd6-b46b-3bddf20669d4" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Signal scaling is used to **map a physical quantity** (e.g., temperature, pressure, speed) **to an electrical signal** (voltage or current) and vice versa, so it can be properly measured, processed, and interpreted by electronic systems. It ensures the signal fits the **input range of the acquisition or control system** (e.g.,  controller).

The general formula for the conversion is:

```
Output = Input * Gain + Offset, Output ∈ [Min; Max]
```

{% endhint %}


---

# 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/hyperlab/configure-i-os/analog-and-digital-i-os.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.
