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.
Preparing and Building the Model
Now that there is a model in your project, here’s how to prepare and build it for real-time simulation.
Preparing the build configuration
Selecting the development node.
Editing the model
Building the model
Assigning subsystems
Selecting the Development Node
Before compiling your model for real-time simulation, you must select the target node on which your model is compiled. This target node is called the development node. Normally this step is performed once, when configuring RT-LAB for the first time.
To change the development node do the following:
Activate the Project Explorer view.
Select the target MyTarget in the Project Explorer view.
To set this target as the development node, use one of the following methods:
From the the view’s popup menu choose Set as development node or
Open the RT-LAB preferences using the Window > Preferences menu, select the RT-LAB → Simulation Tools -> RT-LAB preference page, and then select for the desired target platform the target node you want to use as development node.
A small letter appears on the target node indicating that this target node is used a development node.
Editing the model
Now that your model and RT-LAB are configured, here how to edit your model with RT-LAB.
Activate the Project Explorer view.
Select the model MyModel in the Project Explorer view.
To edit your model, use one of the following methods:
From the the view’s popup menu choose Edit
From the menu bar, select Tools > Open MatLab, drag and drop the model MyModel in MatLab command windows.
Open sm_computation subsystem and add a Gain block between OpComm block and output of the subsystem.
Note: Step corresponds to the edition of your model.
Save the model and close MatLab.
Preparing the Build Configuration
Before building your model for real-time, it is necessary to prepare the build configuration of the model.
Activate the Project Explorer view.
Select the model MyModel in the Project Explorer view.
Double-click the model to open its editor.
Select the Development page of the editor.
Select the target platform (or operating system) corresponding to your target node.
Note: The tabs of the Development page configure the compiler and linker options.
Building the Model
Now that your model and RT-LAB are configured, this is how to build your model with RT-LAB.
Activate the Project Explorer view.
Select the model MyModel in the Project Explorer view.
To start the complete build process, use one of the following methods:
From the menu bar, select Simulation > Build,
From the view’s popup menu choose Simulation > Build or
From the main toolbar, click the build button.
It is also possible to start the build process using the Build Configuration dialog box. This window allows you to change RT-LAB configurations. For example, it allows you to select the development node, the Matlab version used when compiling a Simulink model and the steps to perform while compiling. To open the Build Configuration dialog box, do the following:
From the menu bar, select Simulation > Build Configurations ...,
From the view’s popup menu choose Simulation > Build Configurations ... or
From the main toolbar, select the Build button drop-down menu, then click the Build configurations ...
After starting the build process, the Compilation view displays compilation results.
Note: To build a model, your target must have a developer license. If your target has only a runtime license, the build process displays the following message: “The license on target does not allow you to compile a model".
For more information about requesting licenses and about license features, please see License Page.
Assigning Subsystems
The last step before executing the model in real-time is to select which target nodes each subsystem is executed.
This step is called the assignation.
Activate the Project Explorer view.
Select the model MyModel in the Project Explorer view.
Double-click the model to open its editor.
Select the Assignation page of the editor.
In the subsystems table, for each subsystem, select the Assigned Node cell and then select the desired target node from the drop-down menu.
Executing the Model
Now that there is a built model in your project, here’s how to make a typical simulation (load, execute, change parameter, reset...).
Selecting the simulation mode
Loading the model
Running the model
Using the Console
Resetting the model
Selecting the Simulation Mode
Before loading your model for real-time simulation, you must select the simulation model of your model. You can choose between four simulation modes: Simulation, Simulation with low priority, Software Synchronized and Hardware Synchronized.