> 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/ehs/3.7/model-in-schematic-editor/configure-the-ehs-circuit-interfaces/configure-machine-i-os.md).

# Configure Machine I/Os

## Interface machine blocks

**Machine** blocks can exchange signals with <code class="expression">space.vars.cpu\_model\_veristand</code> and/or an external DUT through a variety of interfaces.

While most machine parameters and signals are configured to fixed values, some machine parameters and signals can also be **driven by** values provided by the CPU model.

In addition, some machine outputs can be **routed to**:

* The CPU model
* Physical analog output channels
* SFP links
* A combination of these interfaces

Machine block parameters and signals are organized into multiple tabs. Be sure to review all tabs to access the available configuration options.

1. Click the arrow next to the parameter or signal to open the **Deep Panel**.
2. For parameters and signals that can be driven by the CPU model, the following option will be available:

* **FROM SIMULINK** (RT-LAB)
* **FROM HYPERSIM** (HYPERSIM)

<figure><img src="https://521571437-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fo99Izmvvw5eHT4ldzI4g%2Fuploads%2Fgit-blob-823a64c0509b311c18b1b350da3c386481522609%2Fse-motor2.png?alt=media" alt=""><figcaption></figcaption></figure>

3. Only one input option can be active at a time. To revert to a user-defined value in Schematic Editor, select **SOURCES**.
4. For signals that can be routed to external outputs, click the **+** icon below **DESTINATIONS** to reveal the additional options. Select **AO (Analog Output)** or **SFP (SFP Output)** to add the destination.

<figure><img src="https://521571437-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fo99Izmvvw5eHT4ldzI4g%2Fuploads%2Fgit-blob-3df4f6c5238d581a5ca7f0eb43c53ac6bc87f5f8%2Fse-motor.png?alt=media" alt=""><figcaption></figcaption></figure>

4. Multiple destinations can be configured and active at the same time. By default, the signal is routed to CPU model. To remove a destination, hover over it and click the **trash** icon that appears.
5. Configure the destination using its available parameters. For **AO (Analog Output)**, select the I/O module and channel (**Pin**) that will output the measurement. You can also configure a **Gain**, **Offset**, and **Min/Max** thresholds. For **SFP (SFP Output)**, select the channel and data number (**Pin**) used to output the measurement. You can also configure a **Gain** and **Offset**.

## Configure resolver outputs and excitation source

A machine block can emulate a **resolver** and **output** resolver **sine** and **cosine** signals to:

* The CPU model
* Physical analog output channels
* SFP links
* A combination of these interfaces

The resolver excitation source can also be configured as **External**, allowing the excitation signal to be provided through a selected **analog input channel**.

### Configure resolver outputs

1. Navigate to the **RESOLVER** tab of the machine block and set **Enable resolver** to **On**.
2. Click the arrow next to the sine and cosine **Resolver feedback signals** to open the **Deep Panel**.
3. Click the **+** icon below **DESTINATIONS** to reveal the additional options. Select **AO (Analog Output)** or **SFP (SFP Output)** to add the destination.

<figure><img src="https://521571437-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fo99Izmvvw5eHT4ldzI4g%2Fuploads%2Fgit-blob-54d7b1f797380a7994d9146ade573d4ca56c18b8%2Fse-resolver2.png?alt=media" alt=""><figcaption></figcaption></figure>

4. Multiple destinations can be configured and active at the same time. To remove a destination, hover over it and click the **trash** icon that appears.
5. Configure the destination using its available parameters. For **AO (Analog Output)**, select the I/O module and channel (**Pin**) that will output the measurement. You can also configure a **Gain**, **Offset**, and **Min/Max** thresholds. For **SFP (SFP Output)**, select the channel and data number (**Pin**) used to output the measurement. You can also configure a **Gain** and **Offset**.

### Configure resolver excitation source input

To use an external resolver excitation source:

1. Navigate to the **RESOLVER** tab of the machine block and In the set **Excitation source type** to **External**.
2. Click the arrow next to the **Excitation source** parameter to open the **Deep Panel**.
3. Click the **+** icon below **SOURCES** to add an **AI (Analog Input)** input source. Select the I/O module and channel (**Pin**) that will drive the source and configure the **Gain**, **Offset**, and **Min/Max** thresholds.

<figure><img src="https://521571437-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fo99Izmvvw5eHT4ldzI4g%2Fuploads%2Fgit-blob-cca9b30db36e26109e8d4ba2f022e778ef4d76dd%2Fse-resolver.png?alt=media" alt=""><figcaption></figcaption></figure>

4. Multiple sources can be configured, but **only one can be active at a time**. To remove a source, hover over it and click the **trash** icon that appears.

## Configure encoder outputs

A machine block can emulate an **encoder** and generate **A**, **B**, and **Z** signals on **predefined** digital output channels.

To enable encoder outputs, navigate to the **ENCODER** tab of the machine block and set **Enable encoder** to **On**. You can click the arrow next to the **A B Z encoder signals** to open the **Deep Panel** and verify that the **DO** destination is selected.

The encoder output destinations cannot be modified or removed. To disable encoder outputs, set **Enable Encoder** to **Off**. The **assigned digital output channels are predefined by the selected firmware and cannot be selected by the user**.

To identify the digital output channels assigned to the encoder, save the circuit in the Schematic Editor and load it from the CPU model. Then consult the **eHS Build Report**:

* When using eHS with **RT-LAB**, right-click the **eHS\_SE\_SFunction\_Drivers** block in the Simulink model, navigate to **eHS** and select **Open Build Report** to open the latest eHS build report in your default text editor.
* When using eHS with **HYPERSIM**, right-click the **FPGA-based circuit** block, navigate to **eHS** and select **Open Build Report** to open the latest eHS build report in your default text editor.

In the **Build Report**, scroll to the **I/O Connections Information** section and locate **Machine encoder outputs** near the end of the section. The machine block name and corresponding digital output assignment are listed there.

For example:

```
Machine encoder outputs A, B and Z connection to digital out
pmsm1 : 2B subsection 1, signals 1 through 3
```

In this example:

* **A** is assigned to channel **00** of the module in slot **2B**
* **B** is assigned to channel **01** of the module in slot **2B**
* **Z** is assigned to channel **02** of the module in slot **2B**

Consecutive encoder signals are assigned to consecutive digital output channels starting from the first channel indicated in the **Build Report**.


---

# 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/ehs/3.7/model-in-schematic-editor/configure-the-ehs-circuit-interfaces/configure-machine-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.
