> 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/rt-lab-i-o-library/rcp-analog-in.md).

# RCP Analog In

## Description

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

The **RCP Analog In** block, located in the **RT-LAB I/O/Opal-RT/RCP** library, acquires analog voltage signals from an Analog Input module installed in the simulator or expansion unit at **specific instants within the simulation time step** and provides them to the model. Each signal is expressed in volts, such that 1 V at the module corresponds to a value of `1` in the model.

This block is designed for **synchronized acquisition with a PWM signal**, enabling periodic measurements aligned with PWM timing. Using this synchronization mechanism, the block can perform acquisitions with a **time resolution of 4 µs within each time step**.

Availability of this functionality depends on the bitstream supplied with the system.

## Mask parameters

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

<table><thead><tr><th width="194.333251953125">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong>Controller Name</strong></td><td>Specifies the <strong>OpCtrl</strong> block this block is bound to. Enter the same <strong>Controller Name</strong> as defined in the corresponding <strong>OpCtrl</strong> block.</td></tr><tr><td><strong>DataOut port number</strong></td><td>Specifies the Analog Input module and subsection from which this block acquires signals. Subsection 1 corresponds to channels 0–7, subsection 2 corresponds to channels 8–15, and so on.<br>Configure the <strong>DataOut port number</strong> according to your <strong>System Description Document</strong> or <code>.conf</code> file.</td></tr><tr><td><strong>Slot infos</strong></td><td>Read‑only field displaying the expected physical location (Slot, Section, Subsection) of the Analog Input module derived from the selected <strong>DataOut port number</strong>. If the port number is invalid, <em>Slot 0 Module X Subsection 0</em> is displayed.</td></tr><tr><td><strong>Maximum number of AIn channels controlled by this block</strong></td><td>Read‑only field displaying the maximum number of channels available in the selected subsection.</td></tr><tr><td><strong>Number of AIn channels</strong></td><td>Specifies the size of the block output vector, corresponding to the number of channels returned at each calculation step. The value must be less than or equal to the <strong>Maximum number of AIn channels</strong>. Due to the data transfer mechanism, channels cannot be individually selected; the block returns data for the first N channels of the subsection, where <em>N</em> is this parameter.</td></tr><tr><td><strong>Sample Time (s)</strong></td><td><p>Specifies the block sample time, in seconds. A value of <code>0</code> sets a continuous sample time, inherited from the parent subsystem. A value of <code>−1</code> specifies an inherited sample time from the model.</p><p>The functionality block and its associated <strong>OpCtrl</strong> block must execute at the same <strong>sample time</strong>.</p></td></tr></tbody></table>

## Inputs

<table><thead><tr><th width="142">Input</th><th>Description</th></tr></thead><tbody><tr><td><strong>ConvSync</strong></td><td>Inputs the synchronization vector used to generate the conversion signal.<br>The first element defines the <strong>conversion period</strong>, and the second element specifies the <strong>time of the first conversion</strong>. In some configurations, a <strong>third element</strong> may be provided to indicate the <strong>time of a second conversion</strong>.<br>This input is typically connected to the <strong>Sync</strong> output of the <strong>RCP PWMOut</strong> block to synchronize conversion timing:<br><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-7865438b6a38821d4a2ed2f1d83c43b6ebde1d24%2FRCPout.png?alt=media" alt="" data-size="original"></td></tr></tbody></table>

## Outputs

<table><thead><tr><th width="102">Output</th><th>Description</th></tr></thead><tbody><tr><td><strong>Volts</strong></td><td>Outputs acquisition data, expressed in volts, for the selected channel subset. The output vector size is determined by the <strong>Number of AIn channels</strong> parameter. Use a <strong>Demux</strong> block to access individual channel signals.</td></tr><tr><td><strong>Update</strong></td><td><p>Outputs the update status:</p><ul><li><code>1</code>: Output voltage has been newly acquired.</li><li><code>0</code>: No new output voltage.</li></ul></td></tr><tr><td><strong>Status</strong></td><td><p>Outputs the block status:</p><ul><li><code>0</code>: No error.</li><li><code>-1</code>: Block not associated with an <strong>OpCtrl</strong> block (check the <strong>Controller Name</strong> parameter), or FPGA initialization failure.</li><li><code>-2</code>: Data reception timeout, typically caused by model synchronization issues.</li><li><code>-3</code>: Data reception error: fewer data received than expected. Missing values are replaced with <code>0</code>.</li><li><code>-4</code>: Data reception error: more data received than expected. Extra values are discarded.</li></ul></td></tr></tbody></table>

## Characteristics and limitations

<table><thead><tr><th width="247.3333740234375">Characteristic</th><th>Value</th></tr></thead><tbody><tr><td><strong>Connector pin assignments</strong></td><td>Refer to the <strong>System Description Document</strong> provided with your order, or refer to the pin assignment of the <a href="https://opal-rt-technologies.gitbook.io/opal-rt-technologies-docs/op53xx/"><strong>OP53xx series I/O module</strong></a> associated with each subsection.</td></tr><tr><td><strong>Direct feedthrough</strong></td><td>No</td></tr><tr><td><strong>Discrete sample time</strong></td><td>Yes</td></tr><tr><td><strong>XHP support</strong></td><td>Yes</td></tr><tr><td><strong>Work offline</strong></td><td>No</td></tr></tbody></table>


---

# 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/rt-lab-i-o-library/rcp-analog-in.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.
