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.

Installing RT-LAB on Windows Command Stations and Windows Target Nodes

Page Content

Here we describe the installation of RT-LAB host and target components on a Windows PC.

RT-LAB provides full integration with MATLAB™ / Simulink. Please make sure this environment is available before installing RT-LAB.

Install a version of MATLAB™. You need the following toolboxes from MathWorks:

  • Simulink

  • Simulink Coder

  • Simscape Electrical Specialized Power Systems (SPS) (only for electrical simulations)

  • MATLAB™ Coder (optional)

  • Stateflow (optional)

Close all instances of MATLAB™.

Installing RT-LAB Software on your Host Station

The software can be downloaded directly from:

Register as required and complete the on-screen directions.

Wait for the Setup Wizard to open. If the wizard fails to start automatically, browse the contents of the disk, and run Setup/Setup.exe. (You will need administrator privileges.)

Setup Wizard
  • Follow the on-screen instructions to go through the installation process.

  • Please wait while RT-LAB is installed. This will only take a few minutes.

  • Once RT-LAB has been installed on your computer, click Finish to close the Wizard.

The RT-LAB installation software creates or modifies the following files:

  • <MATLAB_ROOT>\toolbox\local\startup.m, for each version of MATLAB.

  • <MATLAB_ROOT>\toolbox\local\setup_rtlab.m, for each version of MATLAB.

The RT-LAB installation software also adds the following paths to MATLAB:

  • <RT-LAB installation dir>\common\bin

  • <RT-LAB installation dir>\Simulink\rtw\c\common

  • <RT-LAB installation dir>\Simulink\libr[xxxxx]

  • <RT-LAB installation dir>\Simulink\m

  • <RT-LAB installation dir>\common\bin\x32

...where rxxxxx is r2021a for MATLAB 9.10, r2023b for MATLAB 23.2 and so on.

Configuring your Firewall Application

The RT-LAB installation wizard asks the user’s permission to automatically configure Windows Firewall.

However, if you choose not to allow this automatic configuration, or if you are using a third-party firewall application, then a manual configuration will be necessary.

You must give access to the following programs through your firewall application before launching RT-LAB:

<RT-LAB installation dir>\common\ui\RT-LAB.exe <RT-LAB installation dir>\common\bin\Controller.exe <RT-LAB installation dir>\common\bin\MetaController.exe <RT-LAB installation dir>\common\bin\OpalD.exe <RT-LAB installation dir>\common\bin\OpalDLoader.exe <RT-LAB installation dir>\common\bin\x32\OpalNode.exe <RT-LAB installation dir>\common\bin\x32\PanelViewerXXXX.exe

...(where XXXX represents the supported LabVIEW versions).

As an example, the following procedure shows how to manually configure Windows Firewall (once again, performing these steps is not necessary if you have accepted the automatic configuration).

  • Launch the Windows Firewall.

  • Click Allow a program or feature through Windows Firewall.

  • In the new window, click Allow another program...

  • In the new window, click Browse... and choose the programs listed above.

If you have any questions about the configuration of your firewall application, please contact the third-party software’s technical support. If RT-LAB presents any undesirable behavior arising from this configuration, please contact OPAL-RT's support team

Starting RT-LAB

To launch the RT-LAB interface:

  • Double-click the RT-LAB shortcut on your Desktop,

  • Or use the Windows start menu (All Programs/OPAL-RT/RT-LABv2023.X.Y.Z/RT-LAB).

You are then asked to select a workspace.

Click the box labeled Use this as default and do not ask again if you would like to establish a default directory.

Eclipse Launcher

Selecting a workspace

The workspace is the directory in which RT-LAB will store all the files required for your simulations. We recommend you create a new and empty directory, as this will help you understand the exercises in this guide.

Click the OK button and wait for the Welcome page to appear.

Welcome page
Welcome page


The Welcome page provides quick access to tutorials and documentation. You can open it later from the menu Help/Welcome.

For now, click Go to the workbench to open the main RT-LAB window.

Validating the installation

For validation, we recommend that you verify that all toolboxes have been installed in MATLAB™.

  • Open MATLAB™.

  • Type ‘’ver’’ in the command window of MATLAB™.

  • Verify that you see the following toolboxes from OPAL-RT:

    • RT-LAB

    • ARTEMIS Blockset (optional depending on license)

    • RT-EVENTS Blockset (optional depending on license)

    • RT-XSG (optional depending on license)

If any of the OPAL-RT toolboxes have not been installed in your instance of MATLAB™, you can add them manually. Run the “m” script (at the following locations) in your MATLAB™ to install them.


C:\OPAL-RT\RT-LAB\[RT-Lab version]\simulink\m\setup_rtlab.m

ARTEMIS Blockset

C:\OPAL-RT\ARTEMIS\[ARTEMIS version]\art_m\setup_artemis.m

RT-EVENTS Blockset

C:\OPAL-RT\RT-EVENTS\[RT-EVENTS version]\rte_m\setup_rtevents.m


C:\OPAL-RT\RT-XSG\[RT-XSG version]\rtxsg_m\setup_rtxsg.m

Installing the LabVIEW API

The installation of the LabVIEW API is done through an executable (.exe file) located in the RT-LAB installation directory. Once installed, there will be one VI (Virtual Instrument) per API function.

