Documentation Home Page RT-LAB Home Page
Pour la documentation en FRANÇAIS, utilisez l'outil de traduction de votre navigateur Chrome, Edge ou Safari. Voir un exemple.

Embedding Simulations

An embedded simulation is a simulation that runs on a dedicated target. It is part of the target and is automatically loaded and executed when the target is powered on, i.e. it doesn’t require the user interface on the host computer to start the simulation. It is properly-suited for stand-alone systems such as PC/104 or any embedded computer. Like any simulation, it can use any hardware input/output device or asynchronous process to integrate external physical components.

Embedded simulations may be controlled like any simulation using any host computer that runs the RT-LAB user interface, even if the simulation was started by another user.

See Enabling Embedded Simulation and Connecting and Interacting with Embedded Simulation sections.

However, all users should share the same RT-LAB project (or a copy) that contains the project's files such as models and configurations files. Note however that any user may disable an embedded simulation at the next target power up without the original project. See Disabling Embedded Simulation.

Enabling Embedded Simulation

To create an embedded simulation:

  • Select the project’s model you want to embed from the Project Explorer view.
  • Load and execute your model. During this step, RT-LAB will automatically transfer to the target all the required files to embed a simulation. It also authenticates and validates that the simulation is correctly running on the target.
  • Open the Model Editor and select the Assignation Page.
  • Click the Set as Embedded button in the Target Utilities section. At this point, your model is embedded and your simulation will start automatically the next time your target is powered up.

Continue to work with your project and model. If required it is possible to stop and reset your simulation and change parameters and configurations.

Note, however, that when a simulation is restarted after a power-up of the target, it resets:

  • all model parameters to the original values set when the model was compiled and
  • all model properties and configurations to the values set the last time the model was loaded through the user interface. As mentioned above, configurations and properties files are transferred to the target during load.

Close your project to disconnect it from the embedded simulation. You can reconnect the project to the current embedded simulation as described in Connecting and Interacting with Embedded Simulation. You can also open a new instance of the project, for example, to embed it on another target. Note that in this case, if you modify the model that is already embedded, you will not be able to reconnect to the previously embedded simulation anymore.

Viewing and Detecting Embedded Simulation

RT-LAB displays embedded simulations in your Project Explorer. Normally, you should see them on any target running an embedded simulation. If you expand your target, you will see the project and model running on the target.

RT-LAB also displays embedded simulations directly on the opened or closed projects as in the following figures:

Embedded simulation in Project Explorer


However, the RT-LAB user interface does not automatically detect that a simulation is running on a target after a target’s reboot or if a simulation was started by another user.

In these particular cases, you could force the user interface to refresh its list of embedded simulations by refreshing one or more targets using the interface:

  • Select one or more targets from the Project Explorer view.
  • Right-click on the items and select Refresh. At this point, RT-LAB will refresh the target items and will display embedded simulation on the target if running on the target.

Connecting and Interacting with Embedded Simulation

As explained in the previous section, RT-LAB displays embedded simulations in the Project Explorer view as children of targets. To start interacting with an embedded simulation, right-click on one of its items (project, model or subsystem) and select Connect. This will open the Connect to Embedded Simulation Wizard and let you choose the project you want to connect to this embedded simulation.

Once connected, the project can be used to interact with the model like any ‘standard’ project.

Again, if the embedded simulation was started by another user, your workspace project must contain an exact copy of the embedded model. This is important because RT-LAB will only verify the path and name of the model, not its content.

If you do not have a shared project or a copy of the original project, you should not interact with the embedded simulation. In this case, the only safe action is to disable the embedded mode on the target so the model will not start the next time the target is powered on.

Disabling Embedded Simulation

The preferred approach to disabling the embedded mode is to connect to the embedded simulation as described in the previous section and then:

  • Open the Model Editor and select the Assignation Page.

Click the Clear embedded button from the Target Utilities section.

  • If required, reset your model to stop the current simulation. Clearing and disabling an embedded simulation only removes the settings on the target that start automatically the simulation at power-up.


The second approach is based on the target items from the Project Explorer view.

This method is suggested when you do not share the project (or do not have a copy of the project):

  • Select the target that runs the embedded simulation in the Project Explorer view.
  • Right-click the target and select Execute > Remove embedded mode.
  • If a project is currently opened and connected to this embedded simulation, the user interface will prompt you to reset the model.
  • Otherwise, if no project is connected to this embedded simulation, it will prompt you to reboot the target.


Alternately, embedded simulations can be disabled using the Telnet Terminal View and shell commands:

  • Select the target that displays embedded simulation in the Project Explorer view.
  • Click the item Tools > Telnet to open the Telnet Terminal View.
  • Login as root user and enter the following command:


>> rm -f /usr/opalrt/local/OpalStartup.

OPAL-RT TECHNOLOGIES, Inc. | 1751, rue Richardson, bureau 1060 | Montréal, Québec Canada H3K 1G6 | opal-rt.com | +1 514-935-2323
Follow OPAL-RT: LinkedIn | Facebook | YouTube | X/Twitter