> 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-library/opsubsystemtrigger.md).

# OpSubsystemTrigger

## Description

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

The **OpSubsystemTrigger** block, located in the **RT-LAB/Miscellaneous** library, asynchronously triggers the execution of one or more Simulink subsystems from within a Master or Slave subsystem. Use it with a user-defined Trigger block (for example, a Keyboard trigger block) to interface with the trigger source and select which subsystem to trigger. The Trigger block inside each triggered subsystem must have its Trigger-Type parameter set to Function Call. You can also trigger subsystems directly from the model using the optional block input.

Because the triggered subsystem runs asynchronously to the model, RT-LAB automatically inserts a management block to ensure signals read and written by the triggered subsystem are from the same iteration. This typically adds minimal computation overhead.

{% hint style="danger" %}
Ensure all inputs and outputs of the triggered subsystem are connected. Also ensure the related In and Out blocks within the triggered subsystem are connected to at least one other block.
{% endhint %}

## Mask parameters

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

<table><thead><tr><th width="249.7999267578125">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong>Number of subsystems</strong></td><td>Number of subsystems driven by this block.</td></tr><tr><td><strong>Trigger group label</strong></td><td>Group label shared between the OpSubsystemTrigger block and its associated OpTrigger block. Do not reuse a group label across different OpSubsystemTrigger blocks.</td></tr><tr><td><strong>Dynamic priority</strong></td><td><p>Adds a block input to modify at run time the initial priority specified below.</p><p>Defines the priority of the associated triggered subsystems relative to RT-LAB (the model application). If Dynamic priority is selected, this value is the initial priority.</p><ul><li><strong>0:</strong> same priority as RT-LAB</li><li><strong>>0:</strong> that number of priority levels above RT-LAB</li><li><strong>&#x3C;0:</strong> that number of priority levels below RT-LAB</li></ul></td></tr><tr><td><strong>Use input as an additional trigger source</strong></td><td>Enables direct triggering from the model, as with a standard Simulink triggered subsystem. An input appears on the block; apply the triggering signals for each subsystem using a multiplexer. The first input corresponds to the first subsystem, the second input to the next, and so on.</td></tr><tr><td><strong>Trigger on</strong></td><td>Available only if Use input as an additional trigger source is selected. Select the input event that triggers the subsystems: rising edge, falling edge, or both edges.</td></tr></tbody></table>

## Inputs

<table><thead><tr><th width="250.5999755859375">Input</th><th>Description</th></tr></thead><tbody><tr><td><strong>Trigger</strong></td><td>Available only if use input as an additional trigger source is selected. The width equals the number of triggered subsystems. Apply the Simulink triggering signal for each subsystem to this input.</td></tr><tr><td><strong>Priority</strong></td><td><p>Available only if Dynamic priority is selected. Changes at run time the priority of the triggered subsystems relative to RT-LAB (the model application).</p><ul><li><strong>0:</strong> same priority as RT-LAB</li><li><strong>>0:</strong> that number of priority levels above RT-LAB</li><li><strong>&#x3C;0:</strong> that number of priority levels below RT-LAB</li></ul></td></tr></tbody></table>

## Outputs

<table><thead><tr><th width="250.5999755859375">Output</th><th>Description</th></tr></thead><tbody><tr><td><strong>Triggering connection</strong></td><td>Provides the triggering connection. Only one output is available; use a demultiplexer to link all triggered subsystems. This signal only indicates the triggering relationship and cannot be used for other purposes.</td></tr></tbody></table>

## Characteristics and limitations

<table><thead><tr><th width="250.60003662109375">Characteristic</th><th>Value</th></tr></thead><tbody><tr><td>Direct Feedthrough</td><td>No</td></tr><tr><td>Discrete sample time</td><td>Yes</td></tr><tr><td>XHP support</td><td>Yes</td></tr><tr><td>Work offline</td><td>N/A</td></tr><tr><td>Potential overhead</td><td>A slightly larger overhead may occur if the subsystem is triggered exactly when the model updates its inputs or reads its outputs. Such collisions are rare and limited to very short time windows.</td></tr><tr><td>Limitations</td><td><ul><li>Goto-From exchanges between the triggered subsystem and blocks outside it are not fully supported. Although functional, not all signals may originate from the same iteration. Goto-From exchanges within the triggered subsystem are fully operational.</li><li>The same limitation applies to Data Store Read and Data Store Write blocks.</li></ul></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-library/opsubsystemtrigger.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.
