> 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-relational-operator.md).

# RTE Relational Operator

## Description

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

The **RTE Relational Operator** block, located in the **RT-EVENTS/Math Operations** library, performs a relational comparison on two inputs and outputs an RTE Boolean signal. Select the operator (<, >, <=, or >=). The output is high when the condition is true. The RTE Boolean signal includes timing information that allows blocks to compensate for discrete-time errors caused by events occurring between sampling instants.

## Mask parameters

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

<table><thead><tr><th width="260.4000244140625">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong>Relational operator</strong></td><td>The relational operator applied to the inputs: &#x3C;, >, &#x3C;=, or >=.</td></tr><tr><td><strong>Maximum Number of events</strong></td><td>The maximum number of transitions allowed in a single step. Should be set to 1. The current implementation detects only one transition. This field aligns with other RTE blocks and will allow selecting multiple events when implemented.</td></tr><tr><td><strong>Sample Time</strong></td><td>The time interval between samples.</td></tr></tbody></table>

## Inputs

<table><thead><tr><th width="260.4000244140625">Input</th><th>Description</th></tr></thead><tbody><tr><td><strong>Inputs (Double)</strong></td><td>Input signals to be compared.</td></tr></tbody></table>

## Outputs

<table><thead><tr><th width="261.20001220703125">Output</th><th>Description</th></tr></thead><tbody><tr><td><strong>Outputs (RTE Boolean)</strong></td><td>Logical signal that is high when the condition is true.</td></tr></tbody></table>

## Characteristics and limitations

| Characteristic     | Value          |
| ------------------ | -------------- |
| Direct feedthrough | Yes            |
| Sample time        | Fixed discrete |
| Work offline       | Yes            |
| 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-relational-operator.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.
