> 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/hypersim/model-and-simulation/import-models-from-external-software-or-code/import-from-simulink-hyperlink/export-from-simulink/use-scopes.md).

# Use Scopes

This page describes how Simulink scope blocks are handled when importing Simulink models into HYPERSIM. **Importing scopes is primarily intended for debugging purposes**, as it allows internal Simulink variables to be observed in HYPERSIM without adding explicit output ports to the model.

## Scope import behavior in HYPERSIM

When a Simulink model is imported into HYPERSIM, supported Simulink scope blocks are converted into HYPERSIM signals and exposed through a dedicated output pin named **Scopes** on the imported block. This mechanism enables users to monitor internal variables using HYPERSIM sensors while preserving the original Simulink model structure.

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-ca5477764e68b2eac8312c26fcc5aa6bd0d5d746%2Fsimulink-import-scopes.png?alt=media" alt=""><figcaption></figcaption></figure>

## Embedded Coder target (hyperlink\_ert.tlc)

When using **Embedded Coder**, the **Block reduction** option must be **disabled** in the Simulink optimization settings. Otherwise, scopes are removed during code generation and will not be imported into HYPERSIM.

## Simulink Coder target (hyperlink\_grt.tlc)

When using **Simulink Coder** (without Embedded Coder), Simulink scopes are imported automatically by default. This behavior applies across supported MATLAB versions.


---

# 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/hypersim/model-and-simulation/import-models-from-external-software-or-code/import-from-simulink-hyperlink/export-from-simulink/use-scopes.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.
