> 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-sum.md).

# RTE Sum

## Description

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

The **RTE Sum** block, located in the **RT-EVENTS/Math Operations** library, adds or subtracts inputs. It supports scalar and vector values. Configure the operations using the List of signs parameter.

* Use plus (+) and minus (-) characters to specify the operation for each input.
* For two or more inputs, the number of characters must match the number of inputs. For example, "+-+" requires three inputs: it subtracts the second input from the first, then adds the third. All non-scalar inputs must have the same dimensions.

{% hint style="info" %}
Additional inputs are added automatically according to the number of operators.
{% endhint %}

With a single vector input, a single "+" or "-" collapses the vector using the specified operation.

## Mask parameters

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

<table><thead><tr><th width="259.60003662109375">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong>List of signs</strong></td><td>Enter as many plus (+) and minus (-) characters as there are inputs.</td></tr><tr><td><strong>Maximum number of events</strong></td><td>Maximum number of events or transitions that can occur during a single step. If this number is exceeded, events are ignored and not output.</td></tr></tbody></table>

## Inputs

<table><thead><tr><th width="260.4000244140625">Input</th><th>Description</th></tr></thead><tbody><tr><td><strong>Input (RTE Double)</strong></td><td>RTE Double signal(s) to sum.</td></tr></tbody></table>

## Outputs

<table><thead><tr><th width="260.4000244140625">Output</th><th>Description</th></tr></thead><tbody><tr><td><strong>Sum (RTE Double)</strong></td><td>Summed RTE Double signal.</td></tr></tbody></table>

## Characteristics and limitations

| Direct Feedthrough | Yes                          |
| ------------------ | ---------------------------- |
| Sample time        | Inherited and 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-sum.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.
