> 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-events-library/rte-conversion-op5110-5120.md).

# RTE Conversion OP5110-5120

## Description

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

The **RTE Conversion** block, located in the **RT-EVENTS/Signal Attributes** library, converts double-type signals from the RT-LAB OP5110-5120 Event Detector to RTE Boolean-type signals, or converts RTE Boolean-type signals to double-type signals for the RT-LAB OP5110-5120 Event Generator.

The [**RT-LAB Event Detector/Generator**](https://www.opal-rt.com/docs/rt-lab/simulink-blocks-reference/rt-events-library/rte-events-generator.md) blocks use Opal-RT OP5110 or OP5120 reconfigurable digital input/output I/O modules to read digital signals and detect transitions occurring during one calculation step.

## Mask parameters

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

<table data-search="false"><thead><tr><th>Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong>Conversion Type</strong></td><td>Specifies the conversion direction: from OP5110-5120 Event Detector to RTE Boolean, or from RTE Boolean to OP5110-5120 Event Generator.</td></tr><tr><td><strong>Number of OP5110-5120 Event Lines</strong></td><td>The number of input/output OP5110-5120 lines.</td></tr><tr><td><strong>Maximum number of events</strong></td><td>The maximum number of events (transitions) that can occur during a single step. Events beyond this number are ignored and not output.</td></tr><tr><td><strong>Time Unit</strong></td><td>Select whether time values are specified as a ratio of transition time over the step duration, or in seconds.</td></tr><tr><td><strong>Consider time factor</strong></td><td>When checked, the RT-LAB time factor is applied to the block’s time values. Available only when Time Unit is Seconds.</td></tr><tr><td><strong>Sample Time</strong></td><td>The time interval between samples, in seconds. Available only when the conversion type is OP5110-5120 Event Detector to RTE Boolean.</td></tr><tr><td><strong>Show Initial States input</strong></td><td>When checked, adds the <em>Initial States</em> input to the block. See the Inputs section below. Available only when the conversion type is OP5110-5120 Event Detector to RTE Boolean.</td></tr><tr><td><strong>Add an initial event at time 0 to force initial state</strong></td><td>When this checkbox is checked, an initial event is <em>sent from</em> the block to setup the very first event at time 0 of the simulation.<br>Only available when the conversion type is RTE Boolean to OP5110-5120.</td></tr><tr><td><strong>Output initial signal state every time step</strong></td><td>When this checkbox is checked, the block provides an additional output that indicates the signal's logic state at the beginning of each simulation time step. This feature ensure proper configuration when receiving data from IOs. For example when there is an overrun during simulation.<br>Only available when the conversion type is RTE Boolean to OP5110-5120.</td></tr></tbody></table>

## Inputs

| Input                       | Description                                                                                                                                                     |
| --------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Initial States (Double)** | The initial state of each input vector. Available only when the conversion type is RTE Boolean to OP5110-5120 Event Generator.                                  |
| **State Vector (Double)**   | The state vector output from the RT-LAB OP5110-5120 Event Detector block. Available only when the conversion type is OP5110-5120 Event Detector to RTE Boolean. |
| **Time n (Double)**         | The time vector output from the RT-LAB OP5110-5120 Event Detector block. Available only when the conversion type is OP5110-5120 Event Detector to RTE Boolean.  |
| **Status n (Double)**       | The status output from the RT-LAB OP5110-5120 Event Detector. Available only when the conversion type is OP5110-5120 Event Detector to RTE Boolean.             |
| **Input (RTE Boolean)**     | RTE Boolean signal to send to the RT-LAB OP5110-5120 Event Generator. Available only when the conversion type is RTE Boolean to OP5110-5120 Event Generator.    |

## Outputs

| Output                      | Description                                                                                                                                                  |
| --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Output (RTE Boolean)**    | The equivalent RTE Boolean-type signal. Available only when the conversion type is OP5110-5120 Event Detector to RTE Boolean.                                |
| **State n Vector (Double)** | The state vector sent to the RT-LAB OP5110-5120 Event Generator. Available only when the conversion type is RTE Boolean to OP5110-5120 Event Generator.      |
| **Time n Vector (Double)**  | The time vector sent to the RT-LAB OP5110-5120 Event Generator block. Available only when the conversion type is RTE Boolean to OP5110-5120 Event Generator. |
| **Initial States (Double)** | Indicates the signal's logic state at the beginning of each simulation time step. Only available when the conversion type is RTE Boolean to OP5110-5120.     |

## Characteristics and limitations

| Characteristic         | Value                                                                                                                                    |
| ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| **Direct Feedthrough** | Yes                                                                                                                                      |
| **Sample Time**        | Inherited and fixed discrete                                                                                                             |
| **Work offline**       | Yes. Note: the RT-LAB OP5110-5120 Event Generator/Detector block does not exchange events with OP5100 I/O modules in offline simulation. |
| **Dimensionalized**    | Yes                                                                                                                                      |


---

# 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-events-library/rte-conversion-op5110-5120.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.
