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.
Views
Page Content
Views support editors and provide alternative presentations and ways to navigate the information in your Workbench. For example, the Project Explorer and other navigation views display projects and other resources that you are working with.
- Views also have their own menus.
- To open the menu for a view, click the icon at the left end of the view's title bar. Some views also have their own toolbars.
- The actions represented by buttons on view toolbars only affect the items within that view. A view might appear by itself, or stacked with other views in a tabbed notebook.
- You can change the layout of a perspective by opening and closing views and by docking them in different positions in the Workbench window.
Fast Views
NOTE: The Fast View feature has effectively been replaced by the minimize behavior (which places minimized stacks into the trim where they subsequently work by showing views in the same manner as the Fast Views).
While there's only one Fast View Bar, you can have as many minimized stacks as you want and can place them where you want in the trim.
Fast views are hidden views that can be quickly opened and closed. They work like other views except they do not take up space in your Workbench window.
- Fast views are represented by toolbar buttons on the fast view bar, which is the toolbar initially on the bottom left of the Workbench window.
- When you click the toolbar button for a fast view, that view opens temporarily in the current perspective (overlaying it).
- As soon as you click outside that view or the view loses focus it is hidden again. The fast view bar can also be docked on the other sides of the Workbench window.
- You can create a new fast view by dragging any open view to the fast view bar or by selecting Fast View from the menu that opens when you right-click the icon of the view's tab.
- You can also click on the left-most button of the fast View bar to open a menu that will show a list of views.
- Selecting a view from this list (or from the dialog that appears if you select 'Other...' will result in the selected view being added to the fast view bar and activating (i.e. shown as the active part).
Detached Views
Detached views are views that are shown in a separate window with a smaller trim. They work like other views except they are always shown in front of the Workbench window.
You can create a new detached view by dragging any open view outside of the Workbench window or by selecting Detached from the menu that opens when you right-click the view's tab.
Project Explorer
The Project Explorer is one of the most important parts of the RT-LAB workbench. It allows you to view, create and edit all the resources that you need to complete a simulation.
Resources
There are two kinds of resources: some are specific to RT-LAB (like models and targets) while others are more common resources (like files and folders on the file system).
By default, only RT-LAB resources are shown in the Project Explorer. It is possible to display other resources by clicking on the Filter Resources button.
Each RT-LAB resource reflects an entity managed by the RT-LAB Controller.
Projects
Generally speaking, a project is a set of resources that interacts to achieve a common goal. Several types of projects exist and may appear in Project Explorer. The type of project is determined at project creation in the corresponding RT-LAB project wizard.
In order to interact with a simulator, you must create an RT-LAB project. This kind of project allows you to group several models or to attach model-related files, such as simulation results or test sequences, to the model itself. This makes it easier to share simulation settings and results.
You may take advantage of other project types if you want to develop specific applications. Project types are generally associated with a particular programming language. For example, create a Python project if you need advanced Python functionalities or create a C/C++ project if you plan to develop your own S-Function for Simulink.
Each project maps to a directory in the file system. This location is specified when you create a new project. See New RT-LAB project wizard. The content of this directory will be displayed in the Project Explorer only if you disable the corresponding filter (see Filter Resources below).
If you are done with a project, you can close it by right-clicking on it and clicking Close Project. Closed projects require less memory but their contents are not displayed in the Project Explorer. To re-open a project, right-click on it and select Open Project or simply double-click on it.
Models
Models are the main components of simulation since they determine the behavior of a simulator.
Within the RT-LAB context, the term model has to be clarified since it can refer to two distinct elements:
- The model file, developed with external tools such as MATLAB/Simulink or EMTP-RT, is stored in the file system.
- The Model object, or simply Model, an interface to the model file in the RT-LAB simulator, resides in the Controller memory.
Each RT-LAB Model is closely linked to its original model file. For example, a MATLAB/Simulink model is saved to a file with the .mdl extension. Depending on currently active Filters, this file may appear in Project Explorer. Adding this file to an RT-LAB project creates a new model object which allows additional interaction such as compilation and execution. RT-LAB provides a New RT-LAB model wizard for the creation of a model. Simple templates are available and help you to create a basic skeleton for the real-time subsystems.
This wizard creates both the model file and the corresponding Model object. If you create a model file directly from external tools or if you want to use an existing model file, you must manually create the Model object for the simulation. This can be done using the Add entry of the Context menu or the Drag and Drop.
For convenience, all the Model objects that are part of a simulation are displayed as children of a special element named Models. This element is only a graphical container and is not considered a resource. Actions that can be handled by this element are described in the section named Model Folder below.
Before launching a simulation, a model needs to be built as described in Building models. Once built, a Model contains a list of Subsystems and possibly one Console.
Subsystems
The compilation process creates Subsystems based on the top-level elements of your model file.
A Subsystem is a computation unit that can interact with other Subsystems and with the Console. In order to run a simulation, each subsystem must be assigned to an RT-LAB Target using the Assignation Page. Console
Like Subsystems, the Console is created during the compilation process. The Console provides basic interaction with the rest of the model: it allows the user to modify the values of control signals and to display the values of acquisition signals.
Targets
An RT-LAB Target represents a physical simulator designed to execute Models. They are identified by a name and are associated with an IP address.
Target icons indicate the platform and the state of the Targets. They also allow the identification of the different development nodes used for compilation. To manage the Development Nodes, use the RTLAB preference page or the context menu of a Target.
From top to bottom: Target is down or not accessible.
The Target is up and runs OPAL-RTLinux (x86-based).
|
Note: There is no Development Node for Windows since the local machine is always used for compilation.
Other Resources
The Project Explorer can be used to manipulate other resources such as files and folders. Except if they are filtered, all the files and folders present in a project’s directory appear as children of the File system container:
If you need to use files or folders that are outside of the project’s directory, you can use linked resources. To do so, right-click on a project and select New > File or New > Folder. A dialog is then displayed: click on the Advanced button, select Link to file/folder in the file system and browse to the file or the folder you want to import.
Here is what this dialog looks like while creating a linked folder:
The selected, linked folder appears in the Project Explorer:
Note: An overlayed arrow on the icon indicates a linked resource.
Since linked resources are only links, deleting such a resource only removes the link. The original file or folder is not affected. However, children of a Linked Folder are not linked, so deleting them destroys the original files or folders.
Organizing Resources: Resources on the File System
Each project maps to a directory on the file system. By default, these directories are located in the workspace folder (<RTLAB_ROOT>/workspace/). A project’s directory has the same name as the project itself, so renaming a project in the RT-LAB Workbench renames its directory automatically. Similarly, deleting a project entirely deletes its directory.
When you create a resource in a project, for example when creating a new Model with the New RTLAB model wizard, this resource is stored in its mapped directory.
The default resource hierarchy of a project respects the following rules:
- There is one folder per Model, containing all model-related files
- All Model folders belong to a folder named models
- This models folder is a direct child of the project
Here is an example of this hierarchy:
Working with linked resources
Although respecting the previously described resource hierarchy is highly recommended for simpler resource management, sometimes it may be useful to manipulate resources located outside of a project’s directory. This is the case when several users want to share some files through a network or when several projects use the same files.
To add external files and folders to a project, you have to create linked resources, as described in the Other resources section.
Project location | By default, a project is created in the current workspace directory, but you can specify another location using the New RT-LAB project wizard. This is useful to add an existing project created by another application. This is automatically done when you add Active Projects to the workspace. Be very careful when creating such projects, since all existing files and folders already in the project’s location belong to this project. Deleting this project deletes all its files, even if you set the project’s location to C:\ or to another folder! |
Model location | Models are always located in their project’s directory when they are created with the New RT-LAB model wizard. However, you can add an existing Model with the Add Model wizard. If the model file is located outside of the project’s directory, a linked resource is automatically created. |
Best practices |
|
Model and project states
A Model may be in different states depending on the actions performed by the user. The typical state sequence is: Not Loadable, Compiling, Loadable, Loading, Paused, Running, Resetting, Loadable.
Compiling, Loading and Resetting are transitional states. During these states, there are very few possible interactions with the model.
When a Model is in one of the following states: Compiling, Loading, Paused, Running or Resetting, its state is displayed as shown below:
When an RT-LAB project is closed or collapsed, its state is displayed in three cases:
- If at least one of its Models is currently Loading, Paused, Running or Resetting, the project is in the global state Running
- If no Models are running and if another application, such as a Python script, is connected to this project, its state is set to Active
- If at least one of its Model was Loading, Paused, Running or Resetting, but does not respond anymore, its state is set to Active & not responding
When an RT-LAB project is Active & not responding, it cannot be opened. If one of its models is definitely lost (for example, its target has crashed), you can right-click on this project and select Clean Project info as shown below:
This resets the state of unreachable models and allows the project to be re-opened.
Label Decorations
Decorations display additional information on the elements of the Project Explorer by adding an overlay icon or a short suffix.
- They are used for example to display Model and project states or to show the platform of a Target.
- All these decorations are optional and can be disabled in the Label Decorations preference page.
- The Project Explorer’s menu provides quick access to the following decorations:
Model Platform
Adds an overlay icon to Models to show their current platform:
Subsystem Assignation
Adds the name of the assigned target next to models (if applicable) or subsystems:
Problem Icons
Adds an overlay icon to RT-LAB items to show errors and warnings:
Problem Messages
Adds a message to RT-LAB items to describe errors and warnings:
Target Problems
Adds a message to Targets to describe warnings:
Active Projects
Project Explorer is not the only way to create RT-LAB projects. For example, a Python script can use RtlabApi.NewProject() to create its own RT-LAB project. Such projects are displayed in the Project Explorer as shown below:
myproject is not part of the workspace because it has been created by an external application. Note that it cannot be expanded and there is no interaction with it. If you want to see the content of this project and to interact with it, you need to import it to your
Workspace. The easiest way to realize this is to right-click on the Active Project and select Add to workspace. The Active Project is then replaced by a standard RT-LAB project:
Working Sets
Working sets are useful to organize projects into groups. This is very helpful to identify related projects or when the Workspace contains a lot of projects. Working sets are managed through the View menu:
Clicking Select Working Set... displays the following dialog:
In this dialog, you can create, edit and select Working sets. Editing a Working set allows you to choose which projects are part of this Working set.
Note: A project may belong to several Working sets.
Working sets may affect the presentation of the Project Explorer in two different ways, depending on the Top Level Elements menu:
If Working Sets is selected, the selected Working sets appear in the Project Explorer as containers:
If Projects is selected, only projects that are part of the currently selected Working sets appear in the Project Explorer. Other projects are hidden.
Clicking Deselect Working Set makes all existing projects appear in the Project Explorer again.
Filters
The Project Explorer uses Filters to determine what types of resources must be displayed. In other words, applying a Filter makes the corresponding resources disappear from the Project Explorer.
To access Filters, choose Customize View... from the View Menu:
The following dialog is displayed:
FILTER | DESCRIPTION |
---|---|
Internal resources generated by RT-LAB | Hides internal files such as .llm, .llp... |
Non RT-LAB Projects | Shows RT-LAB projects only. |
Projects top-level resources | Hides top-level resources and displays them in the File system container. |
Resources | Hides non RT-LAB resources from RT-LAB projects. |
Target | Shows only Targets that match user settings. |
Toolbar
The Toolbar of the Project Explorer contains the following elements:
From top to bottom: Collapse All
|
Collapse All | This command collapses the tree expansion state of all resources in the view. |
---|---|
Link Editor | This command toggles whether the Project Explorer view selection is linked to the active editor. When this option is selected, changing the active editor will automatically update the Project Explorer selection to the resource being edited. |
Filter Resources | This command toggles whether the Resources filter is applied or not. When this filter is enabled, the files and the folders that are part of an RT-LAB project are hidden from the Project Explorer, as shown. Note that some resources may remain hidden if other filters are active, such as the Internal files filter. |
Filter Targets | This command toggles whether the Target filter is applied or not and allows the user to configure this filter. In this example, only the Targets that run OPAL-RTLinux (x86-based) and whose IP address starts with 192.168.0. will be displayed in the Project Explorer. |
View Menu | Displays a menu for managing Working sets and Filters. |
Context menu | A Context Menu is displayed whenever a right-click is performed on the Project Explorer. The content of this menu depends on what element is selected and what Capabilities preference page are enabled. |
Here are the menu entries that are common for files, folders, projects and some other resources:
New | Creates new resources by opening the corresponding wizard. Note that before you can create a new file, you must create a project in which to store the file. |
---|---|
Copy (Ctrl+C) | Places a copy of the selection on the clipboard. |
Paste (Ctrl+V) | Places the text or object on the clipboard at the current cursor location in the currently active view or editor. |
Delete (DEL) | Removes the current selection. |
Rename (F2) | Changes the name of the currently selected resource. |
Import | Launches the Import wizard, to add resources to the Workbench. |
Export | Launches the Export wizard, to export resources from the Workbench. |
Refresh (F5) | Refreshes the resource with the contents in the file system. |
Properties | Opens the Properties dialog for the currently selected resource. |
File | Menu entries for file resources |
Open | Opens the file in its associated editor. |
Open With | Opens the file with the specified editor. |
Close | Closes the active editor. You are prompted to save changes before the file closes. |
Project | Menu entries for project resources |
Close Project | Closes this project. See Organizing resources. |
Close Unrelated Projects | Closes all other projects not related to this project. |
RT-LAB Project | Menu entries for RT-LAB project resources |
Add | Opens the Add Model wizard to add an existing model to this RT-LAB project. |
Clean Project info | Available when the project is in Active & not responding state (see Model and project states). Clears execution information about models that are unreachable (for example, when a target has been shut down). This allows the project to be opened again. |
Simulation | Provides access to simulation commands such as Load, Execute, Reset... See Simulation menu. These commands are applied to the entire Project, it means to all the Model objects that are part of this RT-LAB project. |
Properties | Opens the Properties View to display information about this RT-LAB project. |
Active Project | Menu entries for Active Project resources |
Add to workspace | Imports this Active Project to the workspace. This will enable interaction with this project. See Active Projects |
Clean Project info | Available when the project is in Active & not responding state (see Model and project states). Clears execution information about models that are unreachable (for example, when a target has been shut down). This allows the project to be opened again. |
Model Folder | Menu entries for Model Folder resources |
New | Opens the New RT-LAB model wizard to create a new Model. |
Add | Opens the Add Model wizard to add an existing model. |
Simulation | Provides access to simulation commands such as Load, Execute, Reset... See Simulation menu. These commands will be applied to all children Models. |
Model | Menu entries for Model objects |
New | Opens the New RT-LAB model wizard to create a new Model. |
Add | Opens the Add Model wizard to add an existing model to the parent project. |
Open | Open the editor associated with this Model |
Edit | Edit this Model with MATLAB/Simulink. |
Edit With... | Edit this Model with the specified version of MATLAB/Simulink. Note that the selected version will become the default MATLAB version for the entire workbench. See MATLAB preference page to edit this setting. |
Simulation | Provides access to simulation commands such as Load, Execute, Reset... |
Properties | Opens the Properties View to display information about this Model. |
Model file | In addition to file-related menu entries, here are the menu entries for Model file |
Add to Project (only in RT-LAB projects) | Add this model file to its parent RT-LAB project. This creates an associated Model object. If this model file has already been added to this RT-LAB project, the menu is grayed and disabled. Note that this action is directly executed, without opening the Add Model wizard. This action may also be done using Drag and Drop. |
Subsystem | Menu entries for Real-Time Subsystems |
Simulation | Provides access to simulation commands such as Load, Execute, Reset... See Simulation menu. These commands will apply to the parent Model. |
Properties | Opens the Properties View to display information about this Subsystem. |
Console | Menu entries for Console Subsystems |
Edit (Simulink models only) | Opens this Console for edition in MATLAB/Simulink. |
Target Folder | Menu entries for Target Folder |
New | New Target: Opens the New Target wizard. |
Discover Targets | Performs a target detection over the network and opens the Detected Targets Wizard. |
Target | Menu entries for Target (Note that some entries may not be available depending on the current platform of the selected Target) |
New Target | Opens the New Target wizard. |
Install RT-LAB | Automatically installs (or re-installs) the current version of RT-LAB on this Target. |
Patch... | Opens a dialog to select a Patch file to be sent and installed on this Target. |
License Request | Opens the License Request Wizard. |
Install | Selects a license file to activate this Target. |
Execute Shutdown | Shutdown this Target. A confirmation dialog is displayed first. |
Reboot | Reboot this Target. A dialog is displayed first to select the Operating System to be started. |
Remove Embedded Mode | If an Embedding Simulation is running, this prevents it from starting at the next Target power up. |
Python script | Opens a dialog to select a Python script. This script may be located in the workspace, on the local file system or on the Target. The selected script is then executed on the Target and output is displayed in the Target Console: |
Flash bitstream | Opens the Flash bitstream wizard dialog. |
Command... | Opens a simple dialog to enter a command. This command is then executed on this Target and results are displayed in the Target Console. |
Clean shared memory | Cleans the shared memory on this Target. |
Clean core dumps | Cleans the core dumps on this Target. |
Tools | |
Get I/O Infos | Displays information about Target’s I/O cards in the Target Console. |
Diagnostic | Displays a detailed diagnostic in the Target Console. |
Telnet: | Opens the Terminal View to open a Telnet connection to this Target. |
Set As Development Node | The selected Target will become the development node for its current platform. By default, the compilation of any Model running on this platform will be done on this Target. This setting may also be changed in the RT-LAB preference page. |
Properties | Opens the Properties View to display information about this Target. |
Embedded Simulation (any item) | |
Connect | Opens the Connect to Embedded Simulation Wizard to reconnect a project to this Embedding Simulation. |
Drag and Drop | Using Drag and Drop functionality is a fast and easy way to accomplish some usual actions. |
The following table provides a description of possible actions depending on what resource is dragged on what destination.
SOURCE | DESTINATION | ACTION |
---|---|---|
File | Folder | Move this file to the destination folder. |
File or folder | Project | Move this file or folder to the destination project. |
Model or model file | RT-LAB project or | Add the model file to the destination project and create a |
Model | Target | Assign all the subsystems of this model to this Target. |
Model or model file | Editors area | Open Editor to edit properties of this model. |
Model or model file | MATLAB View | Open model in Simulink. |
Subsystem | Target | Assign Subsystem to Target. |
Subsystem | Editors area | Open an Editor to edit the properties of the parent model. |
Subsystem | MATLAB View | Open the parent model in Simulink. |
Console | MATLAB View | Open Console in Simulink. |
Target | Subsystem | Assign this Subsystem to this Target. |
Target | Model | Assign all the subsystems of this model to this Target. |
Target | Target folder | Hold <Ctrl> key to copy this Target. |
Python script (*.py) | Target | Run this script on the destination Target. Results are displayed in the Target Console. |
Bitstream (*.bin) | Target | Opens the Flash bitstream wizard dialog to flash a board with this bitstream. |
Compilation View
The Compilation View displays the compilation output generated while building a model with RT-LAB. The result gives important information about the model’s compilation.
Note: The Compilation View highlights errors and warnings with red and orange colors respectively. Indeed, a model that is not properly built is not executable on the target nodes.
To start the compilation of a model, it is possible to click on the Build button in the Overview tab or by right-clicking on the model and selecting Build from the Simulation menu.
The Compilation View appears in a tabbed notebook:
The Compilation View has three important elements: selected model name, compilation output and a toolbar.
The name of the selected model is displayed at the top left of the Compilation View. This information is available only if a model is selected in the Project Explorer view. The name of the model in the above figure is: rtdemo2
By default, the Compilation View is included in the Edition perspective. To add it to the current perspective, click Window > Show view > Other... > RT-LAB > Compilation
Compilation Output
Starting compilation information: | |
---|---|
Start time | Timestamp of when the compilation has started |
RT-LAB version | Current RT-LAB GUI version |
Model | Current path of the model on the host computer |
Host platform | Name of the current host platform |
Target platform | Name of the current target platform |
Current MATLAB version | Current version of MATLAB used to build the model |
Model MATLAB version | Initial version of MATLAB used to create the current model |
Model preparation and separation | |
Successful state | Shows if the model preparation and separation has been completed successfully |
C code generation information | Displays the output of the Real-Time Workshop C code generation for each subsystem and prints the specific commands that are invoked on the target OS. |
Database information | Displays the database output for parameters and signals. |
Copying the generated C code | Outputs the destination directories and shows which files are transferred from host to target via FTP protocol. |
Building master and slave subsystems | Displays, for each real-time subsystems, the results of the compilation and the linking of the C code into an executable file. |
Transferring the built model | Outputs which files are retrieved from target to host via FTP protocol. |
Completion information |
The compilation output also displays the warnings and errors that occurred during the build process. Errors report problems serious enough to stop the compilation process while warnings report other unusual conditions that may lead to further problems. Warnings will not stop the compilation process |
Toolbar
ICON | DESCRIPTION |
---|---|
From top to bottom: Save As
|
View Menu
The Compilation View provides menu items that allow you to activate the Auto-scrolling and Word wrap options for the compilation output.
Auto-scrolling | This menu item enables/disables the automatic scrolling of the window when text is added. When enabled and text added, the view automatically goes to the bottom of the window where the latest text is. |
---|---|
Word wrap | This menu item enables/disables the wrapping of the text to the window size. It allows to displaying a text on a new line when the line is full, such that each line fits in the viewable window. |
Display View
The Display View provides information about the operations that are performed on the model during its life cycle. From the output, you can identify in which state the model is: not loaded, running, paused or reset.
The Display View appears in a tabbed notebook:
The Display View has three important elements: selected (model/subsystem) names, display output and toolbar.
The name of the selected (model/subsystem) is shown at the top left of the Display View. This information is available only if a subsystem is selected in the Project Explorer view. To see all subsystems, you need to expand the model tree and select the subsystem items. Subsystem name
starts with sm for master or ss for slave.
The name of the (model/subsystem) in the above figure is:
rtdemo2 / sm_controller.
By default, when selecting a model, the view will show information related to the master subsystem.
The subsystem with the name that starts with sc is the console subsystem. The console subsystem is running in asynchronous mode and usually contains controls and displays to drive/monitor the simulation.
By default, the Display View is included in the Edition perspective. To add it to the current perspective, click Window > Show view > Other... > RT-LAB > Display
Display output
Each model presents one display output for each real-time subsystems. This section resumes the information outputs, available for each real-time subsystems, when executing the basic operations on a model.
Note: The display output highlights errors and warnings with red and orange colors respectively.
Loading a Model
When loading a model, real-time executables are loaded on the target nodes. For each subsystem, the Display View is updated during this operation.
For the master and slave subsystems includes:
- Files transferred to the target nodes
- Name of the executable
- Number of active CPUs on the computer
- Library used by RT-LAB
- RT-LAB version and build tag
- Monitoring state
- Connection state with the host
- CPU speed of the target nodes
- Subsystem step size
- Real-Time simulation mode
- Snapshot status
Executing a Model
When executing a model, the simulation starts on the target nodes. For each subsystem, the Display View is updated during this operation.
Display information for the master and slave subsystem:
- Synchronized step
- Timestamp of when the model has been started
Pausing a Model
When pausing a model, the simulation of the model is paused on the target nodes and waits until a subsequent execution is performed. For each subsystem, the Display View is updated during this operation.
Display information for the master and slave subsystem:
- Number of overruns detected during simulation
- Timestamp of when the model has been paused
Resetting a Model
When resetting a model, the simulation of the model is stoped. For each subsystem, the Display View is updated during this operation.
Display information for the master and slave subsystem:
- Number of overruns detected during simulation
- Timestamp of when the model has been reset
- File transfer of the generated result files to the command station
Adjusting a Model During Simulation
When adjusting a model during simulation, the display view is updated and indicates the changes that occurred on the model. For example, when modifying some parameter values, the display view indicates that some parameters have been updated.
The display provides other useful information when actions are performed on the simulation or when changes occur in the model.
Toolbar
The toolbar in the Display View contains the following buttons:
ICON | DESCRIPTION |
---|---|
From top to bottom: Save As
Vertical
|
View Menu
The Display View provides menu items that allow you to activate the Auto-scrolling and Word wrap options for the display output.
Auto-scrolling
This menu item enables/disables the automatic scrolling of the window when text is added. When enabled and text added, the view automatically goes to the bottom of the window where the latest text is.
Word Wrap
This menu item enables/disables the wrapping of the text to the window size. It allows to displaying a text on a new line when the line is full, such that each line fits in the viewable window.
Variable Viewer
The Variable Viewer displays information about any selected variable in your model. It also lets you edit model variables. A variable can be a signal input, parameter or any MATLAB variable in your model. The Variable Viewer appears in a tabbed notebook.
By default, the Variable Viewer is included in the Edition perspective. To add it to the current perspective, click Window > Show view > Other... > RT-LAB > Variable Viewer.
The Variable Viewer view can also be obtained for a variable, by expanding the model in the Project Explorer, selecting a variable and double-clicking on it. A variable can also be displayed by expanding the project explorer tree, right-clicking on the variable and selecting the tab Show-In.
The Variable Viewer supports multiple views. A current view can be pinned to the tab in order to allows the display and /or the edition of another variable in others views.
Editing Values
Variable Viewer is useful only if a model is loaded and information is available if a variable is selected. The name of the selected variable is showed at top left of the Variable Viewer. Variable Viewer offers three possibilities: Apply Changes, Apply Changes immediately and Discard
Changes. These buttons allow to edit or discard changes from a variable.
In auto-apply mode (the default mode), triggered by Apply changes immediately toggle button any change in the value of variables is automatically taken into account when enter keyboard is pressed. In non-auto-apply mode, (the Apply changes immediately button is unchecked), a value can be edited without being sent to the model. Once edited the value can be applied or discarded and changes canceled. An asterisk appears after a value when it has been edited but the changes have not yet been applied.
The Apply Changes button allows you to confirm the changes. Once the change is accepted, the asterisk disappears. The Discard Changes allows you to return to the original value. Note that this change must be made before any further changes are accepted Display output highlights data format error with red color.
Toolbar
The toolbar in the Variable Viewer contains the following buttons:
ICON | DESCRIPTION |
---|---|
From top to bottom: Pin view
Creates a new Variable Viewer that will be stacked in the tabbed notebook at the rightmost position. This command can be useful when you want to pin views on different variables or if you want to compare displays.
Allows the changes for any selected variable to be applied immediately just after typing the edited value and clicking enter, or after the mouse loose focus. Changes are propagated to certain views like Properties or Variable Table.
When in non-auto apply mode changes are not taken into account immediately. Edited changes can be discarded with the discard button |
Properties View
The properties view displays property names and values for a selected item from the Project Explorer. The available properties are different depending on if the selected item is a project, a model, a target, or a subsystem.
When multiple items are selected, the common properties for all items are shown and the view allows the user to change the values of all items at the same time. Note however that the properties view shows the property values of the first selected item.
The following section describes the properties for each type of selected item.
Project
When a project is selected in the Project Explorer view, the properties view displays the project’s properties.
description | User’s description set at the project’s creation. |
---|---|
derived | Indicates if the project is a derived resource or not. A derived resource is a resource that is not original data and can be recreated from its source file. |
editable | Indicates if the project is Write protected or not. |
last modified | Date of the last modification of the model. |
linked | Indicates if the project is a linked resource or not. A linked file or directory is a file that is stored in locations in the file system outside of the project’s location. |
location | Directory where the project is located on the host target. |
name | Name of the project. |
path | The relative path of the project. |
Model
When a model is selected in the Project Explorer view, the properties view displays the model’s properties.
These properties are grouped into six major categories:
- Execution
- Simulation tools
- Diagnostic
- Development
- Hardware
- Info
Here are the descriptions of the model properties:
Execution/environment variables/variables | List of environment variables. User environment variables are used to enable some settings for the target simulation without having to rebuild the model. Most of these settings are used for debugging purposes, or as workarounds for specific simulation situations. |
---|---|
Execution/files/extra files | List of extra files. This list specifies one or more files to be copied and transferred to (or from) the target environment. |
Execution/files/file retrieval build tree | Specifies if intermediate folders are generated or not in the retrieved directory. |
Execution/ files/file retrieval enabled | When this option is enabled, RT-LAB retrieves files generated by the model simulation on the target nodes and transfers them to the host computer. |
Execution/files/file retrieval root directory | Directory where the files retrieved by RT-LAB after the model execution is copied. |
Execution/performance/action after N overruns | Performs the action specified in the Action to perform on overruns field when the number of overruns detected by RT-LAB reaches this number. (Only applies when Action to perform on overruns is set to Reset or Pause.) |
Execution/performance/action on overruns | Performs the action specified in the Action to perform on overruns field when the number of overruns detected by RT-LAB reaches this number. |
Here are the available types: | |
Continue | No action is performed; Number of overruns will simply be displayed during the next pause/reset of the model. |
Reset | A reset of the model is performed when the number of overruns reaches the value of the Perform action after N overruns field. |
Pause | A pause of the model is executed when the number of overruns reaches the value of the Perform action after N overruns field. |
Execution/performance/detect overruns | (Only applies to models ran in hardware/software synchronized modes.) When this parameter is not checked, RT-LAB does not detect overruns. When this parameter is checked, RT-LAB detects overruns and performs the action specified in the Action to perform on the overruns field. This property has no effect in simulation mode. |
Execution/performance/number of steps without overruns | Prevents RT-LAB to detect overruns during the first steps of simulation. |
Execution/real-time/pause time | This value (in seconds) specifies when the model will pause. If the value is Infinity, the model will execute until a reset is done except if a stop time is specified. |
Execution/real-time/communication link | Sets the target cluster’s communication medium. Here are the available choices for each target platform.
|
Execution/real-time/simulation mode | Enables the user to define how the model’s simulation can be executed on an OPAL-RTLinux (x86-based) or Windows system. |
Simulation | In this mode, the model is not synchronized; the model starts a new computation step as soon as the previous one is completed (the model runs as fast as possible). |
Simulation with low priority | This simulation mode can be used to run a simulation in the background while working with other applications on the same computer. Note: Note that the Simulation with low priority mode is only available when working with a Windows target. |
Software Synchronized | In this mode, real-time synchronization of the entire simulation is achieved by the OS, using the CPU clock as a reference. Depending on the resolution available on the OS, some sampling times may not be obtained using this mode. |
Hardware Synchronized | In this mode, an I/O board clock is used to synchronize the entire simulation. |
Execution/real-time/stop time | This value (in seconds) specifies when the model will stop. If the value is Infinity, the model executes forever. You don’t need to recompile the model to apply a new value. |
Execution/real-time/target platform | Allows the user to choose the target platform on which to run the simulation (OPAL-RTLinux (x86-based) or Windows system). |
Execution/real-time/time factor | This value, when multiplied by the model’s basic calculation step (or fixed step size), supplies the final calculation step for the system. The time factor can only be changed when the simulation execution is paused and is only available in Synchronized (hardware/software) mode. |
Note: This parameter enables you to change the I/O acquisition speed.
| |
Simulation tools/Console/handle console | Enables the console to be automatically opened and closed when a model is Loaded or Reset. The console starts automatically at the first model’s execution. |
Simulation tools/MATLAB/command after opening model | MATLAB command to execute after opening the model. For example, MyInitFile.m, where MyInitFile includes commands that initialize model variables. |
Simulation tools/MATLAB/command before opening model | MATLAB command to execute before opening the model. For example. MyInitFile.m, where MyInitFile includes commands that initialize model variables. |
Simulation tools/MATLAB/step size | Displays the basic calculation step of the model as specified in the Simulation > Configuration Parameters > Solver menu of the Simulink model file. |
Simulation tools/RTW/user TLC file | Specifies which TLC file to use during the compilation. When Automatic is selected, the TLC file corresponding to MATLAB version is automatically selected. This option is available for SIMULINK models only. |
Simulation tools/RTW/user TMF file | Specifies which template makefile to use during the compilation. When Automatic is selected, the template makefile corresponding to MATLAB version is automatically selected. This option is available for SIMULINK models only. |
Diagnostic/debugging/compile in debug | When this option is enabled, the compiler's optimization options are removed and replaced by debug options during model compilation. This option is useful when debugging a model. |
Diagnostic/debugging/enable watchdog | Enables or disables the Watchdog functionality. The Watchdog ensures that all nodes are running normally.
|
Diagnostic/debugging/extended timeout | All timeouts are extended when this option is enabled. It is typically used when debugging the model. |
Diagnostic/debugging/watchdog timeout | Enables or disables the Watchdog functionality. The Watchdog ensures all nodes are running normally.
|
Diagnostic/monitoring/enable monitoring | Enables or disables the monitoring during the execution of the model. |
Diagnostic/monitoring/message precision factor | (For advanced users only) Defines the precision of the timer reporting the time required to perform one calculation step in microseconds. The default value is 0 (no printout).
Warning: This option may affect real-time simulation performance. |
Diagnostic/monitoring/target display information | Represents the amount of information displayed in the display window during load and execution. Setting the value from MINIMAL to EXHAUSTIVE allows the user to retrieve more information about communication and I/Os initialization for example. This can be used to debug unexpected model behavior. Note: Note that Exhaustive mode must only be used used for debugging purposes as it can affect real time performances. |
Development/Compiler/user compilation command | User command to be called on the target during the compilation process. |
Development/Compiler/user compilation options | Options used by the target compiler during the compilation process. Refer to the target compiler documentation for specific information on the possible compiler options (e.g. -xxx). |
Development/Compiler/user include path | Target path(s) where user include files are found. Used to search for include files required to compile user-written code, when the include files do not reside in already-searched paths. |
Development/Compiler/user source files | Names of source files to be compiled in addition to the code generated by RTW. Used to incorporate user-written code into the model executable (e.g. file1.c file2.c file3.c). |
Development/Linker/user external libraries | Names of user-specified libraries to be used when incorporating user-written code, in addition to the standard system libraries (MATLAB and RT-LAB). |
Development/Linker/user library path | Target path(s) where user libraries are found. Used to search for libraries other than the MATLAB and RT-LAB libraries when incorporating user-written code. |
Development/Linker/user linker options | Options used by the target linker during the linkage process. Refer to the target linker documentation for specific information on the possible linker options (e.g. -xxx). |
Hardware/Monitoring/Abort compilation when bitstream missing | When enabled, if some bitstreams required by a model are not present in the model directory, RT-LAB will stop the compilation and generate an error. RT-LAB will generate only a warning if this setting is disabled. |
Hardware/Monitoring/reset model on IOs missing | When checked and model loaded, RT-LAB stops loading and generates an error, if some I/O boards required by the model are not detected on the target(s). RT-LAB generates only a warning if this setting is unchecked. Note that only a few I/O boards (mainly the Opal-RT TestDrive boards) support this option. Most I/O blocks force a reset of the model if the boards are not detected at load time. |
Hardware/Performance/cacheable DMA memory access | When checked, RT-LAB will enable the cache of the memory areas used by DMA buffers yielding to faster transfer rates and increased model performances. However, this option should be used with caution since it can affect proper reading of I/O data using DMA buffers. |
Info/derived | Indicates if the model is a derived resource or not. (a derived resource is a resource that is not original data and can be recreated from its source file) |
Info/editable | Indicates if the model is Write protected or not. |
Info/last modified | Date of the last modification of the model. |
Info/linked | Indicates if the model is a linked resource or not (a linked file is a file that is stored in locations in the file system outside of the project’s location). |
Info/location | Directory where the model is located on the host target. |
Info/name | Name of the model. |
Info/path | Path where the model is located on the host target. |
Info/size | Size in bytes of the model file. |
Real-time Subsystem
When a real-time subsystem, such as master and slave subsystem, is selected in the Project Explorer view, the properties view displays the subsystem’s properties.
General/name | Name of the real-time subsystem. |
---|---|
Assignation/target | Name of the target where the subsystem will be executed. |
Assignation/CPU | (For advanced users only). CPU cores allocated (and optionally specified) for the subsystem and its worker threads. (available only on Linux targets) |
Assignation/XHP mode | If checked, the subsystem will be executed in eXtreme High Performance (XHP) mode (available only on Linux targets). |
Console Subsystem
When a console subsystem is selected in the Project Explorer view, the properties view displays the console’s properties.
General/name: Name of the console subsystem.
Target
When a target is selected in the Project Explorer view, the properties view displays the target’s properties such as the IP address, the detected operating system and the number of CPUs.
IP address | IP address of the target |
---|---|
name | User name set at the target creation |
detected platform | Operating system detected Windows, OPAL-RTLinux (x86-based) |
version | Version of the operating system detected |
architecture | Architecture type of the target (for instance x86pc, x86, x64) |
CPU speed | Speed in MHz of the target CPU |
disk space | Free disk space in MO of the hard disk |
number of CPUs | number of CPUs of the target |
Contextual Menu
The properties view provides a contextual menu when right-clicking on properties. The following figures shows the contextual menu.
Copy | Used to copy the Property and the current value of the selected item. The user can then paste the selection in external application. |
---|---|
Restore Default Value | Used to restore the default value defined in the preference pages. |
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