> 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/simulink-blocks-reference/efpgasim-library/simulink-sps-workflow/analog-output-mapping-and-rescaling-controller.md).

# Analog Output Mapping & Rescaling Controller

## Description

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

The **Analog Output Mapping & Rescaling Controller** block, located in the **eFPGAsim/External circuit editor workflow** library, sends dynamic analog output mapping and rescaling configuration data to the firmware during real-time simulation. Its inputs may be connected to constant sources or supplied through the **Analog Output Mapping and Rescaling Control Panel** block.

## Mask parameters

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-1d7396e5299518eca7b51b6761b31d6ace6e8ed8%2Fanalog-out-map-controller-param.png?alt=media" alt=""><figcaption></figcaption></figure>

| Parameter                                           | Description                                                                                                                                                                                                                                                                         |
| --------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Number of channels**                              | Sets the number of channels controlled by the interface. It should be set to 32 or 16.                                                                                                                                                                                              |
| **Number of Aout user signals**                     | Number of user signals made available to the mapping function. User signals are defined in the RT-LAB model and should be made available to the "user\_aout" input of this block.                                                                                                   |
| **Block Index**                                     | Sets the block ID. This index is used to detect the correspondence between this block and the block controlling it in the RT-LAB model. Both blocks ID must match. The default value is 0.                                                                                          |
| **Controller Name**                                 | Binds this block to an OpCtrl block by entering the same 'Controller Name' as specified in the OpCtrl block The OpCtrl block controls initialization of the settings of one specific card in the system.                                                                            |
| **Communications Settings Automatic Configuration** | Enable the automatic setting of the communications ports. The \*.conf file linked to the \*.bin file selected in the OpCtrl Controller will be parsed and the communications settings will be set accordingly. If unchecked, the fields become modifiable for manual user settings. |
| **AOMR Core**                                       | If checked, AOMR Core allows the selection of which AOMR defined in the \*.conf to use for automatic configuration.                                                                                                                                                                 |
| **DataIn port number**                              | Reflect the communication port used to send the User AOut signals. Refer to the firmware documentation to know how to set this parameter.                                                                                                                                           |
| **LoadIn port number**                              | Reflect the communication port used to send mapping and scaling information. Refer to the firmware documentation to know how to set this parameter.                                                                                                                                 |

## Inputs

| Input          | Description                                                                                                                                                                                                                          |
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **user\_aout** | This input can be used to make available additional (user) signals to the mapping function located on the FPGA. It's width must be equal to the "Number of Aout User signals" parameter.                                             |
| **Mapping**    | Each element of this input corresponds to the signal mapping index of one analog output channel. Its width must be equal to the "Number of Channels" parameter value.                                                                |
| **Gains**      | Each element of this input corresponds to the gain applied to one analog output channel. It is applied after the signal mapping selection. Its width must be equal to the "Number of Channels" parameter value.                      |
| **Offsets**    | Each element of this input corresponds to the offset applied to one analog output channel. It is applied after the signal gain. Its width must be equal to the "Number of Channels" parameter value.                                 |
| **Sat\_Maxs**  | Each element of this input corresponds to the top saturation threshold applied to one analog output channel. It is applied after the signal gain and offset. Its width must be equal to the "Number of Channels" parameter value.    |
| **Sat\_Mins**  | Each element of this input corresponds to the bottom saturation threshold applied to one analog output channel. It is applied after the signal gain and offset. Its width must be equal to the "Number of Channels" parameter value. |

## Outputs

This block has no output.

## Characteristics and limitations

The user must ensure that the gains, offsets and saturation threshold are consistent and fit any external hardware limitations. As an example, if the bottom saturation threshold is higher than the top saturation threshold, and both thresholds are trespassed simultaneously, a constant zero will be sent as the analog output signal.

| Direct Feedthrough   | N/A |
| -------------------- | --- |
| Discrete sample time | YES |
| XHP support          | YES |
| Work offline         | NO  |


---

# 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/simulink-blocks-reference/efpgasim-library/simulink-sps-workflow/analog-output-mapping-and-rescaling-controller.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.
