> 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/get-started/run-your-integration-project/review-and-prepare-the-model.md).

# Review & Prepare the Model

{% stepper %}
{% step %}

### Open the integration model in Simulink

In RT-LAB, right-click the model and select **Edit** or **Edit with** to choose a MATLAB version. MATLAB will launch with your model.

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-107316df799ba007035e13f95b3df2936920ad96%2Frtlab-edit-project-select-matlab.png?alt=media" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Analyze the model for I/O setup and monitoring

In the root layer of your Simulink model, you will find an **SM\_\[name]** subsystem, and you may find a **SC\_\[name]** subsyste&#x6D;**.**

* **SM\_\[name]** (Subsystem Master) contains all the real-time simulation components. It includes all I/Os and is the only part that runs on the simulator.
* **SC\_\[name]** (Subsystem Console) runs asynchronously on your workstation, acting as the user interface. Avoid placing critical mathematical logic here.
  * If the console subsystem is not included in the model, it is available under **Dashboards** in the Project Explorer.

The test model is an excellent resource for understanding how to set up loopback connections. In the **SM\_\[name]** (Subsystem Master), I/Os are explicitly labeled, making it easier to determine which connections are needed. Here is a simple example:

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-e9ec1345a7a3bf778dd0815e0ec135380b28a85e%2Fproject-setup-loopback.png?alt=media" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Connect the DB37 loopback cables

Use the model’s I/O information to make the following loopback connections:

* **AO → AI** (Analog Output to Analog Input)
* **DO → DI** (Digital Output to Digital Input)

Steps:

1. Insert the end of the DB37 loopback cable with the PCB board into the DB37 connector of the desired **Output module** in the simulator.
2. Connect the other end of the DB37 loopback cable to the DB37 connector to the desired **Input** **module** in the simulator to loop back the output signal.
3. Review the documentation of your **Output modules**. For Output I/O modules that require external power, each bank of 16 signals must have its own supply. Power each DB37 loopback cable through its **Vuser** and **Vrtn** pins.
   1. Set the DIP switch on the board to **EXT** (as shown above).
   2. Do **not** set the switch to **INT.12V** unless specifically indicated in the System Description Document.
   3. Connect an external power supply to the **2-pin screw terminal** (refer to the I/O module’s documentation for voltage limits).
      {% endstep %}

{% step %}

### Save the model in Simulink

{% endstep %}

{% step %}

### Build the model in RT-LAB

{% endstep %}
{% endstepper %}


---

# 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/get-started/run-your-integration-project/review-and-prepare-the-model.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.
