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

# OpSnapshot

## Description

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

The **OpSnapshot** block, located in the **RT-LAB/Monitoring** library, captures a snapshot of the real-time simulation when a specified signal crosses a defined threshold. You can also select the slope (Rising or Falling) on which the threshold is crossed to trigger the snapshot.

## Mask parameters

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

<table><thead><tr><th width="220.20001220703125">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong>Slope</strong></td><td>Selects the slope condition required to trigger the snapshot when the threshold is crossed.<br>- <strong>RISING AND FALLING (DONT_CARE):</strong> A snapshot is taken regardless of the slope when the threshold defined by Trig_level is crossed.<br>- <strong>RISING (SLOPE_UP):</strong> A snapshot is taken only if the threshold is crossed on a rising edge.<br>- <strong>FALLING (SLOPE_DOWN):</strong> A snapshot is taken only if the threshold is crossed on a falling edge.</td></tr><tr><td><strong>FileName</strong></td><td>Not available in the current version. By default, RT-LAB uses the model name with a suffix.</td></tr><tr><td><strong>Overwrite</strong></td><td>If checked, overwrites the previous snapshot file if one exists. If not checked, the block appends a different index number to the filename for each snapshot taken.</td></tr></tbody></table>

## Inputs

<table><thead><tr><th width="220.199951171875">Input</th><th>Description</th></tr></thead><tbody><tr><td><strong>Trigger</strong></td><td>Signal used to trigger a snapshot when it reaches the specified threshold.</td></tr><tr><td><strong>Trig_level</strong></td><td>Specifies the threshold value that the Trigger signal must reach to capture a snapshot.</td></tr></tbody></table>

## Outputs

This block has no outputs.

## Characteristics and limitations

| Characteristic       | Value                  |
| -------------------- | ---------------------- |
| Direct Feedthrough   | Yes                    |
| Discrete sample time | No                     |
| XHP support          | Yes (Partial XHP only) |
| Work offline         | 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-lab-library/opsnapshot.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.
