> 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-events-generator.md).

# RTE Events Generator

## Description

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

The **RTE Events Generator** block, located in the **RT-EVENTS/Sources** library, generates square pulses. At each calculation step, it expects the following event information: the number of events, the time of each event, and the value (transition) of each event.

## Mask parameters

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

<table><thead><tr><th width="239.60003662109375">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong>Outport data type</strong></td><td>Specifies whether the output is an RTE Boolean or RTE Double signal.</td></tr><tr><td><strong>Maximum number of events</strong></td><td>Maximum number of events (transitions) that can occur during a single step. Events beyond this limit are not output.</td></tr><tr><td><strong>Sample Time</strong></td><td>Output sample time in seconds.</td></tr></tbody></table>

## Inputs

<table><thead><tr><th width="240.4000244140625">Input</th><th>Description</th></tr></thead><tbody><tr><td><strong>Time Vector (Double)</strong></td><td>Vector of each event’s time within the model sample time. The values of time must be in the following range: [0 to Sample Time].</td></tr><tr><td><strong>State Vector (Double)</strong></td><td>Vector of each event’s state (transition).</td></tr><tr><td><strong>Initial condition (Double)</strong></td><td>State of the RTE output signal before the first event.</td></tr><tr><td><strong>Number of events (Double)</strong></td><td>Number of events in each calculation step.</td></tr></tbody></table>

## Outputs

<table><thead><tr><th width="240.4000244140625">Output</th><th>Description</th></tr></thead><tbody><tr><td><strong>Output (RTE)</strong></td><td>Generated RTE signal.</td></tr><tr><td><strong>Status (Double)</strong></td><td>Status of the RTE signal. See RT-EVENTS Status.</td></tr></tbody></table>

## Characteristics and limitations

| Characteristic         | Value                        |
| ---------------------- | ---------------------------- |
| **Direct Feedthrough** | Yes                          |
| **Sample time**        | Inherited and fixed discrete |
| **Work offline**       | Yes                          |
| **Dimensionalized**    | 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/rt-events-library/rte-events-generator.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.
