Views

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, 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 Windows.

 

The Target is up and runs OPAL-RTLinux (x86-based).


The Target is up, runs OPAL-RTLinux (x86-based), and is the development node for the OPAL-RTLinux (x86-based) platform.


The Target is up, runs OPAL-RTLinux (x86-based), and is the development node for several platforms.

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:

Linking a folder
Linking a 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:

Standard resource hierarchy
Standard resource 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

  • As said before, except in a few cases, project and model files should be created accordingly to the default hierarchy. To add existing projects or Models to the RT-LAB workbench, prefer using the Existing RT-LAB model import wizard that makes a copy of the files to the RT-LAB workspace.

  • To avoid conflicts between files, do not put several model files in the same folder.

  • It is not recommended to use more than ten Models within the same project.

  • As Models objects provide a lot of functionalities, they are quite resource-consuming.

  • Using many Models at the same time can lead to a significant slowdown of the system or to some unexpected behaviors.

  • If a Model is temporarily not used, remove it from its project (without deleting its model file), then re-add it when necessary. If you manipulate many Models, for example, if you have many versions of a Model, consider using one project per Model instead of adding all Models to the same project.

  • For the same reasons, unused projects should be closed to improve global performances.

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:

Model state: running


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

Project 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

Project state: 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

Project state: Active but 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:

View menu: Show 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:

Active Project
Active Project

 


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:

Imported Active Project
Imported Active 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:

Working Set Menu
Working Set 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:

Top Level Element menu
Top Level Element menu

If Working Sets is selected, the selected Working sets appear in the Project Explorer as containers:

Working Set display
Working Set display

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:

Customize View menu
Customize View menu


The following dialog is displayed:

Customize View (Filters) dialog
Customize View (Filters) dialog

 

FILTER

DESCRIPTION

FILTER

DESCRIPTION

Internal resources generated by RT-LAB

Hides internal files such as .llm, .llp...
Note: This has no effect if the Resources filter is active.

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.
Note: A shortcut is provided on the toolbar for this filter.

Target

Shows only Targets that match user settings.
Note: Settings are editable through the ToolBar.

Toolbar


The Toolbar of the Project Explorer contains the following elements:

From top to bottom:

Collapse All


Link Editor


Filter Resources


Filter Targets


View Menu

 

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.
When this filter is disabled, files and folders are visible:

Project Explorer with Resources
Project Explorer with Resources

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.
Clicking on this button displays the following dialog:

Target Filter dialog
Target Filter dialog

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.