> 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/overview/standard-workflow-in-rt-lab.md).

# Standard Workflow in RT-LAB

This section provides an overview of the complete workflow for creating, preparing, and executing a model in real time with RT-LAB.

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

{% stepper %}
{% step %}

### Create a new project

Projects organize all models, I/O Interfaces, Dashboards, Recorders, and related files.

**To create a new project:**

1. From the menu bar, select **File > New > RT-LAB Project**.
2. Enter a name and location for your project, then click **Next.**
3. By default, **empty** is selected. Click **Finish** to create a blank project, or select a template to initialize the project with predefined content.

The project appears in the **Project Explorer** view.
{% endstep %}

{% step %}

### Add a model to a project

Models are typically Simulink files (`.mdl` or `.slx`) that you want to simulate in real-time.

**To add a model:**

1. In the **Project Explorer**, right-click your project and choose **Import > Existing RT-LAB Model**.\
   \- Alternatively, select **New > Model** to create a new empty Simulink model.
2. Browse to the directory containing your Simulink model.
3. Select the desired file and click **Finish**.\
   \- By default, all files in the selected directory are included in the import.

The model now appears under your project in the **Project Explorer**.
{% endstep %}

{% step %}

### Prepare the model for real-time simulation

1. In the **Project Explorer**, right-click your model and select **Edit.**
2. Make the required changes in **Simulink**. Refer to the [**Model & Simulation**](https://www.opal-rt.com/docs/rt-lab/model-and-simulation/single-core-and-multi-core-simulation.md) section for application‑specific guidance and detailed information on the Simulink modifications required for real‑time execution in RT‑LAB.
3. In the Simulink **Configuration Parameters**, disable **Block reduction** and **Signal storage reuse**.
4. Save the model and close MATLAB.
   {% endstep %}

{% step %}

### Build (compile) the model in RT-LAB

1. In the **Project Explorer**, right-click your simulator and choose **Set as Development Node.**
2. In the **Project Explorer**, double-click your model to open the **Model Editor**.
3. Go to the **Development** tab.
4. Select the **Target Platform**, matching the operating system of your simulator.
5. In the **Project Explorer**, right-click your model and select **Simulation > Build.**

   \- Optional: Right-click your model and select **Simulation > Build Configurations…** to adjust options (MATLAB version, compilation steps, development node).

If the model does not contain top‑level subsystems, RT‑LAB automatically groups the entire model into a single **`sm_computation`** subsystem.

Build results appear in the **Compilation View**.
{% endstep %}

{% step %}

### Prepare the model for execution

By default, all model subsystems are assigned to the development node. If required, you can reassign subsystems to other nodes before execution.

To reassign subsystems to other nodes,

1. In the **Project Explorer**, double-click your model.
2. Go to the **Assignment** tab.
3. For each subsystem, use the **Assigned node** drop-down menu to select the desired node.

**Select the simulation mode**

RT-LAB supports four modes:

* **Software Synchronized** – Real-time with internal timer. The FPGA is not used.
* **Hardware Synchronized** – Real-time with external timer. The FPGA provides the clock, required when using I/O modules and/or eHS.
* **Simulation** – Standard desktop execution
* **Simulation with Low Priority** – Background execution

**To set the mode:**

1. In the **Project Explorer**, double-click your model.
2. Go to the **Execution** tab.
3. Choose the appropriate mode (e.g., **Software Synchronized** if no FPGA is used).
   {% endstep %}

{% step %}

### Load and execute the model

**Load the model**

In the **Project Explorer**, right-click your model and select **Simulation > Load.**

**Run the model**

In the **Project Explorer**, right-click your model **Simulation > Execute.**
{% endstep %}

{% step %}

### Interact with the model

[Interacting with the model using **Dashboards**](https://www.opal-rt.com/docs/rt-lab/simulation-control-monitoring-and-logging/interact-using-dashboards.md) is recommended. In the **Project Explorer**, double‑click **Dashboards**.

Alternatively, you can [interact with the model using the **Simulink console**](https://www.opal-rt.com/docs/rt-lab/simulation-control-monitoring-and-logging/interact-using-simulink.md). If the model includes a console subsystem (for example, **`sc_user_interface`**):

* The console opens automatically when **Handle Console Automatically** is enabled in the **Simulation Tools** tab.
* Otherwise, double‑click the console subsystem under your model in the **Project Explorer** to open it manually.
  {% endstep %}

{% step %}

### Reset the model

After execution: In the **Project Explorer**, right-click your model **Simulation > Reset.**
{% 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/overview/standard-workflow-in-rt-lab.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.