LabVIEW must be installed first and the API must be installed for each version of LabVIEW you want to use.

  • Run <RT-LAB installation dir>\labview\XXXX\Volume\setup.exe
    ...(where XXXX represents the desired LabVIEW version)

  • Follow the instructions, and click Finish once the installation is complete.

Installing TestStand

During the installation process, RT-LAB will add certain files to TestStand if TestStand was installed prior to installing RT-LAB. RT-LAB makes all the necessary adjustments so that most of the RT-LAB API functions can be readily used in TestStand.

The supported versions of TestStand are listed in the National Instruments TestStand Compatibility section.

One additional adjustment to TestStand that you may want to perform manually to avoid having to locate OpalApiTs.dll when you open sequences that use the RT-LAB API is the following:

  • Run TestStand, and log in as administrator.

  • Go to the Configure menu and open the Search Directories window.

  • Make sure the item PATH environment variable is checked.

  • Click OK to apply any changes.

Warning: It is strongly discouraged to add the complete path to the location of OpalApiTs.dll for a given RT-LAB release because this path will not be updated when you install a newer version of RT-LAB.

Configuring ScopeView with EMTP-RT

RT-LAB and EMTP-RV can be installed on the same host computer and can both use ScopeView.

Normally, both applications will use two different versions of ScopeView but, if required, it is possible to configure EMTP-RV to start the version that is packaged with RT-LAB.

To do so, follow these steps:

  • Click the Windows Start > Run ... menu or click WIN+R.

  • Start the Registry Editor by typing regedit.exe

  • Locate the following registry:


  • Change the InstallPath value to the ScopeView installation folder package with RT-LAB. Example: <RT-LAB installation dir>\ScopeView.

Setting Up the Windows PC as a Target Node

The Windows command station may also be used as a target node for slow pseudo-real-time applications. Please note that you must use an OPAL-RT chassis with a real-time operating system as a target node in order to achieve real-time performances.

Installing compilers for Windows-based simulation

The user can use either Microsoft Visual Studio C++ 2010 or a compatible version of MinGW. 

Installing Visual C++

As the model is going to be compiled on the command station with a Windows target node, you must install Microsoft Visual C++ 10.0. If you want multiple users on this station to be able to use Microsoft Visual C++ you must install it as administrator. When the installation program prompts you to register environment variables answer yes. The installer registers those variables in the current user local variables. To compile as another user, you must first copy those variables from the current user variables to all user variables.

Registering Variables

If Visual C++ 10.0 is already installed, the user performing the installation may have issues with the installer that sets environment variables.

To correct the situation, you need to do the following:

  • Press the Windows Start button, and start typing Edit the system environment variables. Click the match in the Control Panel section.

Edit the system environment variables

  • In the System Properties window, under the Advanced tab, click Environment Variables...

  • In the System variables section, select the Path variable and click Edit...

Append the following paths to the Variable value field (with a semi-colon between each path). Note that these paths correspond to a typical installation of Visual Studio.

  • C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools

  • C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin

Your command station is now ready to compile, execute and debug models.

Installing MinGW

RT-LAB provides the tools to download and install a compatible version of MinGW. RT-LAB enforces the use of a specific version of MinGW which has been verified as compatible with the software.  Installing this version is required for any new installation of RT-LAB if MinGW is to be used as a compiler.

If internet access is available from the host Windows system, perform the following operations:

  • From the file explorer, open the <RT-LAB installation dir>\mingw directory.

  • Double-click on mingw_download.bat the launch the installation and wait for completion (it can take several minutes).

  • Once completed, the final lines of the command output should match the following:

  • Press ENTER to close the command window.

If no internet access is available on the Windows host system, perform the following operations:

  • Copy and transfer the <RT-LAB installation dir>\mingw\mingw_download.bat to a Windows computer from which internet is available.

  • From the computer which has internet access, open a Command Prompt window

  • Ensure the current directory of the command window matches the directory where mingw_download.bat has been copied using the command
    cd <myfolder>

  • Perform the download of MinGW using the following command where tmpmingw can be replaced by any folder of your choice. It can take several minutes.
    mingw_download.bat -d tmpmingw
    Once completed, the final lines of the command output should be similar to the following:

Press ENTER to complete the command

  • Copy and transfer the entirety of the tmpmingw folder to the Windows system on which RT-LAB has been installed

  • From the Windows host computer, open a Command Prompt window

  • From the command window, move to the mingw folder within the installation of RT-LAB using the following command:
    cd <RT-LAB installation dir>\mingw

  • Perform the installation of MinGW using the following command where <My Directory>\tmpmingw designates the folder where the MinGW installation files were transferred:
    mingw_download.bat -i <My Directory>\tmpmingw

  • Once completed, the final lines of the command output should be similar to the following:

  • Press ENTER to complete the command

Displaying localhost

In order to display the Windows command station as a target node:

  • In the Project Explorer, click Filter targets.

  • Check Show ’localhost’ target.

  • Click OK.

Note: A license is needed to use a target node. For more information, read about Activating a License on the Target Node.


OPAL-RT TECHNOLOGIES, Inc. | 1751, rue Richardson, bureau 1060 | Montréal, Québec Canada H3K 1G6 | | +1 514-935-2323