Home
RT-LAB Version 10.4 User Guide - Opal-RT
Contents
1. 235 Monitoring View 241 T rminal View hi Du Eee Cd ia are Ta 247 Hel piViCW sis ea ed aa Fa etes ee ee a 253 Search VIEW sat eh ees A area tania dd we St ete 257 Workbench Menus 0 eki u a nenn 277 EIER MENU SERRES a Piers a ae dde ta a 279 Edit men raras a A ae whe te RES aie dar ak 281 Search Mene ia a a ee moe as 283 Navigate menu dak ee ea a aa a a an 285 Tools MENT 42 00 ci rd ee deln 287 Simulation MENU aaa a 289 Window M nard re en ht 293 Help Menu an kee A A ce Ma Ea ao 297 TOO DANS 550 8 es a A ere ede un 299 Main Toolbar Hr Li RS Son Br tt 301 Wizard Si g ut gen AR aia ap e A a ed of j 303 New RT LAB project wizard 305 New RT LAB model wizard 309 Import Wizarde deen nenir a a en en 311 Add Model wizard 313 New Target Wizard gi aaa oa ee 317 Detected Targets Wizard 321 New Resource Project wizard 325 New Folder wizard 327 New Fil Wizards 0er er due di eee ee eee 329 Existing RT LAB model import wizard 331 Export Wizard acosta ane h ane a ee are Ae HA ae aya de daa da 335 Flash bitstream wizard 1 es 337 Connect to Embedded Simulation Wizard 341 Load Parameters wizard 345 Sav
2. 407 Colors and Fonts preference page 409 Compare Patch preference page 411 Content Types preference page 413 Editors preference page 415 File Associations preference page 417 Help preferences 444444444444u 419 General preference page 421 Help Content preference page 423 Keys preference page 425 Label Decorations preference page 429 Linked Resources preference page 431 Local History preference page 433 Perspectives preference page 435 Quick Diff preference page 437 Search preference page 439 Spelling preference page 441 Startup and Shutdown preference page 443 Text Editors preference page 445 Web Browser preference page 447 Workspace preference page 449 Cheat Sheets 53125 303 aie aa te Wand oil a eae eal as 451 Launching a cheat sheet 451 Starting the cheat sheet 451 Restarting the cheat sheet 452 Progressing through the steps 452 Getting help information for tasks
3. sync yes no The Synchronicity QoS state yes no The Writer Access Priority QoS multiPub yes no The Writer Access Exclusivity QoS The Column List is a list of named columns that RT LAB Orchestra uses to map the data in the CSV file to the various DDF elements The Column List should contain the following columns domain frameworkTocClient clientToFramework type length default description The columns can be provided in any order but if the CSV file contains columns in addition to the Column List then the entire Column List has to come first in the file The domain names under the domain column must be defined in the domain descriptor Note that all data in the CSV header is case sensitive The CSV body The CSV body contains a series of rows one per data item The content of each column of the data row is read and parsed based on the corresponding column of the Column List Each domain referred to in the CSV body has to appear in the Domain Descriptor Data items for a given domain do not have to be contiguous if a data row does not contain a domain name the corresponding data item is assumed to belong to the domain that was last defined in the body Creating a CSV file RTLAB UG 104 00 DDF Configurator You can create a CSV file by editing a text file and saving it with the csv extension or by editing an Excel spreadsheet and saving it with the file type set to C
4. 452 SKIPPING a St p ca a ee A re keine 452 Redoing a step se faa ar ara ara rn AAA oe 452 Closing the cheat sheet 452 M taController 2284 oui ana nn dues r der ace ais Gale 453 Helpe aa e Tam Ne Near ee Cie rot et 455 CHAPTER 4 TASKS Building models 45 24 d s zen a ea de ur mo die aie dal mire Bern 459 Building a simple model for RT LAB 459 Building a distributed Model for RT LAB 460 Executing models sick eee ee ere ae a A et a 467 Target plat Mic emu aa Ro don aha 467 Simulation mode 467 Communication type 469 ExXecuting SEEPS u we a er eue Goa ara a ane a a 470 AdditiGnal files aus caro arta anna 471 User script files cc hae ua a RADA o 471 DEBUGGING a santa ic ea ae 472 Acquiring and Viewing Data 477 Acquisition Grops ete et ee Pata rane gd 477 Understanding Data Reception 478 Monitoring Models 42448248 ic ea we a ad ea eG ee de 483 Monitoring Overview 483 Monitoring Architecture and Concepts 483 Enabling Monitoring 484 Using the Monitoring View 484 Using the OpMonitor Block 486 Measuring a Model s Subsystem Calculation Time 486
5. Fri Nov 20 17 14 27 2009 ein Figure 100 Load parameters dialog When you select a valid file the wizard will compare the structural content of the previous model i e the one that was used to save the file to the content of the current model If it detects structural differences a warning will be displayed indicating that models are different and that some parameters may have been added removed renamed or moved since the writing of the parameter file The previous and current model information will also be shown at the bottom of the page allowing you to compare the history and revision of each model See Solving Structural Differences page for more help When no differences are detected or all structural differences are resolved the last page of this wizard will help you to view compare and edit the loaded value See Viewing Comparing and Editing Values page for more help Here is the description of the fields of the first page RTLAB UG 104 00 345 Load Parameters wizard Filename File path and name including param extension where the file is located Use the dropdown arrow to select a file from the history or the browse button to select a file from the file system Comment Comment stored with your parameters Created by Parameter file author Created on Parameter file creation date Previous Model Information History information of the model that was used to generate and save the parameter file Useful when
6. D PAL RT RT LAB Version 10 4 User Guide RTLAB UG 104 00 Y OPAL RT 1751 Richardson suite 2525 Montr al QC Canada H3K 1G6 Phone 1 514 935 2323 Fax 1 514 935 4994 www opal rt com 2007 Opal RT Technologies Inc All rights reserved for all countries Information in this document is subject to change without notice and does not represent a commitment on the part of OPAL RT Technologies The software and associated files described in this document are furnished under a license agreement and can only be used or copied in accordance with the terms of the agreement No part of this document may be reproduced or transmitted in any form or by any means electronic or mechanical including photocopying recording or information and retrieval systems for any purpose other than the purchaser s personal use without express written permission of OPAL RT Technologies Incorporated Documents and information relating to or associated with OPAL RT products business or activities including but not limited to financial information data or statements trade secrets product research and development existing and future product designs and performance specifications marketing plans or techniques client lists computer programs processes and know how that have been clearly identified and properly marked by OPAL RT as proprietary information trade secrets or company confidential information The information must have
7. Execution real time use restricted mode at For advanced user only Defines the Clock Period in microseconds specified by the user for the Use Restricted mode option Only available when the Use Restricted mode option is enabled Simulation tools Console handle console Enables the console to be automatically opened and closed when a model is Loaded or Resetted The console starts automatically at the first model s execution Simulation tools Matlab and Matrixx command after opening model Matlab Xmath command to execute after opening the model For example MyInitFile m where MyInitFile includes commands that initialize model variables Simulation tools Matlab and Matrixx command before opening model Matlab Xmath command to execute before opening the model For example MylnitFile m where MylnitFile includes commands that initialize model variables Simulation tools Matlab and Matrixx step size Displays the basic calculation step of the model as specified in the Simulation gt Configuration Parameters gt Solver menu of the Simulink model file or in the top level SystemBuild model s Sample Period field RTLAB UG 104 00 Properties View 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 T
8. 7 Figure 44 Edit Working Set dialog An easier way of adding elements to a working set is to open it in a Variables Table and to drag and drop variables from the Project Explorer the Search View or another Variables Table View You can also drag a block a subsystem or even a model to add all the contained variables to the working set If the Variables Table displays several working sets the variables will be added to each of them RTLAB UG 104 00 229 Variables Table View It is also possible to right click on a variable or a block or a combination of them in the Project Explorer or the Search View and then click on Add to Working Sets Project Explorer 23 ETS 30 de Targets a E MyProject a Models 4 a matrixTest Running HE Matlab Variables y sc_user_interface 4 2 sm_ master IT Constant I ConstantVar II CVector LT Matric II Matri Delete Delete II Mem Rename F II OpCe IT RVect Refresh FS OI 20p Add to Working Set D ss slawe Figure 45 Context menu Add to Working Set This will open the Select Working Set dialog described above To remove a variable from a working set right click on it in the Variables Table and click on Remove or simply press the Delete key Lost elements If a variable is not available it will be displayed with a red cross icon as below EJ Variables Table 52 Ge Demo Name Path Value Data T Complex Size RTW Access Value MyProject matrixTe
9. AE AA 4 Search 23 lord Compilation myg signal1 13 matches in workspace Bai signali MyProject j rtdemo2 T signali MyProject rtdemo2 j sm_controller Gair T signali MyProject j rtdemo2 j ss_plant Gain Show In T signali MyProject rtdemo2 sm_controller Opt signali MyProject rtdemo2 sm_controller f Acti LY Next Match T signali MyProject rtdemo2 j ss_plant Sensor ri T Previous Match T signali MyProject j rtdemo2 j ss_plant Integrati T signali MyProject rtdemo2 sm_controller Sur sm_controller Der a View Edit variable EB Copy Ctrl C T signali MyProject redemo2 sm_controller zzzt M Remove Selected Matches Delete T signali MyProject rtdemo2 sm_controller Gair Xe Remove All Matches T signali MyProject j rtdemo2 j ss_plant zzzOpCo signali MyProject rtdemo2 sm_controller Gair signali MyProject rtdemo2 sm_controller Gair gt Search Again FS Assign Working Set Properties Alt Enter Figure 64 Contextual Menu MENU ITEM DESCRIPTION This command is used to open the variable viewer for the View Edit variable selected object This command is used to show the selected object in a view Show In w only if applicable This command highlights the next match of the search Next Match dd expression in the search view This command highlights the previous match of the sea
10. Acquisition and transmission parameters HE Number of i Decimation factor 1 E enla pas 200 Signals signal Max number of en ses samples per signal 2500 C 200000 25 milliseconds Console blocks on group Group control Output value when no data available EE 7 Block e Figure 49 Probe Control Following is a description of the parameters of the probe control Connect Connects to a simulation model which acquisition parameters are to be changed It displays the Active Models panel if there are simulations running to enable you to select the model from a list of running models Disconnect Disconnects from the model we are currently connected to Group 4 These tabs enable you to select which acquisition group parameters are to be changed RTLAB UG 104 00 235 Probe Control Panel More information Opens the group infos panel on which additional information about the acquisition group is displayed Data acquisition triggering Sets dynamically a trigger on the acquisition group Data will be acquired only when the specified signal is triggered The trigger is defined using the fields Trig signal name Trig by value Offset Trig by signal and Condition If a block OpTrigger is present in the model when activating the dynamic acquisition the triggering will be set to the value of parameters provided via the Probe Control When deactivating the dynamic triggering the block OpTrigger will regain the triggering cont
11. Libraries Library Path lo Compiler Library Paths Library path Target path s where user libraries can be found Used to search for libraries other than the MATLAB MATRIXX and RT LAB libraries when incorporating user written code Add Adds a library path to the list Edit Edits the selected library path Delete Removes the selected library path from the list Move up Changes the order of the libraries path moves up the selected library path Move down Changes the order of the libraries path moves down the selected library path Compiler RTLAB UG 104 00 141 Execution Page Sources Includes Libraries Library Path li Compiler Compiler Compiler command e g makefile Compiler options e g O3 Linker Linker options e g IMyLibrary Compiler Command User command to be called on the target during the compilation process Compiler 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 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 Execution Page This page contains two main sections that define execution settings for the model Real Time Properties and Performan
12. New Target wizard This wizard explains how to create a new target to a local or remote computer The new target will be added to the current list of targets in RT LAB This list is available in the Project Explorer view just above the projects o Project Explorer 3 ESDA EE H targets wa localhost gw tQNx201 Re tRedHawk178 EX rtdemot HTS rtdemo2 Figure 77 List of targets in the Project Explorer view RT LAB supports different target platforms Windows QNX Redhat and Redhawk See Target platform for more information The next sections show how to create a new target and give some details about the properties of a target By default the Project Explorer view is included in the Edition perspective To add it to the current perspective click Window gt Show view gt Other gt General gt Project Explorer How to create a new target To create a new target select the New Target menu item from the menu New of the Targets Right click on the Targets in the Project explorer view to open the contextual menu of Targets Project Explorer 3 m ESA q tQN Ro tRe HS rtdemol EX rtdemoz Refresh F5 Fj Paste Ctrl Properties Alt Enter Figure 78 New Target menu item This operation has opened the New RT LAB Target dialog Specify the name and the IP Address of the target Note Ask your network administrator for the target ip address To create a target on the local
13. e Stop recording button from the Macro Recorder toolbar e Stop recording item menu in the Tools gt Python menu or e Stop recording item menu in the Python drop down menu in the main toolbar e RT LAB will automatically open the Python editor for the newly recorded macro 492 RTLAB UG 104 00 Using Python Script and the Macro Recorder e To cancel the recording click the Cancel recording item in the Macro recorder toolbar Opening a Macro Script Follow these steps to open an existing macro script e Click Open file from the file menu and locate your file by browsing your disk or e Double click the Python script macro in the Project Explorer e Make sure that your projet s file system is visible by clicking the Filter resources button in the Project Explorer view e Expand your project in the Project Explorer view and locate the Python script in the file system e Double click the Python script macro e Drag and drop a Python script macro from the Windows Explorer to the RT LAB editor area Editing a Macro Script The macro script editor has a rich set of functionalities that let you edit your macro script easily Here is a brief description of the available features e Syntax highlighting Provide different colors and text styles to be given to dozens of different lexical sub elements of the Python syntax These include keywords comments control flow statements variables and other elements Programmers often heavily customiz
14. field However click on the Browse button next to it to select another project from the workspace If the model file is located outside of the project folder a linked resource see Other resources will be created so that the model file can be accessed from the Project Explorer ri Project Explorer 3 38 5 M dy Targets LS RT Demo j Models rtdemoz 2 5 File system gt models rtdemo2 mdl Figure 76 Add Model result linked resource Important notes Once added to a project a model can be edited like any other model For that reason example models provided by RT LAB should never be added to a project using this wizard these models must not be modified since they are used as templates when creating new projects Prefer using the New RT LAB project wizard or the Existing RT LAB model import wizard when you want to use an example model A faster way to add an existing model to a project is to use Drag and Drop Simply drag a model file from anywhere on your file system and drop it on a Models folder Hold the lt Ctrl gt key to make a copy of the model file before adding it to the Models folder Related concepts Views Perspectives 314 RTLAB UG 104 00 Related tasks Opening views Moving and docking views Related reference Project Explorer Existing RT LAB model import wizard RTLAB UG 104 00 Add Model wizard 315 Add Model wizard 316 RTLAB UG 104 00 New Target wizard
15. Compilation output The Compilation View provides the following information while compiling Starting compilation information e Start time Timestamp of when the compilation has started e RT LAB version Current RT LAB GUI version e Model Current path of the model on the host computer e Host platform Name of the current host platform e Target platform Name of the current target platform e Current Matlab version Current version of Matlab used to build the model e Model Matlab version Initial version of Matlab used to create the current model e Model preparation and separation e Successful state Shows if the model preparation and separation has been completed successfully C code generation information e 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 e Displays the database output for parameters and signals Copying the generated C code e Outputs the destination directories and shows which files are transferred from host to target via FTP protocol Building master and slave subsystems e 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 e Outputs which files are retrieved from target to host via FTP protocol Completion information e End time Timestamp of when the compilation has ended
16. Help view The Bookmarks shows topics marked as personal bookmarks Toolbar The toolbar of the Help view contains the following buttons The available buttons depends on the currently displayed page ICON DESCRIPTION Back Displays the page or the topic that was displayed immediately prior to the current display Forward Displays the page or the topic was displayed immediately after the current display Collapse All Collapses the tree expansion state of all topics on the page Show All Topics When filtering of workbench elements is enabled the buttons enables displaying topics for disabled elements Show Result Categories Switches between sorting search results by relevance and by logical containers for example books Show Result Descriptions Displays short description of each search hit when available Menu Provides menu items that allow you switching help view pages Related concepts Help 256 RTLAB UG 104 00 Search View Search View This view shows the results of a search The same view is shared for different types of searches like File Search and RT LAB Search RT LAB Search results RT LAB searches will only search for expressions in RT LAB objects specified in the RT LAB Search dialog Here is what the results of Search View look like for an RT LAB Search CARE a TE Pa 5 2 D ject s_plant Gain T signali MyProject rtdemo2 sm_controller zzz2OpCommi Receive_1 S Function T s
17. LA MatrixX root directory on Windows targets Example lusr matrixx v62 2 Automatic v ad Advanced Restore Defaults Apply The value of these parameters are used when a new model is created If you change a property from Preference page each new model will inherit from Properties defined into Preference page but the existing models will stay unchanged The Restore Defaults button enables the user to restore the defaults value of the parameters Batch file Specifies the batch file used for running Xmath for non standard MATRIXx installations This variable refers to C isi bin xmath bat by default For example if MATRIXx is installed to another directory say C Applications isi set this variable to C Applications isi bin xmath bat MatrixX root directory on POSIX targets Path used to find the MATRIXx include and source files on POSIX targets default value automatic MatrixX root directory on Windows targets sets the location of MaxtrixX on the Windows target on Windows targets default value automatic RTLAB UG 104 00 393 Matrixx preference page 394 RTLAB UG 104 00 RT LAB preference page RT LAB preference page Use the Window gt Preferences gt RT LAB gt Simulation Tools gt RT LAB dialog page to set the RT LAB preferences Here is what the RT LAB preference page looks like RT LAB or v Here are the RT LAB preferences Development targets QNX anx
18. Monitoring Overview The Monitoring is a profiler that is tightly integrated with RT LAB and runs within your simulation on the target computers It enables you to profile your simulations for performance CPU usage overruns and synchronization problems Monitoring provides a comprehensive set of features and provides an intuitive user interface to analyze the simulation behavior The monitoring features provides CPU profiling e Find out where your CPU time is going including I Os calculations and RT LAB overhead e Identify performance bottlenecks e Get detailed information on the CPU usage when overruns occur e Evaluate how much time is left in your computation step for adding calculations I O access etc Tasks profiling e Check the time spent on your user written code or your block execution in the model e Determine the tasks execution order and the concurrent execution e Scale your application by evaluating the effect of distribution e Identify and resolve deadlocks Distributed monitoring e The Monitoring give you the ability to concurrently monitor many processes running on many CPU thereby profiling a distributed simulation Monitoring Architecture and Concepts The Monitoring service is a service running on the target that records the exact time of events that occur during the target simulation All measurements are relative to the beginning of the simulation and are measured using external hardware IO clock in h
19. Pauses the execution of the selected Models or all the Models of the selected Project See Executing models Reset Ctrl Alt R Resets the selected Models or all the Models of the selected Project See Executing models Take Snapshot Ctrl Alt T gt Takes a snapshot of the selected Model using the last snapshot s name and description See Taking a Snapshot for more help on snapshot This Model must be in Paused or Running state before taking a snapshot See Executing models Take Snapshot As Opens a dialog to enter a name and a description of a snapshot RTLAB UG 104 00 289 Simulation menu _ Take Snapshot Snapshot filename snapshot Comments sample snapshot This snapshot will then be taken for the currently selected Model See Taking a Snapshot for more help on snapshot This Model must be in Paused or Running state before taking a snapshot See Executing models Restore Snapshot Ctrl Alt Y Opens a dialog to choose a previously taken snapshot Restore Snapshot Snapshot filename Comments Sample snapshot Figure 66 Restoring a Snapshot This snapshot will then be restored for the currently selected Model See Taking a Snapshot for more help on snapshot The Model must be in the Paused state before restoring a snapshot See Executing models Note that the snapshot may exist on the target directory where the model was loaded Load Parameters Op
20. Selecting the development node Before compiling your model for real time simulation you must select the target node on which your model will be compile This target node is called the development node Normally this step is perform once when configuration RT LAB for the first time To change the development node do the following e Activate the Project Explorer view e Select the target MyTarget in the Project Explorer view e To set this target as the development node use one of the following methods e From the the view s popup menu choose Set as development node or e Open the RT LAB preferences using the Window gt Preferences menu select the RT LAB gt Simulation Tools gt RT LAB preference page and then select for the desired target platform the target node you want to use as development node e A small letter will appear on the target node indicating that this target node is used a development node RTLAB UG 104 00 39 40 Selecting the development node RTLAB UG 104 00 Editing the model Editing the model Now that your model and RT LAB are configured here how to edit your model with RT LAB e Activate the Project Explorer view e Select the model MyModel in the Project Explorer view e To edit your model use one of the following methods e From the the view s popup menu choose Edit e From the menu bar select Tools gt Open MatLab drag and drop the model MyModel in MatLab command windows e Open
21. Views Perspectives Related tasks Opening views Moving and docking views Related reference Project Explorer RTLAB UG 104 00 333 Existing RT LAB model import wizard 334 RTLAB UG 104 00 Export wizard Export wizard This wizard help you export resources from the Workbench When the Export wizard first comes up you must choose what type of export to do To assist in locating a particular wizard the text field can be used to show only the wizards that match the entered Archive File If you choose this option you will export files to an archive file Select resources to export The project and resources within that project to export to an archive Select Types Dialog to select which file types to export Use this to restrict the export to only certain file types Select All Check off all resources for export Deselect All Uncheck all resources Archive File The path and name of an archive file into which the resources will be exported Type the path select a previous path from the drop down list or Browse to select a path and file name on the file system The archive file of the previous export or lt blank gt Zip file Export the file in zip format true Tar file Export the file in tar format true Compress the contents of the file Compresses the contents resources selected to be exported in the archive that is created On Overwrite existing file without warning If the specified archive alre
22. the ODE3 and the ODES solver perform 3 and 5 iterations respectively RTLAB UG 104 00 Using Python Script and the Macro Recorder Using Python Script and the Macro Recorder This chapter describes how to use Python script and the macro recorder Macro Recorder Overview The macro recorder is a utility that automates repetitive and tedious tasks done on the real time simulator It records all actions performed with RT LAB and saves them as a set of API commands in the Python native language see the Python API Reference Guide for more details on the RT LAB API The output of the macro recorder is a Python script module Once the macro is recorded RT LAB lets you modify and edit the macro script using a rich editor and then easily play it back to perform simple or complex sets of tests without needing programming skills The macro recorder is often used while changing model parameters and interacting with the behaviour of the simulation The recorded macro can be used to create sequences of manoeuvres to control the simulator and model It is also possible to manage the simulator s execution mode and configure all simulator parameters and settings Before you start to record a new macro plan the actions you want to perform on the project and simulator Errors and corrections are also recorded RT LAB stores the result in a Python script function Recording a New Macro Follow these steps to record a new macro e Select the project fr
23. 1 ss_subsystem sends to sm_subsystem computation of the gain in sm_subsystem sm_subsystem sends to ss_subsystem gt on computation of ss_subsystem and the rest of sm_subsystem RTLAB UG 104 00 465 Building a distributed Model for RT LAB Deadlock case OpComm Some Computation OpComm Some Computation sm_subsystem ss_subsystem RT LAB is deadlocked 1 sm_subsystem waits for ss_subsystem 2 ss_subsystem waits for sm_subsystem Prioritizing Data Transmission 466 In order to maximize parallel execution you must separate your model in order to exchange only priority signals state or state derived between computation subsystems SM or SS Unfortunately in some cases it is not always possible to separate this way and leave the model manageable You can convert feed through signals to priority signals by using delay blocks Careful placement of delay blocks can eliminate algebraic loops and maximize parallelism Delay blocks must be handled with care because they can alter model dynamics You must compare results before and after to make sure that the impact of the delay is acceptable When data are exchanged between SM and SS subsystem they are automatically sent at the beginning of a calculation step if possible so there is no need for additional notation to specify a priority send Users must therefore exchange state variables and or use Delay blocks for input dependent variables When data are exchang
24. Acquisition 1100 Synchronization O Operation sequence O Acquisition parameters are shown under the main toolbar by clicking on the Acquisition Parameters toggle button of the main toolbar Alternatively these parameters could be displayed by clicking on the Acquisition Parameters item of View menu Cell ma PREI Table 3 Acquisition parameters PARAMETERS DESCRIPTION Not yet available with RT LAB data source Time elapsed Start time before the acquisition started Use the Probe Control Panel s offset and re arming delay parameters instead Sampling duration sampling time length of one Time length acquisition Changing this parameter also change the duration parameter of the Probe Control Panel Not yet supported for RT LAB data source Number of Sampling Rate samples acquired by second Use the Probe Control Panel s decimation factor parameter instead Number of acquisition Numbers of acquisition that will be executed Activate or deactivate the dynamic trigger of the RT LAB Synchronization acquisition group Signals that trigger that acquisition must be selected using the Probe Control Panel Operation Sequence Not yet available with RT LAB data source RTLAB UG 104 00 529 Using ScopeView Example The following figure illustrates the behaviour of the acquisition when the following parameters are specified and trigger is enabled e Trigger and synchronisation enabled e Trigger activated b
25. Hardware Monitoring reset model on IOs missing When this option is checked and the model is loaded RT LAB will stop loading and will generate an error if some I O boards required by the model are not detected on the target s RT LAB will generate 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 this option is 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 This option is available on QNX6 only Info derived Indicates if the model is a derived resource or not a derived resource is 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 i
26. It allows to focus on steps close to overruns Related Concepts 246 Monitoring Models RTLAB UG 104 00 Terminal View Terminal View The Terminal View provides a quick access to the remote target by opening a telnet connection From here it is possible to gather information by sending commands to the target This view is very useful for diagnostic and debug tasks The Terminal View appears in a tabbed notebook 14 Compilation E Display Sh matlab View E Terminal 22 y fal g Ev m Telnet 192 168 0 201 23 CONNECTED login root Tue Jan 19 06 04 04 2010 on dev ttyp3 Last login Tue Jan 19 06 03 09 2010 on dev ttyp2 edit the file profile if you want to change your environment To start the Photon windowing environment type ph Figure 54 Terminal View The next section presents how to connect to remote target Other sections show some examples and explain the toolbar and the contextual menu By default the Terminal View is not included in the Edition perspective To add it to the current perspective click Window gt Show view gt Other gt Terminal gt Terminal How to connect to remote target Open the Terminal View To open a new Terminal View on a specific target click on the Telnet menu item from the Tools menu of the target Project Explorer 23 2A ASE E de Targets wal localhost a ET tS rtdemot New gt rtdemo2 Ru Ja Copy Ctrl C 5 Paste Ctrl Dele
27. RTLAB UG 104 00 173 174 Project Explorer D E i m E je a 3 o Models rtdemoi rtdemo2 rtdemo3 File system amp models gt rtdemoi 5 rtdemo2 EC rtdemo3 H E Opcommon H E report H E rtdemo3_sm_master gt redemo3_ss_slavel gt rtdemo3_ss_slave2 gt rtdemo3_2_sc_user_interface mdl gt rtdemo3 mdl rtdemo3 probe E E N Fee Figure 6 Standard resource hierarchy Working with linked resources Although respecting the previously described resource hierarchy is highly recommended for an easier resource management sometimes it may be useful to manipulate resources that are 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 that has been 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 that already are in the project s location will belong to this project Deleting this project will delete all its files e
28. Reset or e From the main toolbar click on the reset button e Close the Simulink Console RTLAB UG 104 00 Resetting the model 59 60 Resetting the model RTLAB UG 104 00 Closing and editor Closing and editor Now that there is an editor open here s how to close it Select the MyScript py editor tab To close the editor choose one of the following options e Click the close button X in the tab of the editor B MyScript py 22 e Select File gt Close from the menu bar Note the prompt to save the file before the editor is closed Click OK to save any changes and close the editor If the editor was closed using File gt Close notice that the option File gt Close All was also displayed This is a quick way to close all of the open editors If File gt Close All is chosen a prompt will appear to choose which editors with unsaved changes should be saved RTLAB UG 104 00 61 62 Closing and editor RTLAB UG 104 00 Navigating resources Navigating resources This section will work with the Project Explorer view This view is initially part of the RT LAB Edition perspective To experiment with other views they can be displayed by using the Window gt Show View menu One important view to become familiar with is the Project Explorer view which displays information about the contents of the Workbench and how the resources relate to each other in a hierarchy In the Workbench all resourc
29. The Tasks view contains line items for system generated problems warnings and errors You can add your own entries to the table to build a list of to do items or tasks e On the toolbar in the Tasks view click the New Task button The New Task dialog will open e Type a brief description for the task in the Description field The new task is assigned default priority and completed values These values may also be modified within the New Task dialog e Press OK Associating a task with a resource You can associate tasks with an editable resource for instance to remind yourself to update a line of source code later RTLAB UG 104 00 265 e In the project explorer view double click the resource with which you wish to associate the new task The resource opens in the editor area e Right click in the gray border at the left of the editor area beside the line of text or source code against which you want to log the new task e On the pop up menu select Add Task e When prompted enter a brief description of the task A new task icon appears in the border of the editor area to the left of the line where you added the task When you move the mouse pointer over the marker the description of the task is displayed as a tooltip The task is also added to the Tasks view You can delete a task either by right clicking its icon in the editor area and selecting Remove Task or by pressing the Delete key in the Tasks view 266 RTLAB UG 10
30. Use the Window gt Preferences dialog pages to set how you want RT LAB to operate You can browse the Preferences dialog pages by looking through all the titles in the left pane or search a smaller set of titles by using the filter field at the top of the left pane The results returned by the filter will match both Preference page titles and keywords such as source and real time However to find specific functions you may have to search the online help instead The arrow controls in the upper right of the right pane enable you to navigate through previously viewed pages To return to a page after viewing several pages click the drop down arrow to display a list of your recently viewed preference pages The preferences dialog displaying the General preferences and RT LAB preferences Preferences type filter text Colorer Library Editor General Help Pydey Capabilities Development Compiler and Linker Diagnostic Debugging Monitoring Execution Environment Variables File Transfers Performance Real Time Hardware E Simulation tools EMTP Matlab Matrixx RT LAB Run Debug Team Terminal E WindowTester Restore Defaults Apply E El El El Preference pages contributed by plug ins are included in this dialog RTLAB UG 104 00 365 Preferences 366 RTLAB UG 104 00 RT LAB Preferences Pages RT LAB Preferences Pages Use the Window gt Preferences dialog page to set the preferences of RT LAB The v
31. a note and still complete a task Warning Describes an action that must be avoided or followed to obtain desired results Recommendation Describes an action that you may or may not follow and still complete a task Code Sample code Italics Reference work titles Blue Text Cross references internal or external or hypertext links RTLAB UG 104 00 11 Introduction 1 6 1 6 1 1 6 2 1 6 3 1 6 4 1 6 5 12 Basic concepts This section describes the basics of RT LAB provides an overview of the simulation process from designing and validating the model to using block diagrams and 1 0 devices to running the simulation and using the Console as a graphic interface Designing and Validating Models The starting point for any simulation is a mathematical model of the system components that are to be simulated You design and validate a model by analyzing the system to be modelled and implementing the model in the dynamic simulation software RT LAB is designed to automate the execution of simulations for models made with offline dynamic simulation software like Simulink or SystemBuild in a real time multiprocessing environment RT LAB is fully scalable enabling you to separate mathematical models into blocks to be run in parallel on a cluster of machines without changing the model s behavior introducing real time glitches or causing deadlocks Using Block Diagrams Using block diagrams for programming si
32. ae reo eo No selection RTLAB UG 104 00 93 94 Perspectives RTLAB UG 104 00 New perspectives New perspectives There are several ways to open a new perspective within this Workbench window Using the Open Perspective button on the shortcut bar Choosing a perspective from the Window gt Open Perspective menu To open one by using the shortcut bar button Click on the Open Perspective button ES E Edition A menu appears showing the same choices as shown on the Window gt Open Perspective menu Choose Other from the menu In the Select Perspective dialog choose another perspective and click OK The perspective is displayed There are several other interesting things to take note of e The title of the window now indicates that the new perspective is in use e The shortcut bar contains several perspectives the original Edition perspective the new perspective and a few others The new perspective button is pressed in indicating that it is the current perspective e To display the full name of the perspective right click the perspective bar and check Show Text In the shortcut bar click on the Edition perspective button The Edition perspective is once again the current perspective Notice that the set of views is different for each of the perspectives RTLAB UG 104 00 95 96 New perspectives RTLAB UG 104 00 Saving perspectives Saving perspectives This tutorial has demonstrate
33. e Select the Features Monitoring1 template from the list of available project templates e Click Finish Events and Probes List Here is the list of all available probes and events that can occur when a simulation is running EVENT PROBE NAME DESCRIPTION FREQUENCY Basic Time to compute the model s calculation at every major step It depends on the model s solver used to compute the results Major computation time Every step The major step includes a part of the algebraic calculation the discrete states calculation and the major continuous states calculation See below for more detail Time to compute the model s calculation at every minor step It depends on the model s solver used to compute the results Minor computation time Every step The minor step includes a part of the algebraic calculation and the minor continuous states calculation See below for more detail Time to compute model s computation time major and Execution Cycle minor RT LAB overhead for all services status update Every step and communication IOs j Execution Cycle time to wait the clock s interrupt Total Step Size Every step Normally it should be very close to the model step size Available time that can be used to compute more me calculations Every step Advanced Switching time between the Interrupt handler and the main process of the model Only in software or hardware Sy
34. filename is the same as the program name with a core extension List of commands specific to Red Hat targets Command cat proc cpuinfo Ispci v Description Displays information about the processors installed on the target Displays information about all PCI buses in the system and all devices connected to them List of commands specific to RedHawk targets RTLAB UG 104 00 249 Terminal View Command Description Displays tabular information about the processors installed on cpu p the target List of commands specific to Windows targets Command Description dir C Opal RT Lists the Opal RT directory systeminfo Displays information about the system tasklist Prints the name the PID and the memory usage of all running applications and services on the target ipconfig fall Allows the user to view information about the configured network interfaces Toolbar The toolbar in the Terminal View contains the following buttons ICON DESCRIPTION N Connect Opens the connection to the target y Disconnect Closes the connection to the target Settings Opens the Terminal Settings dialog While connected only the view title can be changed Toggle Command Input Field Toggles the Command Input field to edit complex command lines on dumb terminals See figure Command Input Field a Display Selected Connections Selects a Terminal connection to show in this view instance Only available when multiple connecti
35. home ntuser bitstreams If the Force flash operation is selected the selected board will be flashed even if it is already programmed with the specified bitstream Once both board and compatible bitstream have been selected you can click on the OK button to launch the process During the flash operation results will be shown in the Target Console and a popup dialog will be displayed Progress Information i Flashing C Work PlashBistream Bits 5M 300 115 bin on target TestDrive2 mmm Transferring bitstream Figure 94 Flashing bitstream popup dialog 338 RTLAB UG 104 00 Flash bitstream wizard Results can be saved to a file by selecting the Log result to a file option For certain boards like OP5110 you have to reboot the Target to put the bitsream change into effect In this case a dialog will be displayed Reboot target Target TestDrive2 needs to reboot to apply bitstream change Do you want to reboot it now RTLAB UG 104 00 339 Flash bitstream wizard 340 RTLAB UG 104 00 Connect to Embedded Simulation Wizard Connect to Embedded Simulation Wizard This wizard allows users to connect an existing RT LAB project to an embedded simulation The project can then be opened to interact with the embedded simulation To learn more about embedded simulation in general see Embedding Simulation Embedded simulations are shown as children of RT LAB targets in the Project Explorer Targe
36. if you were executing the command When you type CTRL 5 you have created a binding for About The right most column will indicate that this is a user binding by displaying a U If there was a conflict with another key this column would also display a C The binding will be in the default context In Windows You can now use the When combo box to change the key binding context for example to move this binding to Editing Text If you wanted to add a second key binding to About you can use the Copy Command button to create a second command entry for you to bind another key to If you want to delete a binding you can either use the Remove Binding button or simply give focus to the Binding text box and hit Backspace The Dynamic Nature of Key bindings Key bindings are provided by plug ins and in RT LAB plug ins can be added or removed This can cause key bindings declared by these plug ins to be added or removed RT LAB stores custom key bindings in a way to compensate for this Consider the example above where CTRL 6 was assigned to About in the Default scheme Say you install a new plug in that assigns CTRL 6 to a particular command RT LAB will preserve your assignment to About Conflict Resolution There are only a finite number of simple common key strokes available to assign to a multitude of commands We have seen that scheme context and platform all partition key sequence assignments into domains where they don t conflict with on
37. in the Subsystem table and set the properties Choose a physical node Select the target node where the subsystem will be executed from the list of available targets By default the Assigned node is set to your development node See Preferences gt RT LAB gt Simulation Tools gt RT LAB section RTLAB UG 104 00 151 Diagnostic Page Run in XHP mode If checked the subsystem will be executed in eXtreme High Performance XHP mode available only on QNX 6 and RedHat Linux Run in Debug mode For advanced users only Check the subsystems you want to debug See section Debugging on page 30 Target Utilities The target utilities section allows the user to clean a target or embed a subsystem Target utilities Clean a target or embed a subsystem Clean target Set as embedded Clear embedded i Embedded simulation ready Clean target Cleans the model directory on the target node All files will be deleted Set as embedded Sets the current model s simulation as an embedded simulation on the target It allows the target to automatically load and execute a simulation at power up See Embedding Simulation for more details Clear embedded Clear an embedded simulation from the assigned target See Embedding Simulation for more detail Diagnostic Page The diagnostic page contains two main sections that define the diagnostic properties Monitoring properties and Debugging properties The default property values fo
38. just the SC part of it You could also create your own Ul using the our API instead At this point you could modify parameters log data to files Reset the model when your simulation is completed The model could also reset itself by inserting a stop block inside it RT LAB automatically transfer all generated file to the command station to be review later RTLAB UG 104 00 Additional files Additional files Some simulation requires additional files in order to compile and execute the model Refer to Files Page to see how to set up new files Usually header files and source files to be compiled are transferred during the compilation Data files to be used at run time are usually transferred while loading the model User script files Since many different configurations may be required in order to run a simulation RT LAB supports script calls during the compilation and execution of a model Scripts created using Python can be global to a node or local to a subsystem called on a command station or target and are available during the compilation step and the load reset step In addition script outputs can be viewed thru the RT LAB display panel The following table lists available scripts Table 1 Available scripts SCRIPT STEP This script is called on the command station during the compilation before separating the model This script is called on the command station during the compilation after the model s code gene
39. no snapshot can be taken and no signal can be dynamically selected when a subsystem is running in XHP mode You can however pause the model to perform these functions and then continue execution Some I O interfaces are not available Because system interrupts and multi tasking are disabled for computation nodes running in XHP mode any 1 0 boards which require these features are not available during XHP runs These blocks are mainly RTLAB UG 104 00 Communication type limited to serial interfaces which require an asynchronous process and discrete event detectors generators which require interrupts Using XHP Mode The XHP mode can only be applied at the subsystem level To enable the XHP mode you must check the XHP box in Assignation Page from Model Editor On QNX target if a non XHP subsystem is assigned physically to the same computer as an XHP subsystem the computer is set to XHP mode Subsystems running in XHP mode won t be able to communicate using the Ethernet network They will only be able to communicate with other subsystems using the OHCI IEEE 1394 or Infiniband connections It is recommended that you use the XHP mode only on slave subsystems so that the master can relay the communications between the slave nodes running in XHP and the command station host computer through Ethernet or other TCP IP transport An interesting point in having subsystem running in XHP is that it enables you to use a Multi Processor
40. parameters OpComm blocks in the SM subsystem One OpComm block is inserted to receive signals from the SC subsystem asynchronous network One OpComm block is inserted to receive signals from other real time subsystems in this case plant_response from SS 462 RTLAB UG 104 00 Building a distributed Model for RT LAB rtdemo2 sm_controller Fie Edt View Simulation Format Took Help OSHS SRE SSR QS gt ah om WB 17 Function Block Parameters OpComm RT LAB OpComm mask link Communication block To be used in subsystems receiving signals from other subsystems all inports must go through this communication block before being connected Parameters Figure 4 SM subsystem and associated OpComm mask OpComm blocks in the SS subsystem Since data are only from the SM subsystem only one OpComm block is inserted into the slave subsystem gt File Edt View Semistion Format Tools Help OSES OR 233 1202 fr Nema I Real A Simple second order plant with PID control RELAB Function Block Parameters OpComm RT LAB OpComen mask ik Communication block To be used in subsystems receiving signals ridemo2 ss_ plant Figure 5 SS subsystem and associated OpComm mask OpComm blocks in the SC subsystem RTLAB UG 104 00 463 Building a distributed Model for RT LAB For the console 1 or many OpComm blocks can be added depending on how man
41. per subsystem thus per CPU basis Not allowing interrupts prevents process switching which removes latencies time for additional computation in the same time slice The XHP mode is aimed at real time applications of a given base sample time that cause overruns overflow their allowed time step for computation while running in RT LAB in the standard mode In XHP mode the model waits in an empty loop for its next scheduled computation step The next model step is then computed In this mode we use the CPU counter as our time reference Because this counter operates at the CPU s frequency it offers a very high resolution even for step sizes in the microsecond range Because the counter resides on the CPU and reading its value is done within one CPU cycle this operation introduces almost no latency Issues Introduced by XHP Mode on QNX target On QNX target the XHP mode is enabled on the whole computer All the subsystem running on this same target will run in XHP It means that the number of subsystems that could run on this target depends on the number of CPU since each subsystem will be assigned on a specific CPU Because the RTLAB UG 104 00 467 Simulation mode computation subsystem is the only process running on the processor when using XHP mode some restrictions are introduced by its use As a consequence of the very low step sizes attainable by subsystems in XHP mode other background tasks on the computation node will not be exe
42. see Organizing resources and API documentation sections RT LAB Controller Architecture and Examples Projects Generally speaking a project is a set of resources that will interact to achieve a common goal Several types of projects exist and may appear in the Project Explorer The type of a project is determined at the project creation in the corresponding New 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 iself 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 to a particular programming language For example create a Python RTLAB UG 104 00 169 170 Project Explorer 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 P
43. Assign all the subsystems of this model to this Target Open an Editor to edit the properties of this model Open this model in Simulink Assign this Subsystem to this Target Open an Editor to edit the properties of the parent model Open the parent model in Simulink Open this Console in Simulink Assign this Subsystem to this Target Assign all the subsystems of this model to this Target Hold lt Ctrl gt key to make a copy of this Target Run this script on the destination Target Results will be displayed in the Target Console Opens the Flash bitstream wizard dialog to flash a board with this bitstream RTLAB UG 104 00 Compilation View 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 that 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 For more information please see Building models The Compilation View appears in a tabbed notebook E Console oi Compilation 3 Display Ed Monitoring BASE sl Pit ri 0 Model matrixTest PEE Starting compilation
44. Console If this version was the default one the most recent version i e the one with the highest version number will automatically be selected as default RTLAB UG 104 00 161 Software Page 162 RTLAB UG 104 00 Views Views Views support editors and provide alternative presentations as well as 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 Related concepts Perspectives Fast views Detached views Editors RTLAB UG 104 00 163 Views 164 RTLAB UG 104 00 Fast views Fast views NOTE The Fast View feature while still available has effectively been subsumed by the new 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 wan
45. Files Assignation Diagnostic Hardware Simulation Tools Figure 19 Setting the compilation command You are then ready to build the model Note that if there is a problem in the C file of the Asynchronous process errors will be displayed in the Compilation View during compilation Running the Asynchronous program Loading the model The executable file of the Asynchronous Program must be added to the list of files to be transferred to the execution node at load time as shown in the next figure gt AsyncIP_sl mdl 22 m Files Properties Files Properties Set the file properties of your model Enable file retrieval on model reset Build intermediate tree on file retrieval File retrieval root directory ar _ Name Mode Step Subsystems h AsyncIP_source synclPutils h ascii Before compilation All El AL AAsyncIP_sourcelAsynclP mk ascii Before compilation All Delete e ll JAsyncIP_sourcelAsyncIP c ascii Before compilation All Delete All E AsyncIP binary After compilation All E AASYNCIP_SL_SM_IP_TESTIOPNTOTARG binary Before load All Edi Overview Development Execution Variables Files Assignation Diagnostic Hardware Simulation Tools Figure 20 Specifying executable transfer at load time RTLAB UG 104 00 517 Running the Asynchronous program After retrieval from the compilation target the executable file is found in the subsystem sub directory created in the model directory of
46. Graph Creation option to Superimposed to add multiple signals to the same graph instead of individual graphs Advanced options and other functionalities are explained in the ScopeView User Manual 528 RTLAB UG 104 00 Using ScopeView Acquiring Signals To acquire signals first verify that all models used by the RT LAB data sources are running Make sure that signals are selected and already assigned correctly to graphs as described in the previous section Start the acquisition by pressing the Start button from the main toolbar Alternatively click the Start item from the Acquisition menu At this point ScopeView starts the process of getting signals from the real time simulator and displays signals in the graphs When the model is paused ScopeView will wait until the model sends its signals Also note that RT LAB will display the following error message when the model is not loaded ScopeView Error Error during data acquisition Data Source RTL1 Project rtdemo2 Model rtdemo2 AcqGr 1 Error 13 Could not get signals from acquition group 1 The model is not loaded or has been reset Using ScopeView Acquisition Parameters The ScopeView acquisition parameters are used to configure how the acquisitions are performed For example they allow changing the sampling duration the number of acquisitions to perform or activating synchronization and triggering Start Time 0 0 Time Length 0 0999 Sampling Rate 20000 0 v
47. MatrixX command after opening model Example myVar 1 Model fixed step size s Displays the basic calculation step of the model as specified in the Simulation gt Configuration Parameters gt Solver menu of the Simulink model file or in the top level SystemBuild model s Sample Period field This property is read only Matlab MatrixX command before opening model Matlab Xmath command to execute before opening the model For example MylnitFile m where MyInitFile includes commands that initialize model variables RTLAB UG 104 00 Simulation Tools Page Matlab MatrixX command after opening model Matlab Xmath command to execute after opening the model For example MylnitFile m where MyInitFile includes commands that initialize model variables Simulink SystemBuild Console Simulink SystemBuild Console Set the settings of the console C Handle console automatically Handle console automatically Enables the console to be automatically opened and closed when a model is Loaded or Resetted The console starts automatically at the first model s execution Real Time Workshop Properties Real Time Workshop Properties Set the Real Time Workshop properties of the model User TLC file Automatic Li User TMF file Automatic a isa 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 Th
48. Measuring User Code Source Calculation Time 486 Events and Probes List 487 Using Python Script and the Macro Recorder 491 Using RT EAB BIOCKS 4 2 aa A a A Dora a 497 Generic DIOCKS s 4 ok 4 Gide rar LR nat ad 497 T O DlockS 26 2 3 durs der bad aaa 497 RT LAB CONNECT ai A ER ee ae art US ARE 499 RT LAB Orchestra ars 2a a en re at 501 Introduction zu 2 ur Fans cale dad ra 501 Configuring the RT LAB Orchestra communication layer 501 DDF Configurator 505 RT LAB Orchestra Simulink blocks 508 Setting up an RT LAB Orchestra co simulation 509 Running an RT LAB Orchestra co simulation 510 RT LAB Asynchronous processes 511 Introductiona ai ee are 511 Architecture overview 511 Building the asynchronous application 512 Running the Asynchronous program 517 RT LAB User SFunction 519 Introduction nda da Soe a eee See Sores ea ein 519 Changes Resulting from the Replacement of SimStruct with the rtModel519 RT LAB Xilinx System Generator toolbox integration 521 Using SCOPEVIGW ir it cl Rah aeg re 525 Embedding Simulation 531 Taking Snapshots cse nesr a RG EEG aR AOS PRE ee eR ee 535 Registering a User S Function
49. Model type Matlab Simulink MatrixX SystemBuild or EMTP RT Model description Description that the user wants to associate to the model Project Project that will contain the new model This field is required Note the user has to create a new project if there is no existing one Use default location The default location where RT LAB will store your model is in the projectDirectory models modelName directory De select Use default location to specify a location other than the default You can type the new location or browse to select a file system location RTLAB UG 104 00 309 New RT LAB model wizard Before changing the location of a model please read Organizing resources in the Project Explorer documentation Creating a new empty model After setting the parameters s values of the new RT LAB model wizard the user could create an empty model by clicking on the lt Finish gt button on the first page of the wizard An empty model is a diagram with no functional elements as blocks or connection lines Creating a new model based on one template model After setting the parameters s values of the new RT LAB model wizard the user could also create a model based on one template model by clicking on the lt Next gt button New RT LAB Model RT LAB Model Select a template for your new model Available Templates a model_1_subsystem M O d el with 2 gt model_2_subsystems model_3_subsystems M empty subsystem
50. Monitoring View 484 The Monitoring View displays CPU usage of each task probe executed during real time simulation It displays the start and stop time of each probe and its duration It detects overruns and highlights steps where overruns are detected Here is an example of its contents RTLAB UG 104 00 Using the Monitoring View tte give 9 Em onitoring gt Model rtdemo1 lt lt Info lt lt Data Usage Min Max Mean 1 i x rtdemoi Ts 0 0010 5 0 91 2 sm_computation Ts 0 0010 s 0 91 dt 4 18 us dt 33 32 us dt 9 06 us dt 7 96 us dt 9 78 us dt 19 99 us RE Major computation time 0 08 dt 0 26 us dt 12 19 us dt 0 81 us dt 1 01 us Bert dt 1 23 us ik Minor computation time 0 13 dt 0 79 us dt 13 94 us dt 1 34 us dt 1 21 us dt 1 16 us dt 1 55 us alo Execution cycle 0 91 dt 4 18 us dt 33 32 us dt 9 06 us dt 7 96 us dt 9 78 us dt 19 99 us lo Total step size 99 49 0 dt 461 23 us dt 1953 59 us dt 994 90 us dt 868 45 us dt 950 35 us dt 984 46 us alo Total idle 91 63 10 dt 272 13 us dt 1941 71 us dt 916 35 us dt 272 13 us dt 930 05 us dt 951 02 us The Monitoring View can be used with any model that has the monitoring setting enabled You do not have to rebuild your model once you have enabled monitoring Once the model has been selected in the Project Explorer and loaded on a target simply open the Monitoring Vie
51. Project Explorer view except for project resource When deleting a project it is also possible to delete the project from the workspace but keep its contents in the file system RTLAB UG 104 00 69 70 Deleting resources RTLAB UG 104 00 Copying and renaming Copying and renaming Workbench resources can be copied and renamed using popup menu operations in the Project Explorer view In this section files that have been created will be copied and renamed Prior to copying files some setup is required Setup e In the Project Explorer view create a new text file file1 txt The Project Explorer view should look like this a Project Explorer 3 ERDA E e Targets qu MyTarget202 le gt MyProject FE Models GSS File system H E help gt models E Python264 Yilproduitsidevirt i e Double click on file1 txt and ensure that it contains the following text This is sample text file There is not much else we can really say about it other than it has five lines of text that are rather dull e Close the editor on file1 txt file RTLAB UG 104 00 71 72 Copying and renaming RTLAB UG 104 00 Copying Copying You can copy file1 txt to the help folder using the following steps e Ensure that the setup described in the introduction to this section has been performed e In the Project Explorer view select file1 txt e From the file s context menu select Copy or Ctrl C e In the Project E
52. Python script opens the Interactive Python Console or use the Macro recorder Python Debug a Python script Search Opens the Search View Next Annotation Go to the next annotation in the current editor Use submenu to select annotation types to be considered errors bookmarks search results Previous Annotation Go to the previous annotation in the current editor Use submenu to select annotation types to be considered errors bookmarks search results Last Edit Location Shows the last change that occured within a file Opens an editor if necessary Hit this button several times to go back to older edit locations RTLAB UG 104 00 Wizards Wizards Contents e New RT LAB project wizard e New RT LAB model wizard e Existing RT LAB model import wizard e Add Model wizard e New Target wizard e Detected Targets Wizard e New Folder wizard e New File wizard e Flash bitstream wizard e Connect to Embedded Simulation Wizard e Load Parameters wizard e Save Parameters wizard RTLAB UG 104 00 303 Wizards 304 RTLAB UG 104 00 New RT LAB project wizard New RT LAB project wizard Main interface panel Use File gt New gt RT LAB Project to open the dialog that enables you to create a new project in the workbench A E New RT LAB Project Zu E22 x RT LAB Project Create a new RT LAB project This project can be generated from a template Project name projectl v Use default location Z
53. RT LAB enables signal acquisition from the real time target nodes in the cluster Because TCP IP is relatively slow compared with most real time systems RT LAB enables you to set different groups of acquisition Each group can include many signals including the number of signals per frame to receive decimation factor etc These parameters can be defined separately for each signal For example in a system with a 1 millisecond step a user might want to acquire the data values of a slow changing signal once every 100 steps or so Signals can also be acquired only once specific conditions have been met by defining the conditions parameters in a Trigger block as described below Signals received on the Console SC_ subsystem are grouped into twenty four groups The acquisition group for a signal is specified in the OpComm communication block through which the signal passes Acquisition Parameters Acquisition parameters are shared by all signals included in a given acquisition group These parameters are specified by you in the Probe Control Panel on the tabs numbered with the appropriate acquisition group number Use Tools gt Probe Control or click on the Probe Control Icon to open this panel IES Window Help Bi Parameters Control br Probe Control fh Open Matlab R2009B 7 9 Python gt For more details on how to control data acquisition parameters see Triggering Acquisition By default each acquisition group is always
54. RTLAB UG 104 00 533 Embedding Simulation 534 RTLAB UG 104 00 Taking a Snapshot Taking a Snapshot Introduction The Snapshot feature has two main uses e to restore a set of values in your simulation e to generate a report on the state of the simulation at a given time A Snapshot contains the values of all the model s parameters signals and states at a given time of the real time simulation It also contains information about the solvers and data required by s functions Users can take a snapshot of a model while the real time simulation is running and then restore it later if desired For example if a simulation must run for two days to achieve a given state a snapshot of the model can be taken after it has run for two days When the simulation is run again the snapshot s values can be restored saving two days of simulation Also note that to restore a snapshot the real time simulation must be paused To take or restore a snapshot use the corresponding item in the Simulation menu or Main Toolbar A Snapshot block may also be placed in the model helping the user to automatically take snapshots based on the behaviour of the model See the Snapshot block in the Block Library Reference Guide for more help Registering a User S Function for Snapshot Note that the following paragraphs are designed for advanced users developping S Functions with Simulink If you are not familiar with S Function skip this section To s
55. RTOS Optimized Hard Real Time Scheduler high performance low jitter Within a time step the system is doing more than computing the dynamic model It also does administrative tasks such as reading and writing 1 0 updating the system clock scheduling tasks logging data and handling communications This restricts the amount of time available within a frame to compute the model values limiting the size of model that can be computed on a single processor RT LAB has reduced this overhead to a few percent of raw hardware performance without losing functionality thereby increasing the capacity to compute more complex models High speed XHP Mode Multirate XHP Mode Software Synchronized mode RT LAB XHP eXtra High Performance mode allows very fast computation of the real time model on the target system This has allowed our customers to simulate complex systems over distributed processors with analog and digital I O at cycle times below 10 microseconds The XHP Mode of RT LAB can slash scheduling overhead to less than a microsecond letting you use the full power of your system for the computation of highly dynamic models in real time which is a solution for the developers who have the constant challenge of achieving accurate high fidelity responses for the real time simulation increasingly complex models Even when the signals in a hardware in the loop HIL system need only be updated in the 100s of microseconds time frame the model may
56. Right click the file in a navigation view e g the Project Explorer and select Team gt Show Local History e The History view opens and shows the history for the file l History 83 B Dias file3 Ext Revision Time E 10 02 03 3 54 PM E 10 02 03 3 54 PM E 10 02 03 3 54 PM E 10 02 03 3 54 PM e The top entry in the view represents the current contents of the file The next represents the previous contents and so on Right click on the previous entry and select Compare Current with Local to open a Compare editor that displays the differences between the Workbench file and the specific copy of the file selected in the local history e Right click on the previous entry again and select Get Contents This replaces the Workbench s copy of sampleFile txt with the chosen local history item e Observe that the file3 txt editor now contains two lines RTLAB UG 104 00 109 110 Local history RTLAB UG 104 00 Responsive UI Responsive UI By default all RT LAB operations run in the user interface thread Employing the Responsive UI which allows the threading of sequential code will enable you to continue working elsewhere in RT LAB Without the Responsive UI support you would be locked out of performing any other actions when met with a slow operation While some operations automatically run in the background such as build in many cases a dialog will be displayed providing you with the option to run an operation in t
57. RtLab RTLAB_HEAD RT LAB build debug win32 workspz Bro Project description Working sets Add project to working sets N es Figure 68 New Project wizard main page Description Each simulated models have to belong to one project See Project Explorer for a detailed description of Project and other related concepts This dialog explains how to created a new empty project or project that contains a model Parameters The first page of the wizard helps you to set the parameters of the project Project name The name of the new project to be created This field is required to create a new project A project name must be unique within the current workspace Use default location The default location where RT LAB will store your project is in the workspaceDirectory directory De select Use default location to specify a location other than the default You can type the new location or browse to select a file system location Before changing the location of a project please read Organizing resources in the Project Explorer documentation RTLAB UG 104 00 305 New RT LAB project wizard Project description A short description to be associated to the new project Creating a new empty project Once valid parameters have been entered an empty project can be created by clicking on the lt Finish gt button on the first page of the wizard Then it will be possible to add new or existing models to this project using respect
58. Search page respectively You can use links at the bottom of the help view to turn to other pages You can read more about the Help view and its various pages e8 Related Topics About Project Explorer The Project Explorer provides a hierarchical view of the artifacts in the Workbench See also B Project Explorer B Views Dynamic Help Search results For Project Explorer view Project Explorer view icons Project Explorer view Linking the Project Explorer view to the active editor view Navigating and finding resources B B B B Showing or hiding files in the Project Explorer B B Resource hierarchies B Viewing resource properties DP More results Go To Ball Topics Search Cf Bookmarks Index The Help window The Help window provides the same content as the Help view but in a separate window instead of in a view You can open the window from the main menu by selecting Help gt Help Contents The first view shown in the window is called Contents This view displays the table of contents for the product documentation Click on one of the links to expand the navigation tree for a set of documentation RTLAB UG 104 00 455 Help Help RT LAB DEAR Search fco Search scope All topics Contents B 5 E eo l el amp 0 151 workbench User Guide 2 J 7 r ae E PyDev User Guide e y 2 Es RT Lab 1 0 Block Library Refereni E RT Lab User Guide Using the Ec
59. Start at Tuesday June 21 2011 19 47 19 lam The current RT LAB version is v_ dev The current model is Z RtLab RTLAB_HEAD RT LAB build debug win32 workspace MyProject models matrixTest matrixTest mdl The current host platform is XP Vista 7 The current target platform is XP Vista 7 The current compiler is Visual C 6 0 ver VC6 Preparing original model for code separation and generation The current Matlab version is v7 1l Executing command before opening model varA 42 varM 1 2 3 4 5 6 RtlabInfo not loaded Separating RT LAB model number of RT subsystems 2 console detected separating RT LAB subsystem sm_master separating RT LAB subsystem sc_user_interface Separating RT LAB subsystem ss_slave Model preparation and separation duration 00h 00m 06s nut ne nn a ata Completed successfully Figure 23 Compilation View 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 gt Show view gt Other gt RT LAB gt Compilation RTLAB UG 104 00 189 Compilation View
60. These arguments will be used later in order to start the debugger Press OK Starting Model in Debug Mode The model executable arguments have been copied to clipboard Paste the content of the clipboard in the Visual Studio Project Settings Debug Program Arguments field Arguments 0 001 1 152 1 4 127 0 0 1 4997 8404994 WARNING THE OPALD SHOULD BE STARTED IN DEBUG MODE If you are not sure about the OpalD in Debug click Cancel and see Rt Lab User Guide section 4 7 coca 3 MS Visual Studio open and ask to create a projet Press Yes Microsoft Visual C WIAMHAPPYOPAL RT RT LABS 0 3 Examples Basic rtdemo1 Simulinkirtdemo1_sm_computation OpNTtargetirtdemo 1_1_sm_computation mak This makefile was not generated by Developer Studio Continuing will create a new Developer Studio project to wrap this makefile You will be prompted to save after the new project has been created Do you want to continue No 474 RTLAB UG 104 00 Debugging 4 At the next screen press OK Platforms Select the platforms supported in OK your external makefile Platforms Cancel 5 At the next screen press Save Save As Save in CD OpNTtarget e E File name frtdemot_1_sm_computationt Save Save as type Projects dsp y Cancel 6 Go to menu Project gt settings Project Settings Settings For win32 Debug y General Debug Ee ttdemol_1_sm_computation1 a Genel Executable for debu
61. When the model will be executed the execution will stop at this breakpoint 4 DDD debugger should open on the target screen terminal Go to menu Program gt Run again 5 Goto menu Program gt Continue Red Hat By default the NightView debugger will be used to debug the model Refer to NightStart documentation to learn how to use it If you want to use DDD instead edit the ini file lt RT LAB_ROOT_DIR gt common bin Hardware config and in the section General_REDHAWK General_REDHAWK64 for RedHawk 64 and add the following key RTLAB UG 104 00 473 Debugging General_REDHAWK DEBUGGER ddd To debug a model 1 Start the graphical interface on the target if it is not already done and log as root 2 Load the model 3 Open the source file you want to debug and insert your breakpoint if any for instance DDD if you want to debug the mdlStart Simulink of Rtdemo1 model go to menu File gt Open source then select rtdemo1_1_sm_computation c and click on Open button The source file will open Look for the MdiStart function put the cursor on the first line and add a breakpoint click on the Break button on the toolbar A breakpoint should have been inserted When the model will be executed the execution will stop at this breakpoint 4 Debugger should open on the target screen terminal DDD Go to menu Program gt Run again Windows 1 Load the model 2 Model argument are copied to the clipboard
62. a filter is automatically created Filter Dialog This dialog allows you to hide tasks and probes from the Monitoring view To hide tasks and probes e Select filters from the list matching tasks and probes will be exclude from the probe area RTLAB UG 104 00 243 Monitoring View gt Select Probes Synchronized IOs Status Update Y Data Acquisition Signals Change User Blobs Send Status Multi Receive Time steps Handle target requests Handle host requests Pre execution computation time E Major computation time DO Minor computation time Post execution computation time E Execution Cycle E Total Step Size MV Idle wait for clock Select All This button allows you to select all filters from the list Deselect All This button allows you to deselect all filters from the list Add This button allows you to create new filter It is useful when custom probe are inserted in the model Edit This button allows you to edit a filter and then change its name or its matching regular expression For advanced users only Delete This button allows you to delete a filter from the list Restore This button allows you to restore all filters to their default values Units Dialog This dialog allows configuring of the units of the durations and start and stop times shown in the Monitoring view Available units are seconds milliseconds and microseconds It is also possible to configure whether the start a
63. ae A dues ie ms ale 137 Model Overview Page 137 Development Page 139 TR LS ES Execution Page142 Environment Variables Page 144 AAA du disons dk has der ed gens 147 Assignation Page 149 Diagnostic Page 152 Hardware Page 4 4444s4ssssss 153 Simulation Tools Page 154 Target Edit r shido ues hoe de pds Pt A te af nt ne 157 Target Overview Page 157 Diagnostic Page 159 Simulation Settings Page 160 Software Page at tia a ant dater aan a 160 VIEWS na ve in ae de le a edited tous gt Sas NS d Sh Soa 163 FASE VIEWS cc dns art ss a rene ne 165 Detached Views spas ar Dan nn dan eee 167 Project EXplOre nem feel aa amas dinde are 169 Compilation View saa 4 puada nus a or ea a nn 189 Display VieW sus u a re ne 193 Variable Viewer 2 ace anran a aaa ei nn 199 Properties VIEW au caris aa gant Pane De ae die ere 203 Matlab VIEW casga een Sie ak a Pade ae 211 Console Vi Watts RE RS as aa ral eu athe 215 Interactive Python Console 219 Target CONSOLE 0 A A ee 223 Log CONSOLE u a un ar ler date Patiala RA AA 225 Variables Table View 227 Probe Control Panel
64. after search This option will display the search view at the front after performing a search Ignore potential matches Select this option if you only want to see exact matches Emphasize potential matches This option allows you to highlight potential matches in the Search view If the Search engine isn t 100 sure about the match then it is considered a potential match Foreground color for potential matches This option allows you to select the foreground color for potential matches Default perspective for the Search view This option allows you to define which perspective should be brought to the front when there are new search results RTLAB UG 104 00 439 Search preference page 440 RTLAB UG 104 00 Spelling preference page Spelling preference page This service is not installed with RT LAB RTLAB UG 104 00 441 Spelling preference page 442 RTLAB UG 104 00 Startup and Shutdown preference page Startup and Shutdown preference page The General gt Startup and Shutdown preference page allows the selection of plug ins to be automatically activated during workbench startup Normally plug ins are not activated until they are needed However some plug ins may specify that they wish to be activated during startup This preference page allows the selection of which of these plug ins will actually be activated during startup Prompt for workspace on startup If this option is turned on then the workbench will prompt you eac
65. all countries RTLAB UG 104 00 593 Legal 594 RTLAB UG 104 00
66. are three options to choose from with the OpComm block mask Table 2 OpComm block Mask Option BUTTON FIELD FUNCTION Enable synchronization Enables the synchronization algorithm for a given acquisition group This algorithm must be used if synchronization is required between acquisition Console time and simulation time In case of a synchronization problem the Console detects missing data from the target node and the algorithm either replaces the lost data with the last signal value received or interpolates the data RTLAB UG 104 00 481 Understanding Data Reception Table 2 OpComm block Mask Option 482 Enable interpolation In case of missed data from a computation subsystem the synchronization algorithm interpolates data during a range of data loss The following illustrations make this point clear The display at left indicates no interpolation during data acquisition while the display at right indicates interpolation between two frames during data loss Threshold Difference between the simulation Console time and the simulation target time Whenever this difference is exceeded the synchronization algorithm stops interpolating and re synchronizes to the new value Figure 14 Interpolation in data acquisition RTLAB UG 104 00 Monitoring Models Monitoring Models This chapter describes how to use RT LAB to monitor the performance of your running simulation
67. been developed by OPAL RT and is not made available to the public without the express consent of OPAL RT or its legal counsel ARTEMIS RT EVENTS RT LAB and DINAMO are trademarks of Opal RT Technologies Inc MATLAB Simulink Real Time Workshop and SimPowerSystem are trademarks of The Mathworks Inc LabVIEW is a trademark of National Instruments Inc QNX is a trademark of QNX Software Systems Ltd All other brand and product names are trademarks or service marks of their respective holders and are hereby acknowledged We have done our best to ensure that the material found in this publication is both useful and accurate However please be aware that errors may exist in this publication and that neither the authors nor OPAL RT Technologies make any guarantees concerning the accuracy of the information found here or in the use to which it may be put Published in Canada Contact Us For additional information you may contact the Customer Support team at Opal RT at the following coordinates Tool Free US and Canada 1 877 935 2323 08 30 17 30 EST Phone 1 514 935 2323 Fax 1 514 935 4994 E mail support opal rt com info opal rt com sales opal rt com Mail 1751 Richardson Street Suite 2525 Montreal Quebec H3K 1G6 Web www opal rt com CHAPTER 1 INTRODUCTION CHAPTER 2 GETTING STARTED Basic Tutorials mu iii e a ala AGG de eee ad EES 17 The Workbench eyes saa se aden Ze aod adds gk ea ae a 19 Editors and Views eof ie hd
68. before they are recycled the default is 8 You can also specify if a prompt dialog should be opened or if a new editor should be opened when all editors are dirty have unsaved changes Once it is turned on the Pin Editor action is added to the toolbar and editor tab menu Pinned editors are not recycled RTLAB UG 104 00 415 416 Editors preference page RTLAB UG 104 00 File Associations preference page File Associations preference page On the General gt Editors gt File Associations preference page you can add or remove file types recognized by the Workbench You can also associate editors with file types in the file types list File types list Add Adds a new file or file type extension to the predefined list In the resulting New File Type dialog type the name of a file or a file extension If you are adding a file extension you must type either a dot or a before the file type e g xml or xml as opposed to simply xml Remove Removes the selected file type from the list Associated editors list Add Adds a new editor to the list of editors associated with the file type selected above In the resulting Editor Selection dialog you can choose an editor to launch either inside the Workbench internal or outside the Workbench external click Browse to locate an editor yourself if the editor you want is not displayed in the list Remove Removes the association between an editor and the file
69. by clicking Yes when prompted Ignore target x O Do you want to permanently ignore target 192 168 0 205 _ Apply to all remaining unselected targets Figure 87 Ignoring detected targets The list of ignored targets can be seen and edited in the Target Detection preference page This preference page also allows to limit the target detection to specific detection ranges Related concepts Wizards Related reference Target Detection preference page New Target wizard Project Explorer RTLAB UG 104 00 323 Detected Targets Wizard 324 RTLAB UG 104 00 New Resource Project wizard New Resource Project wizard This wizard helps you create a new resource project in the Workbench This project is a generic project without any specific functionalities so it should not be used to hold a simulation project see New RT LAB project wizard form more information Parameters Project Name The name of the new project to be created Location The location in the file system where the project will be created De select Use default location to specify a location other than the default You can type the new location or browse to select a file system location for the new project Select Referenced Projects page In the Referenced Projects list you can set project dependencies for the new project In the list of other projects in the Workbench you can select one or more projects on which you want the new project to dep
70. change currently installed RT LAB versions Version Install current version 10 0 3 10 0 b1 Install custom package O 10 21 Setas default 8 3 5 ne Uninstall This section shows the list of currently installed versions of RT LAB The default one is marked with an icon This default version is the one that will be used when you compile or load any model on this target so you should make sure that it matches the RT LAB version running on the host computer Install current version Automatically installs or re installs the current version of RT LAB on this target The log will be displayed in the Target Console and optionally in an editor Install custom package Opens a dialog to select a package from the file system Packages are tgz files for QNX and rpm files for RedHat The package is then transferred to the target and installed Set as default The selected version will be marked as default Be careful when you select an old version e g 8 1 x when running 10 x since you may loose the connection with the target In this case a confirmation dialog will be displayed wy Incompatible version x This version is not compatible with the current version Setting it as default will prevent the current version of RT LAB from communicating with this target Are you sure you want to continue Uninstall Completely removes the selected version from the target and displays the log in the Target
71. command input field at the bottom of the Field Terminal view Related concepts Views Perspectives Toolbars Related tasks Debugging Opening views Moving and docking views Related reference RTLAB UG 104 00 251 Terminal View 252 RTLAB UG 104 00 Help view Help view The Help view provides user assistance inside the workbench The view consists of several pages Each page presents help in a different fashion Hyper links at the bottom of the help view allow switching among pages and clicking any topic will display its contents Related Topics e Related Topics About Project Explorer The Project Explorer provides a hierarchical view of the artifacts in the Workbench See also B Project Explorer B Views Dynamic Help Search results For Project Explorer view Project Explorer view icons Project Explorer view Linking the Project Explorer view to the active editor Showing or hiding files in the Project Explorer view Navigating and finding resources Resource hierarchies viewing resource properties DP More results Go To EE all Topics search Cll Bookmarks I Index The Related Topics page shows description and help topics related to the current workbench context The About section shows context help specific to your current context and the Dynamic Help section shows some search results that may be related For example if the currently active workbench part is the Project Explorer
72. computer enter the ip address 127 0 0 1 Press the Ping button to make sure that the target is available and to verify if the target is configured properly with the good software version RTLAB UG 104 00 317 318 New Target wizard New RT LAB Target RT LAB Target IP address must be specified Name tQNX201 IP Address 192 168 0 201 Figure 79 New RT LAB Target The next figure shows the result of a positive ping i 192 168 0 201 is up Operating System QNX 6 x Version 6 3 2 Architecture x86pc Number of CPUs 8 CPU speed 2334 MHz Free disk space 8770 MO Figure 80 Positive ping result Press OK button to close the ping result and press Finish button in the New RT LAB Target dialog to complete the configuration of the target Now the target has been created and added to the targets list If the ping has not passed you will receive this message RTLAB UG 104 00 Problem Occurred Q Ping has encountered a problem 192 168 0 20 is down Error 5 Could not send command to Opal daemon Possible causes RT LAB has not been installed on node with IP address 192 168 0 20 the RT LAB daemon is not running Figure 81 Negative ping result New Target wizard Verify the possible causes that are display in the message Make sure that the ip address of the target is the good one For more information see the RT LAB Installation Guide Properties of a target E
73. console O a Sly animnm No selection writable Insert The gray border at the left margin of the editor area may contain icons that flag errors warnings or problems detected by the system Icons also appear if you have created bookmarks added breakpoints for debugging or recorded notes in the Tasks view You can view details for any icons in the left margin of the editor by moving the mouse cursor over them Related concepts Workbench External editors RTLAB UG 104 00 133 Editors Model Editor Target Editor Project Explorer view 134 RTLAB UG 104 00 External editors External editors Sometimes you may need to use an external program to edit a file in the Workbench This can occur for example when the Workbench has no editor for that file type The external program will be used as the default editor if that program is registered as the system default editor for that file type and no other editor is registered for that file type in the Workbench For example on most systems the default editor for JPEG files is an application for editing or viewing image files If there is no other editor associated with jpg or jpeg files in the Workbench then opening a JPEG file from the Workbench would cause the file to be opened externally in the system default editor To open an external program that is not the default editor you can use Open With gt Other from the context menu of a file External programs can als
74. documentation for a detailed description of these blocks Setting up an RT LAB Orchestra co simulation Using the Orchestra RT API Once you have defined the data items to be exchanged between an external component and the RT LAB framerwork in a DDF you need to embed calls to the Orchestra RT API into the external component The Orchestra RT API is a C code Application Programming Interface API that implements a data centered communication mechanism between co simulation components This mechanism allows domain participants to exchange data by referring to it by name only Prior to exchanging data with the RT LAB Framework a connection to a domain must be established by calling the RTConnect function of the Orchestra RT API Data items are published sent to the RT LAB Framework and subscribed to received from an RT LAB Framework by calling RTPublish and RTSubscribe respectively referring to data items by name The data exchange with a domain can be synchronous or asynchronous as specified by the Synchronicity QoS defined in the DDF For a synchronous connection calls to RTPublish and RTSubscribe must be enclosed between calls to functions that provide a locking mechanism Disconnection from a domain is achieved by calling RTDisconnect Disconnection can happen at any time after an external component has connected without affecting the RT LAB Framework Refer to chapter Functions reference on page 3 of the RTAPI Reference Guide
75. e Compilation duration Difference between end time and start time 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 though Toolbar The toolbar in the Compilation View contains the following buttons 190 RTLAB UG 104 00 a rs View Menu Compilation View DESCRIPTION Save As Saves the current output of the compilation to a specified text file Print Prints the current compilation output Clear Log Clears the current compilation output Build Starts a new build process Note that the previous compilation output will be cleared before printing the new compilation output Abort build Stops the current building process Search text Searches specified text in the compilation output Pin view to selection Pins the view to selection means that the Compilation View will fix the output to the current selected model So the output of the pinned Compilation View will not be updated if you select another model from the Project Explorer view and build it New View Creates a new Compilation View 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 models View Menu The Compilation View provides menu ite
76. editor Set Encoding This action launches a dialog that allows you to change the file encoding used to read and write the file in the active editor 282 RTLAB UG 104 00 Search menu Search menu This menu provides advanced search tools Search Ctri H This command will open the Search dialog File This command will open the File tab of the Search dialog Text This command searches for the currently selected text and displays results on the Search View The search may be performed within e Workspace e Project e File e Working set opens a dialog to select a Working set RTLAB UG 104 00 283 Search menu 284 RTLAB UG 104 00 Navigate menu Navigate menu This menu allows you to locate and navigate through resources and other artifacts displayed in the Workbench Last Edit Position This command allows you to jump the last edit position Go to Line This command allows you to jump to a specific line in the active editor RTLAB UG 104 00 285 Navigate menu 286 RTLAB UG 104 00 Tools menu Tools menu This menu provides access to external tools that interact with an RT LAB simulation Probe Control Opens the Probe Control Panel application for the currently selected Model ScopeView Launches the ScopeView application to acquire and display signals from real time simulation See Using ScopeView for more information Open Maltlab version Opens the current version of Matlab The version is display
77. field which is the name of your new variable 3 Fill the Value field which is the value of your new variable e Type a value Select a path to a file or a folder by clicking on the File or Folder button e Get the value of an host environment variable by clicking on the Variable button 4 Click on the OK button Select an environment variable RTLAB UG 104 00 145 Select Host Variables Variables list C include C Program Files Microsoft Visual Studio vC98 atl A C KMP_DUPLICATE_LIB_OK TRUE A C lib C Program Files Microsoft Visual Studio yC98 mfcilib C LOGONSERVER WADO1 MTL DO MKL_SERIAL YES C MSDevDir C Program Files Microsoft Visual Studio Corr C NIDAQmxSwitchDir C Program Files National Instrument C NIYIPATH C Program Files IVI Foundation IVI O NUMBER_OF_PROCESSORS 4 O OPIMAG_ROOT C OPAL RT OpIMAG1 2 1 C OPIMAG_VERSION v1 2 1 O os windows_NT C Path C Program Files Javafjre6 bin client C Program Fi O PATHEXT COM EXE BAT CMD VBS WBE JS JSE W Fj PROCESSOR_ARCHITECTURE x86 C PROCESSOR_IDENTIFIER x86 Family 6 Model 23 Steppir FT PROCESSOR I FW Al da B Select All Deselect All Environment Variables Page Sometime it can be useful to import an existing variable from the host system to the target nodes To select an existing environment variable on your host system 1 Click on the Select button 2 Select all the d
78. file in the Workbench Here is what the New File wizard looks like New File File Create a new file resource Enter or select the parent folder JaneQUser2 HS JaneQUser 12 JaneQUser2 File name file txt Parameters Enter or select the parent folder The resource in which the new file will be created Type or browse the list to select the resource The default value is the resource that was selected when you invoked the New File wizard File name The name for the new file including the file extension Advanced The Advanced button reveals or hides a section of the wizard used to create a linked file Check the Link to file in the file system checkbox if you want the new file to reference a file in the file system Use the field below the checkbox to enter a file path or the name of a path variable Use the Browse button to browse for a file in the file system Use the Variables button if you want to use a path variable to reference a file system file Related Concepts Linked resources RTLAB UG 104 00 329 New File wizard 330 RTLAB UG 104 00 Existing RT LAB model import wizard Existing RT LAB model import wizard This wizard explains how to import an existing RT LAB model to a project The model will be added to the select destination project inside the Models folder E Er Project Explorer 3 EE Targets a ES rtdemo Te CS File system Figure 8
79. for Snapshot 535 Working with perspectives 2 0 cee 537 Switching between perspectives 539 Specifying the default perspective 541 Opening perspectives 543 Changing where perspectives open 545 Configuring perspectives 547 Saving a user defined perspective 549 Deleting a user defined perspective 551 Resetting perspectives 553 Working with views and editors 555 OPENING VIEWS A a ar oh eee Bae ee ae Gee ee ac aes 557 Moving and docking views 559 Rearranging tabbed views 561 Creating fast views 563 Working with fast views 565 Detaching views u we ane ane dans ad Wald wea et 4 ae 567 Opening files for editing 569 Editing files outside the Workbench 571 Tiling editors na ee de eee ee anna aaa 573 Maximizing and minimizing elements of the workbench presentation575 Customizing the Workbench 579 Customizing the Welcome 581 Workspace Switching 583 Rearranging the main toolbar 585 Chang
80. for a description of the functions that are part of the Orchestra RT API Integration of external C code to an RT LAB model This section details the steps required to connect some C code to an RT LAB Framework e Add aC Proxy block to a subsystem of the Framework Configure the block by double clicking on it which opens the DDF Configurator graphical tool Specify a domain name and define a list of signals to be exchanged with the legacy C code Select items in the Publish set Framework gt Client to send the corresponding signals to external domain participants Reciprocally select items in the Subscribe Set to receive data from external domain participants e Build and load the RT LAB Framework like any other RT LAB model e In the legacy C code add calls to connect to the domain and publish subcribe calls to send signals to the RT LAB Framework and receive signals from it respectively e Compile and link the C code into a standalone process A C code sample is provided in the RT LAB distribution under the directory lt RT LAB installation dir gt Examples Features Orchestra C_Code src Integration of an external Simulink model to an RT LAB Framework e Add a Controller block anywhere inside the external Simulink model e Add Publish and Subscribe blocks where you want signals to be sent to and received from the RT LAB Framework e Build the model by using Simulink RTW A sample Simulink model that connects to an Orchestr
81. for string matching Wildcards The available wildcards for search expressions are displayed in the search dialog e matches any set of characters including the empty string e matches for any character e is the escape for a literal if you want to search for an asterisk question mark or backslash character type a backslash before it to indicate that you are not using these characters as wildcards e g 2 or Search In Select where in the scope to search for results e Name e Alias e Path e Unit e Description e Any Element Limit To Select to limit your search results to one of the following kinds of matches e Projects e Models e SubSystems e Blocks e Parameters e Signals e Alias e Variables e All occurrences 360 RTLAB UG 104 00 RT LAB Search Scope Select to limit your search results to one of the following scopes e Workspace all projects in the workspace are included in this search e Selected resources only the type hierarchy of the selected element is included in this search e Enclosing Projects the projects enclosing the currently selected elements e Working Set only resources that belong to the chosen working set are included in this search Press Choose to select or create a working set Related concepts Views Working Sets Toolbars Related tasks Opening views Moving and docking views Related reference Search View RTLAB UG 104 00 361 RT LA
82. global performances Model and project states Models A Model may be in different states depending on the actions performed by the user on it 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 pa rtdemoi Running Figure 7 Model state running Projects When an RT LAB project is closed or collapsed its state is displayed in three cases e If at least one of its Models is currently Loading Paused Running or Resetting the project is in the global state Running pal RT Demo Running Figure 8 Project state running e 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 LJ RT Demo Active Figure 9 Project state Active e If at least one of its Model was Loading Paused Running or Resetting but does not respond anymore its state is set to Active amp not responding EI RT Demo Active amp not responding Figure 10 Project state Active but not responding When an RT LAB project is Active amp not responding it cannot be opened If for some reason one of its models is definitely lost f
83. his Oms 116 Ome tacpt _ DO 8P_D0 data reformating i from uint32 to double to_camer double to unit32 Op Ctrl Reconfigurablel O OpComm convert Added Wb Ouemuns Nb Owerruns bdel calculation time Rst Overrun s Effective step size siminfo_s Total step sie Op Simulation Info FixedStepDiscrete Figure 21 Example of a CPU model In this particular example the inports of the OpCtriReconfigurableIO block placed in the CPU model are connected to signal generators that generate samples to be transmitted to the OP5130 at a rate of Ts 200us These signal generators create a saw a sin and a square waveform Notice that these signals pass through a subsystem named double to uint32 convert that converts the generators double type signals to the uint32 type This is the default type supported by the OpCtrl ReconfigurablelO on either its inputs or outputs Besides doing signal conversion the subsystem does signal scaling and concatenation Scaling is necessary before the type conversion so that decimal values are not truncated In this particular case the waveform signals are routed to a DAC interface in the FPGA XSG model which expects the Xilinx Fix16_11 format So a Shift Arithmetic block shifts the three waveform signals by 11 bits to the left i e multiply them by 2111 Concatenation y Vu 2 4 py Qu lt lt 11 Ey Eu y Vu 2 by Qu lt lt 11 Ey Eu square square_out Scaling to Fix16_11 fort
84. is not fully compatible with Internet Explorer or Mozilla or has JavaScript disabled the help view shown in the browser might be a simplified version RTLAB UG 104 00 419 Help preferences 420 RTLAB UG 104 00 General preference page General preference page General settings for the Workbench The term Workbench refers to the desktop development environment Each Workbench contains one or more perspectives Perspectives contain views and editors and control what appears in certain menus and tool bars The following preferences can be changed on the General preference page Always run in background Turn this option on to perform long running operations in the background without blocking you from doing other work Keep next previous part dialog open If this option is turned on then the editor and view cycle dialogs will remain open when their activation key is let go Normally the dialog closes as soon as the key combination is release Off Show Heap Status Turn this option on to display an indicator showing information about current Java heap usage Open mode You can select one of the following methods for opening resources e Double click Single clicking on a resource will select it and double clicking on it will open it in an editor e Single click Select on hover Hovering the mouse cursor over the resource will select it and clicking on it once will open it in an editor e Single click Open when using arrow k
85. item To add a text description to a data item select the item in the Explorer View this will show the Properties View for the item Enter a text description under the field entitled Description For Item item name then press Enter Adding a default value for a data item To add a default value to a data item select the item in the Explorer View this will show the Properties View for the item Enter a default value under the Default Value For Item item name then press Enter The value is accepted if the format is acceptable as a C code definition of a double precision float Note that a default value can only be assigned to a data item that belongs to the Subscribe set of a domain namely the CLIENT gt FRAMEWORK set In addition the type byte doesn t support default values Saving the content of the Explorer View If the Explorer View contains data read from an existing DDF the current content of the Explorer View is saved to that same DDF by selecting the Save gt File item on the toolbar menu If no DDF has been opened the current content of the Explorer View can be saved to either a new DDF or a new CSV file To do so select the Save As menu item from the File menu then choose the desired file format Importing an existing DDF Select the File gt Import item on the toolbar menu then choose the DDF item A dialog allows you to pick the DDF The DDF is opened and parsed then it is adde
86. load operation RTLAB UG 104 00 143 Environment Variables Page Restricted clock time step us For advanced user only Defines the Clock Period in microseconds specified by the user for the Use Restricted mode option Only available when the Use Restricted mode option is enabled Performance Properties Performance Properties Set the performance properties of the model Enable detection of overruns Action to perform on overruns Continue Perform action after N overruns Number of steps without overruns 10 Enable detection of 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 parameters is checked RT LAB detects overruns and performs the action specified in the Action to perform on overruns field This property has no effect in simulation mode Action to perform on overruns Type of action to perform when overruns are detected Here are the available types e Continue No action is perform Number of overruns will simply be displayed during the next pause reset of model e Reset A reset of the model is performed when the number of overruns reaches the value of the Perform action after N overruns field e Pause A pause of the model is executed when the number of overruns reaches the value of the Perform action after N overruns field Perform action ater N overruns Pe
87. need to be computed many times between each major time step in order to maintain numerical accuracy The XHP Mode by far out performs any other real time system and is particularly useful for modeling electrical systems such as drive controls and power electronics Intended Audience and Required Skills and Knowledge MATLAB or MATRIXx MATLAB and MATRIXx are technical computing software packages that integrate programming calculation and visualization MATLAB and MATRIXx also include Simulink and SystemBuild respectively these software packages are discussed below As RT LAB works in conjunction with these environments to define models you must be familiar with aspects of MATLAB as related to Simulink and aspects of MATRIXx as related to SystemBuild RTLAB UG 104 00 If you are intending on gathering data from one system and then process the data offline for example you must know how to save the data and retrieve it using MATLAB or MATRIXx and to display data through the different on screen tools available within the software 1 3 2 Simulink or SystemBuild Simulink and SystemBuild are software packages that enable modeling simulation and analysis of dynamic systems You describe their models graphically following a precise format based on a library of blocks RT LAB uses Simulink or SystemBuild to define models that will be executed by the real time multiprocessing system and defines its own simulation parameters through Simulink s o
88. of the parameters Enable controller log s Creates a file called Controller log in the RTLAB_ROOT common bin folder for debugging use This file reports all operations perform on the model during the life cycle of your project Note also that it reports also other internal operation related to the controller of your project Unchecked by default default value false Enable extended timeout All timeouts are extended when this option is enabled It is typically used when debugging the model default value false Enable watchdog Enables or disables the Watchdog functionality The Watchdog ensures that all nodes are running normally There are as many watchdogs as there as computation subsystems in the model At regular user defined time intervals the watchdog verifies that the model is still running and that processes are still active If an error occurs the watchdog stops the simulation This option is not available on Windows target default value true Watchdog timeout ms The regular user defined time interval the watchdog verifies the model is still running 5000 ms by default default value 5000 Compile model 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 default value false RTLAB UG 104 00 375 Debugging preference page 376 RTLAB UG 104 00 Environment Variables preference p
89. only available when working with a Windows target e 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 e g on QNX6 1 the smallest sampling time available is 500 us e Hardware Synchronized in this mode an I O board clock is used to synchronize the entire simulation Real Time communication link type Sets the target cluster s communication medium Here are the available choices for each target platform e XP Vista 7 system UDP IP e QNX 6 x OHCI UDP IP e RedHat OHCI UDP IP SCI INFINIBAND 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 Because the model always uses the basic calculation step changing the time factor for the I O may give results which differ from the offline simulation This parameter should be used only to determine the simulation s minimum calculation step Once this step is determined this parameter must be brought back to a value of 1 The model s basic calculation step must be updated accordi
90. preferred operating system for the target nodes is QNX or Red Hat Linux When there are multiple target nodes one of them is designated as the compilation node The Command Station and target node s communicate with each other using communication links and for hardware in the loop simulations target nodes may also communicate with other devices through 1 0 boards The target nodes are real time processing and communication computers that use commercial processors These computers can include a real time communication interface like FireWire Infiniband or cLAN depending on the selected OS as well as 1 0 boards for accessing external equipment The real time target nodes perform e real time execution of the model s simulation e real time communication between the nodes and I Os e initialization of the I O systems e acquisition of the model s internal variables and external outputs through I O modules e implementation of user performed online parameters modification e recording data on local hard drive if desired e supervision of execution of the model s simulation and communication with other nodes The compilation node is used to compile generated C code Any target node could be the compilation node RTLAB UG 104 00 13 Introduction Various analog digital and timer 1 0 boards are supported by RT LAB These enable connection to external equipment for applications such as HIL 14 RTLAB UG 104 00 Getting Started Co
91. probeControl will be automatically connected to this model In all other cases you are required to click on Connect to choose a model from a list of running simulations The ProbePanel is then said to be standalone In this configuration it receives some important notifications from the target nodes such as System Paused System Reset System Error etc Group Control Settings Figure 50 GroupControl Settings Group Information panel The Group info panel displays additional information about the configuration and settings of an acquisition group E Group info Total number of signals Number of different subsystems that send signals to this group Subsystem Name Loa Id File Name Variable Name sm_controller localhost MyFile_Gr1_Gr1_controller_1 mat MyYar_Grl_Gr ss_plant localhost MyFile_Gri_Gr1_plant_3 mat MyVar_Gri_Gr Close Figure 51 Group info RTLAB UG 104 00 238 Probe Control Panel Following is a description of the parameters of the dialog Subsystem Name Name of target subsystems Logical Id Logical Id of corresponding subsystem assigned by RT LAB Nb Signals Number of signals that the corresponding subsystem sends to the group Target Node Name of the target node to which the corresponding subsystem is assigned File Name Name of the file saved by the corresponding subsystem on the target when writing to file Variable name Name of the variable associated with the file if write to
92. probes constantly Get probes from the running simulation It acquires consecutive acquisition frames until an overrun is detected or until the stop button is pressed Stop probes Stop consecutive monitoring acquisition E Save as u Save monitoring information as a CSV file CSV file can be easily imported into an Excel worksheet ay Show next overrun Find in the current acquisition frame the next step where an overrun occurred Select probes Select the probes to be display in the monitoring view by selecting filters based on their name RTLAB UG 104 00 Monitoring View Menu The menu of the Monitoring view contains the following items DESCRIPTION Select content gt Start and Stop times Select the content to be display in cells of all steps acquired during a frame When the start and stop times are selected the cell contains in addition to the probe s duration the probe s start and stop time Sort By Allow sorting the probes in the monitoring view by name by chronological order or by the default order Units Open a dialog that allows configuring the units used in the monitoring view Properties Open a dialog that allows configuring the main acquisition setting of the monitoring view Context Menu The context menu of the Monitoring view contains the following items DESCRIPTION Copy Copy the selected cell to clipboard Delete Delete the selected probe from the list of visible probes When delete
93. process is aborted Creating a data item RTLAB UG 104 00 DDF Configurator Data items are created inside the Publish or the Subscribe set of a domain There are 2 ways to create a new data item e right click either the Publish or the Subscribe set of a domain this causes a pop up menu to appear Select the Add Item item on the pop up menu e select either the Publish or the Subscribe set of a domain then select the Item gt Add New Item item on the toolbar menu The default data type for a new data item is double Once an item has been created you can add a description for it in the Properties View This description will be saved inside a DDF so that it can be displayed again the next time the DDF is open A newly created item is automatically assigned the name new Item where represents a positive integer that increases sequentially Note that data items are sorted in lexicographical alphabetical order when they appear inside a data set Renaming a data item Select the data item to rename then double click or press the F2 key The data item name is editable enter the new data item name and press the Enter key If the new name doesn t match a name existing in the domain the data item is renamed otherwise an error message is displayed and the data item name is changed back to its previous value Note that all leading and trailing spaces are removed from the item name Adding a text description for a data
94. 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 retrieve directory RTLAB UG 104 00 Properties View 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 will be 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 Type of action to perform when overruns are detected Here are the available types e Continue No action is perform Number of overruns will simply be displayed during the next pause reset of model e Reset A reset of the model is performed when the number of overruns reaches the value of the Perform action after N overruns field e Pause A pause of the model is executed when the number of overruns reac
95. sm_computation subsystem and add a Gain block between OpComm block and output of subsystem Note that step correspond to the edition of your model 7 MyModel File Edit View Simulation Format Tools Help gt HS amp me gt LE u Int Normal Template model with 1 subsystem sm_computation sc_user_interface 7 MyModel sm_computation File Edit View Simulation Format Tools Help D a amp 4 Es E 1 act ca gt lint Toma a amp bal F Computation is done in this subsystem OpComm e Save the mod le and close MatLab RTLAB UG 104 00 41 42 Editing the model RTLAB UG 104 00 Preparing the build configuration Preparing the build configuration Before building your model for real time it is necessary to prepare the build configuration of the model e Activate the Project Explorer view e Select the model MyModel in the Project Explorer view e Double click the model to open its editor e Select the Development page of the editor e Select the target platform or operating system corresponding to your target node e Note that the tabs of the Development page allow to configure the compiler and linker options RTLAB UG 104 00 43 44 Preparing the build configuration RTLAB UG 104 00 Building the model Building the model Now that your model and RT LAB are configured here how to build your model with RT LAB Activate the Project Explorer view Select the mod
96. the possible compiler options e g xxx Development Compiler user include path Target path s where user include files can be found Used to search for include files required to compile user written code when the include files do not reside in already searched paths RTLAB UG 104 00 207 Properties View Development Compiler user source files Names of source files to be compiled in addition to the code generated by RTW AutoCode 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 can be found Used to search for libraries other than the MATLAB MATRIXX 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 this option is 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
97. the Display View is updated during this operation Display information for the master and slave subsystem e Synchronized step e 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 e Number of overruns detected during simulation e Timestamp of when the model has been paused Reseting a model 194 RTLAB UG 104 00 Display View When reseting 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 e Number of overruns detected during simulation e Timestamp of when the model has been reset e 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 occured on the model For example when modifying some parameter values the display view indicates that some parameters have been updated The display provides many other useful information when actions are performed on the simulation or when changes occur on the model Toolbar The toolbar in the Display View contains the following buttons IC
98. the view underneath the cursor Dock to the left If the mouse button is released when a dock to the left cursor is displayed the view will appear to the left of the view underneath the cursor Stack If the mouse button is released when a stack cursor is displayed the view will appear as a tab in the same pane as the view underneath the cursor Restricted If the mouse button is released when a restricted cursor is displayed the view will not dock there For example a view cannot be docked in the editor area 81 82 Drop cursors RTLAB UG 104 00 Rearranging views Rearranging views The position of the Project Explorer or any other view in the Workbench window can be changed e Click in the title bar of the Project Explorer view and drag the view across the Workbench window Do not release the mouse button yet e While still dragging the view around on top of the Workbench window note that various drop cursors appear These drop cursors see previous section indicate where the view will dock in relation to the view or editor area underneath the cursor when the mouse button is released Notice also that a rectangular highlight is drawn that provides additional feedback on where the view will dock e Dock the view in any position in the Workbench window and view the results of this action e Click and drag the view s title bar to re dock the view in another position in the Workbench window Observe the results of thi
99. toolbar buttons There are four types of merges that can be performed e Copy whole document from left to right e Copy whole document from right to left e Copy current change from left to right e Copy current change from right to left Typically the copy whole document actions are used when the entire file on either the left or right can just be replaced by the contents of the other file The Copy current change buttons allow a single change to be merged e Ensure that the second difference is selected RTLAB UG 104 00 107 Working with comparison e Click Copy Current Change from Right to Left Observe that the selected text from the right file is copied to the left file e Close the compare editor and choose Yes to save the changes Alternatively save the changes by choosing File gt Save Ctrl S 108 RTLAB UG 104 00 Local history Local history Every time an editable file is saved in the Workbench the Workbench updates the local history of that file and logs the changes that have been made The local history of a file can then be accessed and a previously saved copy of the file can be reverted to as long as the desired state is recent enough in the save history e Create a new file named file3 txt e In the editor for file3 txt modify the file by adding the line change1 and saving the file e Repeat this by entering a new line change2 and saving it again e Add a third line change3 and save it again e
100. triggered meaning that a new data packet is filled as soon as the previous packet is sent Sometimes however you may want to receive data only when a certain condition occurs For this reason the OpTrigger block can be inserted into the subsystem containing the acquisition group signals The OpTrigger block is used to acquire data triggered by a specific signal enabling you to acquire information from a specified parts of the simulation only For complete details about OpTrigger and its parameters see the online help Recording Data with OpWriteFile To obtain all data for any particular signal use the OpWriteFile block Data recorded with this block is stored on the target real time node s hard drive The data file is automatically transferred to the command station when the model is reset Sometimes in simulations with fast sampling times the acquisition data loss on the command station is too significant to clearly understand what is happening in the real time model The Simulink library ToFile block cannot be used in real time simulations because it does not have a buffering system RTLAB UG 104 00 477 Understanding Data Reception Using this block in a real time context without a buffer would significantly increase the real time simulation s effective step size A real time write to file block OpWriteFile can be inserted into the computation subsystem This block enables data in MATFILE format to be saved to the real time no
101. type selected above Note Any editor that is bound by content type may not be removed from this list Currently there is no mechanism available to remove these editors Default Sets the selected editor as the default editor for the file type selected above The editor moves to the top of the Associated Editors list to indicate that it is the default editor for that file type RTLAB UG 104 00 417 File Associations preference page 418 RTLAB UG 104 00 Help preferences Help preferences On the Help preferences page you can indicate how to display help information Use external browsers If embedded web browser is supported on your system help window uses an embedded help browser to display help contents whenever possible and this option is available Select it to force help to use external browsers Use Web Browser preference page to select browser to use Open window context help This option allows you to determine whether the window context help will be opened in a dynamic help view or in an infopop Open dialog context help This option allows you to determine whether the dialog context help will be opened in a dynamic help section of help view or in an infopop Open help view documents This option allows you to determine whether the documents selected in the help view will be opened in place or in the editor area Note Selection performed on this page can affect how the help view is presented If the selected browser
102. updated accordingly by setting the correct value in the Simulink SystemBuild model and by recompiling it Stop time This value in seconds specifies when the model will stop If value is Infinity the model will execute forever You don t need to recompile the model to apply a new value default value Infinity Pause time This value in seconds specifies when the model will pause If value is Infinity the model will execute until a reset is done except if a stop time is specified default value Infinity Use Restricted mode For advanced user only This setting can be used only when the model s current target platform is QNX 6 x When this platform is selected a given model can be loaded either in Free Clock mode or in Restricted Clock mode default value false e In Free Clock mode the user can load one non Software Synchronized model on a given target node and is free to use any time step value within the boundaries of the QNX 6 x restrictions If the user tries to load another non Software Synchornized model on the same target node it will be stopped with a relevant error message e In Restricted Clock mode the user can load a series of non Software Synchronized models on a given node In this mode each model time step must be consistent i e a multiple of with a specific base Clock Period that should be specified by the user Each time an additional model is being loaded on this specific t
103. view in the RT LAB Edition perspective local help will find and present topics describing Project Explorer view or Edition perspective The Related Topics page tracks changes in the workbench and continuously updates displayed information RTLAB UG 104 00 253 Help view All Topics 3 All Topics 4 Workbench User Guide 1 OS PyDev User Guide H RT Lab I O Block Library Reference Guide 4 gt RT Lab User Guide Go To search B Related Topics CN Bookmarks H Index The All Topics page shows the table of contents It is a hierarchy of all help topics arranged in a tree The tree branches can be expanded to browse topics that can be displayed using a single mouse click 254 RTLAB UG 104 00 Search The Search page allows locating local topics cheat sheets welcome content remote documents and other documents given a search query Links to search hits are displayed along with a summary of topic contents Search scope controls a subset of documentation being searched Multiple search scopes can be configured each defining a custom set of resources from among local documentation additional local search engines or remote engines on the web Index The Index page provides an index of keywords that direct the user to specific help topics similar to indexes found at the back of a book As you type in the text field the best match will automatically be highlighted in the list of keywords Pressing enter or clicking on
104. wizard This action may also be done using Drag and Drop Subsystem RTLAB UG 104 00 185 Project Explorer Here are the 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 informations about this Subsystem Console Here are the menu entries for Console Subsystems Edit Simulink models only Opens this Console for edition in Matlab Simulink Target Folder Here are the menu entries for Target Folder New e New Target Opens the New Target wizard Discover Targets Performs a target detection over the network and opens the Detected Targets Wizard Target Here are the menu entries for Target Note that some entries may not be available depending on the current platform of the selected Target New e New Target Opens the New Target wizard Install e RT LAB Automatically install or re install the current version of RT LAB on this Target e Patch Opens a dialog to select a Patch file to be sent and installed on this Target Patch files are either rpm files for RedHat Targets either tgz files for QNX Targets Execute e Shutdown Shutdown this Target A confirmation dialog is displayed first e Reboot Reboot this Target A dialog is displayed first to select the Operating System to be started e Remove Embedded Mode If an E
105. you load a file that was generated using a different model You may compare this information with the current model information Current Model Information History information of the current selected model in the Project Explorer in which the parameter values will be loaded Useful when you load a file that was generared using a different model You may compare this information with the previous model information Solving Structural Differences RT LAB allows you to load a file that contains structural differences between the previous model content when the files were saved and the current model contents However you will have to specify a strategy to adopt to solve conflicts for each removed renamed or moved parameters The selection of the strategies is performed using the second page Load Parameters File Load Parameters File This page lets you solve structural differences between the parameters found in the previous model used to save the parameters and the current model For each difference select a parameter from the current model that matches the corresponding previous model parameter fs Structural differences 21 total differences 1 3 resolved differences Status Previous parameter list revision 1 98 Current model parameters revision 1 98 CI Unresol El redemo1 sm_computation Sensor response time2 DelayTime al Resolved rtdemol sm_computation Gain Kp Gain2 ttdemoi sm_computation Gain Kp Gain UT Unresol b
106. 0 txqueuelen 1000 RX bytes 962152167 917 5 MiB TX bytes 3491186374 3 2 GiB Link encap Local Loopback inet addr 127 0 0 1 Mask 255 0 0 0 inet6 addr 1 128 Scope Host UP LOOPBACK RUNNING MTU 16436 Metric 1 RX packets 96 errors 0 dropped 0 overruns 0 frame 0 TX packets 96 errors 0 dropped 0 overruns 0 carrier 0 collisions 0 txqueuelen 0 RX bytes 5456 5 3 KiB TX bytes 5456 5 3 KiB RT LAB TestNachine gt gt Figure 33 Target Console overview e A Log Console that provides internal debug information This Console can only be used if the Advanced User Capabilities preference page is enabled RTLAB UG 104 00 215 E console 3 RT Lab log Checking MetaController OK Checking RT Lab license OK Workspace created Project RT Demo opened ia Figure 34 Log Console overview Console View CICR iv Several Console Views may be opened at the same time in the workbench but they all share the same list of Consoles To add a Console View to the current perspective click Window gt Show view gt Other gt RT LAB gt Console or use the Open Console button of an existing Console View See below This is useful when you want to display several Consoles side by side for example to compare two command outputs Toolbar The toolbar of the Console View provide some commands that are common to all Console types Command Name FA Clear Console SE Scroll Lock Pin Console g Display Select
107. 04 00 573 Tiling editors 574 RTLAB UG 104 00 Maximizing and minimizing elements of the workbench presentation Maximizing and minimizing elements of the workbench presentation RT LAB presentation provides a rich environment consisting of in its basic form an Editor Area containing one or more stacks showing the open editors surrounded by one or more View Stacks each containing one or more views These various parts compete for valuable screen real estate and correctly managing the amount of screen given to each can greatly enhance your productivity within the IDE The two most common mechanisms for managing this issue are minimize i e make me use as little space as possible and maximize i e give me as much space as you can The RT LAB presentation provides a variety of ways to access these operations e Using the minimize and maximize buttons provided on a stack s border e Selecting the Minimize or Maximize item on the context right click menu for a stack e Double clicking on a stack e Using Ctrl M this is a key binding for a command that will toggle the currently active part between its maximized and its restored i e normal states Maximize It is desirable at times to focus your attention on one particular part to the exclusion of the others The most popular candidate for this is of course maximizing the editor area in order to make as much of the display available for editing as possible but the
108. 3 e Specify corresponding options to identify a particular board if several boards of the same type are present in the Target For example specify the slot ID of a TestDrive module If no option is specified RT LAB will flash the first board that it finds e Select the bitstream file to be used The browse dialog will only show compatible files RTLAB UG 104 00 337 Flash bitstream wizard Select a bitstream Select board type TestDrive Spartan 3 Y Module 45M Analog Sensor Module Board Index Automatic Slot ID 1 Force flash operation Bitstream file Select from workspace bitstreams Bitstreams TestDrive Spart O Select from disk O Select from target Log result to a file Figure 93 Flash bitstream wizard example Alternatively you can browse first for any bitstream file In this case the board type will be detected and automatically selected Then you can adjust options such as board ID or slot ID to flash a particular board Similarly the Flash bitstream wizard wizard can be opened by dragging and dropping a bitstream file from the workspace or the file system to any Target of the Project Explorer The bitstream file may be located in the workspace on the local file system or on the Target If necessary the selected file will automatically be transferred to the Target and will be available in the folder
109. 3 MEE Subsystem Assignation Adds the name of the assigned target next to models if applicable or subsystems 4 gt rtdemo2 Py sc_user_interface PH sm_master gt Target_231 Pl ss_slave gt localhost Problem icons Adds an overlay icon to RT LAB items to show errors and warnings a rtdemol Dig sc_user_ interface a sm_computation Problem messages Adds a message next to RT LAB items to describe errors and warnings a rtdemo2 lt Invalid assignation gt Py sc_user_interface 2a sm_master lt Target is down gt Ba ss_slave lt Platform mismatch gt Others needs the Advanced Capability Opens the Label Decorations preference page Active Projects The 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 Project Explorer 3 BSO myproject E e Targets g RT Demo EH Models gt redemol rtdemo2 gt rtdemo3 E i Figure 12 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 possible interaction with it RTLAB UG 104 00 Project Explorer 177 Project Explorer If you want to see the content of this project and to interact with it you need to import it to your Workspac
110. 4 00 Internal Web Browser view This view allows you to display web pages By default it is used to display web pages when they are opened from the workbench You can modify this setting in the Web Browser preference page RTLAB UG 104 00 267 268 RTLAB UG 104 00 Markers view This view shows problems tasks and bookmarks that has been add to your resources By default the Markers view is not included in the RT LAB Edition perspective To add it to the current perspective click Window gt Show View gt Other gt General gt Tasks The Description column contains a description of the line item You can edit the description of user defined tasks by selecting Properties from the context menu The Resource and Path columns provide the name and location of the resource associated with each line item The Location column indicates the line number of the line item within its associated resource The Type column indicates the type of marker of the line item problem task bookmark RTLAB UG 104 00 269 270 RTLAB UG 104 00 Navigator view This view shows resources in the workspace It display projects and other resources that you are working with Related concepts Project Explorer RTLAB UG 104 00 271 272 RTLAB UG 104 00 Outline view The Outline view displays an outline of a structured file that is currently open in the editor area and lists structural elements The contents of the Outline view are editor specif
111. 8 Models folder The next sections show how to import an existing RT LAB model to a project By default the Project Explorer view is included in the Edition perspective To add it to the current perspective click Window gt Show view gt Other gt General gt Project Explorer How to import an existing RT LAB model To import an existing model click on the Import menu item Right click on the project destination folder to open the contextual menu Project Explorer 3 ES os hy Targets mn E New Add gt Copy Delete Rename L Export Figure 89 Import menu This operation has opened the Import dialog In this dialog select the Existing RT LAB model from the folder RT LAB Click Next 331 RTLAB UG 104 00 332 Existing RT LAB model import wizard Select Import RT LAB model From the local file system into an existing project Select an import source type Filter text ECS General E Archive File t Existing Projects into Workspace C File System E Preferences RT LAB 2 gt Run Debug gt Team Figure 90 Import dialog The import existing RT LAB model step is show To quickly import the model click on the Browse button to find the model s file to add to the project Verify if the project field is the desired destination folders Click the Finish button to import the files to the project folder Also it is possible to change the defa
112. Action sets buttons and menu options that show up on the toolbar and menu bar To configure a perspective e Switch to the perspective that you want to configure e Select Window gt Customize Perspective e Expand the item that you want to customize e Use the checkboxes to select which elements you want to see on drop down menus in the selected perspective Items you do not select will still be accessible by clicking the Other menu option e Click OK Related concepts Workbench Perspectives RTLAB UG 104 00 547 Configuring perspectives 548 RTLAB UG 104 00 Saving a user defined perspective Saving a user defined perspective If you have modified a perspective by adding deleting or moving docking views you can save your changes for future use e Switch to the perspective that you want to save e Click Window gt Save Perspective As e Type a new name for the perspective into the Name field e Click OK The name of the new perspective is added to the Window gt Open Perspective menu Related concepts Perspectives Views RTLAB UG 104 00 549 Saving a user defined perspective 550 RTLAB UG 104 00 Deleting a user defined perspective Deleting a user defined perspective You can delete perspectives that you defined yourself but not those that are delivered with the Workbench e Open the General gt Perspectives preference page e From the Available perspectives list select the one that you want to d
113. After these steps have been completed RT LAB begins the compilation process with the regrouped file separating the model and generating and compiling the code You then sets execution settings which are covered in the following chapters after which point the model s simulation is ready to be executed This chapter describes the steps necessary to build an RT LAB model by modifying your Simulink or SystemBuild block diagram to ensure it is properly separated for distributed execution and to maximize its performance In this release distribution of Systembuild models is not supported RTdemo2 example 460 This model consists of e Plant The physical system being controlled e Controller A device that receives data from the sensors and based on the results of a control algorithm calculation sends control signals to actuators so as to induce desired behavior in the plant e Human interface Provides for human interaction with the system This logical separation will be used to create the top level subsystems RTLAB UG 104 00 pega Building a distributed Model for RT LAB CL ES Fle Edt Wew Simulation Format Took Help Ola OS ER QS D from us unseren E plast ipone amy EErEE Senden fana Todo top ee Simple second order plant with PID control RTLA _user_intertace OP 2 p jim Jimo Figure 2 rtdemo2 model OpComm communication blocks Once the
114. B Search 362 RTLAB UG 104 00 License Request Dialog License Request Dialog This dialog is available from the Help menu Help gt Request a license It also appears at startup if your license file is missing or expired Here is what the dialog looks like 68 License Request Ea License request Select a network interface and request a license from Opal RT IP address MAC address 20 CF 30 AC 9F 6D j Copy to clipboard 192 168 101 1 00 50 56 C0 00 01 192 168 162 1 00 50 56 C0 00 08 Request a trial license Migrate your license Figure 104 License Request Dialog The license file will be attached to the selected network interface The default address is selected when the dialog is opened Copy to clipboard Copy the selected MAC address to the clipboard If an Internet connection is available you can open a pre filled web form and send the request immediately Request a license Activate a permanent software license Request a trial license Trial Licenses of RT LAB are available upon request to qualified organizations A Trial License enables the evaluation of RT LAB for a 30 days period Migrate your license If you just downloaded an Opal RT software upgrade or if you are seeking to migrate your Opal RT software license to a new hardware platform RTLAB UG 104 00 363 License Request Dialog 364 RTLAB UG 104 00 Preferences Preferences
115. B 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 Here are the 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 or Matrixx SystemBuild based on the type of this Model Edit With Simulink Models only 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 preference page to edit this setting Simulation Provides access to simulation commands such as Load Execute Reset See Simulation menu Properties Opens the Properties View to display informations 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 That will create an associated Model object See Model If this model file has already been added to this RT LAB project the menu is grayed and disabled Note that this action will be directly executed without opening the Add Model
116. C code into an executable file for RT LAB 1 Retrieval of Executables retrieve the executable s via FTP This allows RT LAB to load a subsystem on a different node that the compilation node Assign the subsystems to a physical nodes You can assign more than one subsystem to one physical node If there are more than one processor logical node then the load will automatically be distributed among the processors If there is only one processor then RT LAB will rely on the RTOS to perform the task switching between the subsystem processes This is about equivalent to not distributing the model Select Handle console automatically from Simulation Tools Page from Model Editor if you want to use the user interface based on the original model s SC subsystem Select a simulation mode Configure the communication type optional Load the subsystem on the computation node s The executables one per computation subsystem are transferred to their assigned nodes using the FTP protocol The subsystems are then loaded and ready to run Note that only one model per target is allowed by default to ensure real time integrity QNX and Red Hat only This option could be disabled by creating a file usr opalrt multimodels on the target where you want to enable multiple running models at the same time Execute the model The simulation is started The RT LAB generated console starts displaying the data retrieved Note that it is NOT the original model
117. Explorer RTLAB UG 104 00 Files Files The project model and file that you create with the Workbench are all stored under a single directory that represents your workspace The location of the workspace was set in the dialog that first opens when you start the Workbench If you have forgotten where that location is you can find it by selecting File gt Switch Workspace The workspace directory will be displayed in the dialog that appears IMPORTANT After recording this location hit Cancel to close the dialog or the Workbench will exit and re open on whatever workspace was selected All of the project model and file that you create with the Workbench are stored as normal directories and files on the machine This allows the use of other tools when working with the files Those tools can be completely oblivious to the Workbench A later section will look at how to work with external editors that are not integrated into the Workbench RTLAB UG 104 00 67 68 Files RTLAB UG 104 00 Deleting resources Deleting resources Here are instructions on how to delete the Python script file e Select file MyScript py in the Project Explorer view e To delete the file do one of the following e From the project s pop up menu choose Delete e Press the DEL key e Choose Edit gt Delete from the main menu e A prompt will ask for confirmation of the deletion Accept and click Yes The same steps work for any resource shown in the
118. Explorer view slides out from the shortcut bar e You can use the Project Explorer fast view as you would normally e To hide the fast view simply click off of it or click on the Minimize button on the fast view s toolbar Note If you open a file from the Project Explorer fast view the fast view will automatically hide itself to allow you to work with the file To convert a fast view that has been maximized back to a regular sized view select Restore from the context menu of the icon in the top left corner of the view To reposition a fast view drag the fast view s title bar or close the fast view and then drag its button from the shortcut bar and drop it on the workbench like a normal view Related concepts Views Fast views Perspectives RTLAB UG 104 00 565 Working with fast views 566 RTLAB UG 104 00 Detaching views Detaching views Detached views are views that are shown in a separate window with a smaller trim They work like other views except they they are always shown in front of the Workbench window It is support on Windows only To detach a view e If the Workbench window is maximized resize it so that it does not fill the entire screen e Click the title bar of the view that you want to detach Hold the mouse button down e Drag the view to the outside of the Workbench window and release the mouse button To restore the view to be shown inside of the Workbench window drag it into the Workbench window You
119. G 104 00 263 264 RTLAB UG 104 00 Tasks view The Tasks view displays tasks that you add manually You can associate a task with a resource in the Workbench but this is not required By default the Tasks view is not included in the RT LAB Edition perspective To add it to the current perspective click Window gt Show View gt Other gt General gt Tasks The first column indicates whether the task is completed Completed tasks are flagged with a check mark which you add manually The second column indicates whether the task is high normal or low priority The Description column contains a description of the line item You can edit the description of user defined tasks by selecting Properties from the context menu The Resource and Path columns provide the name and location of the resource associated with each line item The Location column indicates the line number of the line item within its associated resource Toolbar The toolbar of the Tasks view includes the following buttons Add task Manually add a to do item to the Tasks view Delete Delete the selected line item Filter Filter the view according to the type of item Menus Click the icon at the left end of the view s title bar to open a menu of items generic to all views Click the upside down triangle icon to open a menu of items specific to the Tasks view Right click inside the view to open a context menu Adding line items in the Tasks view
120. Help MN gt MN E E Lt 555 Project Explorer LE IB filet txt B File2 Ect LS Project1 H Models tS File system R TEE ES file2 txt Editors TER ES Edition E file3 txt EA ES file3 txt ES This is a sample text file There is not much else we can really say about it than it has five lines of text that are rather dull ER Project1 file1 Ext If a resource does not have an associated editor the Workbench will attempt to launch an external editor registered with the platform These external editors are not tightly integrated with the Workbench and are not embedded in the Workbench s editor area On Windows if the associated editor is an external editor the Workbench may attempt to launch the editor in place as an OLE document editor For example editing a DOC file will cause Microsoft Word to be opened in place within the Workbench if Microsoft Word is installed on the machine If Microsoft Word has not been installed Word Pad will open instead RTLAB UG 104 00 Views Views The primary use of Views is to provide navigation of the information in the Workbench For example e The Project Explorer view displays the RT LAB Workbench projects their folders and files e The Compilation view displays the build outputs perform on models e The properties view displays property names and values for a selected item such as a resource A view might appear by itself or stacked with othe
121. I rtdemot sm_computation ctuator response time DelayTime2 Ga Ces Gata Com EC ts Visualization of structural differences Previous parameter list revision 1 98 A Current parameter list revision 1 98 E JU Gain Kp 24 sm_computation Integrator3 J Sensor response time E JU Gain Kp I Integratori 7 Actuator response time I Gain Ki DelayTime2 171 Gaini 1 Pf Cain A sin va 346 RTLAB UG 104 00 Load Parameters wizard The Structural Differences list at the top of the page displays all parameters loaded from the file that do not exist in the current running model because they were deleted renamed or moved since the writing of the parameter file Depending on the modifications that were done on the model you may want to ignore these parameters or find a matching parameters in the current model At the bottom left of the page you will see the Previous Parameters list showing all parameters loaded from the file organized according to the model s subsystems structure At the bottom right you will see the Current Parameters list showing all parameters of the current model organized according to the model s subsystems structure If there is a mapping between a previous and current model s parameters it will be highlighted in yellow in each tree When a parameter is highlighted in both trees it means that the previous highlighted parameter will be converted to the current highlig
122. IP addresses by defining ranges Any target outside these ranges will not be detected by RT LAB Note Ignored targets and targets outside the detection range can still be used in the Workbench but you will have to add them manually by using the New Target wizard 398 RTLAB UG 104 00 General preferences pages General preferences pages Use the Window gt Preferences dialog page to set the general preferences of the RT LAB workbench RTLAB UG 104 00 399 General preferences pages 400 RTLAB UG 104 00 Accessibility preference page Accessibility preference page You can change the following preferences on the General gt Editors gt Text Editors gt Accessibility preference page Option Description Default Use custom caret Replaces the original caret the marker that indicates where the next character will appear with a custom caret and shows a different caret for Overwrite and Insert modes On Enable thick caret Replaces the original caret with a more visible thicker caret On Use characters to show changes on line number bar Quick Diff shows the changes in a vertical ruler using colors Color blind persons can enable this option to show differences with different characters in the line number ruler Off RTLAB UG 104 00 401 Accessibility preference page 402 RTLAB UG 104 00 Annotations preference page Annotations preference page The following preferences can be changed on the General gt Editors gt Text Edi
123. ISA PCI PXI and PCMCIA analog and digital 1 0 boards Shared Memory FireWire InfiniBand or UDP IP interprocessor communication RTLAB UG 104 00 Introduction 1 3 1 3 1 10 At execution time RT LAB provides seamless support for inter processor communication using any combination of UDP IP Shared Memory and all readily available technologies for low latency communication of data between the target processors You can also interact with the simulation in real time from the host station using TCP IP Integrated interface for signal and parameter visualization and control With RT LAB s visualization and control panel you can dynamically select signals to trace modify any model signal or parameter in real time Extensive I O card support over 100 devices supported RT LAB integrates with Opal RT s OP5000 hardware interface devices for nanosecond precision timing and real time performance RT LAB also supports cards from other leading manufacturers such as National Instruments Acromag Softing and SBS Choice of RTOS QNX Red Hat Linux or Windows for software real time RT LAB is the only real time simulation framework that offers you a choice of two high performance Real Time Operating Systems RTOS RT LAB is available for QNX an RTOS with a proven track record for mission critical engineering applications and Red Hat Linux the popular open source Linux operating system RT LAB also offers Windows as a soft real time
124. If you change a property from Preference page each new model will inherit from Properties defined into Preference page but the existing models will stay unchanged Matlab MatrixX command before opening model Matlab Xmath command to execute before opening the model For example MylnitFile m where MyInitFile includes commands that initialize model variables default value Matlab MatrixX command after opening model Matlab Xmath command to execute after opening the model For example MyInitFile m where MyInitFile includes commands that initialize model variables default value Handle console automatically Enables the console to be automatically opened and closed when a model is Loaded or Resetted The console starts automatically at the first model s execution default value false RTLAB UG 104 00 387 Simulation Tools preference page 388 RTLAB UG 104 00 EMTP preference page EMTP preference page Use the Window gt Preferences gt RT LAB gt Simulation Tools gt EMTP dialog page to set the EMTP preferences Here is what the EMTP preference page looks like EMTP or v Here are the EMTP preferences Basic EMTP Works EMTP RY Installation folder ILJ Restore Defaults Apply The value of these parameters are used when a new model is created If you change a property from Preference page each new model will inherit from Properties defined into Preference page but the existing models will stay uncha
125. Information Preparing and Compiling 8 Models This section describes general information about this To prepare and compile the model 1 My Model model gt Edit the diagram of the model Setthe development properties Path Y leclipse runtime lvelab product MyProject moc si Compile the model a1 Consult result in the Compilation View State Not loadable ino El Check errors in the Problem View B Assign targets to subsystems Name MyModel Executing To execute the model B Set the execution properties E check execution results in the Display View B Check execution warnings and errors in the Problem view nid 1 items selected IL Overview Development Execution Variables Files Assignation Diagnostic Hardware Simulation Tools Diagram e The Workbench has an editor capable of editing properties of a model A Model editor is automatically opened on the newly created model RTLAB UG 104 00 33 34 Using the popup RTLAB UG 104 00 Using the New button Using the New button We have seen how to create resources using File gt New and New from the context menu of one of the navigation views We will now create a target using the third alternative the toolbar New button e Select the target object in the project explorer view e Inthe Workbench window s toolbar activate the drop down menu on the New Wizard button and select RT LAB Targ
126. LAB Framework In the DDF this attribute is controlled by the lt hasStates gt element Note that some connection policies are not compatible a connection with states has to be synchronous and a synchronous connection doesn t allow multiple publishers to the same domain Incompatible connection policies are treated as errors by RT LAB Orchestra In addition the type of connection to a domain is specified using the lt connection gt element Supported types are local and remote For a local connection the processes associated with the RT LAB framework and the External Component are located on the same machine and they communicate through a shared memory segment For a remote connection the processes associated with the RT LAB framework and the External Component are located on different machines and they communicate through a reflective memory segment When specifying a remote connection it is also necessary to provide information about the type of communication card that is used to connect an External Component to the Framework as well as the PCI index a positive integer corresponding to where the card is inserted This is done by using lt card gt element and lt pciindex gt elements respectively Data sets Each domain is required to contain both a Publish and a Subscribe set possibly empty The Publish set contains the list of data items written by the RT LAB Framework to the communication layer and therefore rea
127. MATLAB version used for during build Note that this setting is only available when building a Simulink model Development node The development node used to compile and link the code into an executable This development node must use the same platform operating system as the model Note that this setting is not available when building a model for Window OS Build steps This list displays the list of steps to perform during the build process Here is a brief description of the steps e Separate model When this option is checked the model is separated into subsystem s as specified in the model This option is always applied to all model e Generate code When this option is checked the C code is generated for the selected model or subsystem s e Clean target directory When this option is checked the model directory on developement target node is cleared All files will be deleted RTLAB UG 104 00 355 Build Configurations e Transfer files to target When this option is checked the binary code for the selected model or subsystem s and the specified extra files if any are transferred to the development node This option is not available for Windows platform Compile and link generated code When this option is checked the generated code is compiled and linked for the selected model or subsystem s e Retrive Files from target When this option is checked the binary code for the selected model or subsystem s and the sp
128. MF 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 There are as many watchdogs as there as computation subsystems in the model At regular user defined time intervals the watchdog verifies that the model is still running and that processes are still active If an error occurs the watchdog stops the simulation This option is not available on Windows target 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 that all nodes are running normally There are as many watchdogs as there as computation subsystems in the model At regular user defined time intervals the watchdog verifies that the model is still running and that processes are still active If an error occurs the watchdog stops the simulation Thi
129. Members This option allows you to filter members that should be excluded from Compare With Each Other Note The names in the list must be separated by a comma Text Compare options Synchronize scrolling between panes in compare viewers The two comparison viewers will lock scroll along with one another in order to keep identical and corresponding portions of the code in each pane side by side Turn this option off if you do not want the compare viewers to lock scroll Initially show ancestor pane Sometimes you want to compare two versions of a resource with the previous version from which they were both derived This is called their common ancestor and it appears in its own comparison pane during a three way compare Turn this option on if you want the ancestor pane to always appear at the start of a comparison Show pseudo conflicts Displays pseudo conflicts which occur when two developers make the same change for example both add or remove the exact same line of code or comment Turn this option on if you want pseudo conflicts to appear in compare browsers Connect ranges with single line Controls whether differing ranges are visually connected by a single line or a range delimited by two lines Highlight individual changes Controls whether the individual changes inside conflicts are highlighted When the end beginning is reached while navigating an element Use this option to configure what occurs when the end beginning is re
130. ON DESCRIPTION E Save As Saves the current output of the display to a specified text file Print Prints the current display output i Clear Log Clears the current display output Ep Search text Searches specified text in the display output See figure Find dialog Pin view to selection Pins the view to selection means that the Display View will lock the output to the current selected model subsystem of the project explorer So the view will continue to display the output of the selected model subsystem even if the user selects another model subsystem from the Project Explorer view ry New Display Creates a new Display View 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 subsystems or if you want to compare displays Horizontal Provides organization of the Display View by placing outputs in horizontal strips one above the other You need to select more than one subsystem simultaneously to see the outputs tiling To select more than one subsystem go to the Project Explorer view expand the model and press Ctrl click on the sm and ss subsystems RTLAB UG 104 00 195 Display View m Vertical Provides organization of the Display View by placing outputs in vertical strips side by side You need to select more than one subsystem simultaneously to see the outputs tiling To select more than one subsystem go to the Proje
131. 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 will then be executed on the target and output will be displayed in the Target Console RTLAB UG 104 00 Diagnostic Page y Choose a Python script Python file O Select from workspace Select from disk O Select from target Log result to a file Please choose a python file Figure 2 Target Python Script Dialog Flash bitstream Opens the Flash bitstream wizard dialog Command Opens a simple dialog to enter a command This command will then be executed on the target and results will be displayed in the Target Console Clean shared memory Cleans the shared memory on the target Clean core dumps Deletes the core dumps on the target Diagnostic Page This page contains two main sections that display detailed information about the target and provide tools to perform a complete diagnostic of the target Operating System and Hardware section Operating System and Hardware This section describes detailed information about this target Platform QNX 6 x OSversion 6 3 2 Architecture x86pc Free disk space MB 8354 CPU Speed MHz 2928 Number of CPU 2 These properties show the main characteristics of the target They are also available in the Properties View when the target is selected in the Project Explorer Tools section RTLAB UG 104 00 159 Simulatio
132. Perspectives Each Workbench window contains one or more perspectives A perspective defines the initial set and layout of views in the Workbench window Within the window each perspective shares the same set of editors Each perspective provides a set of functionality aimed at accomplishing a specific type of task or works with specific types of resources For example the RT LAB Edition perspective combines views that you would commonly use while editing RT LAB model while the Debug perspective contains the views that you would use while debugging Python scripts As you work in the Workbench you will probably switch perspectives frequently Perspectives control what appears in certain menus and toolbars They define visible action sets which you can change to customize a perspective You can save a perspective that you build in this manner making your own custom perspective that you can open again later Related concepts Workbench Views Editors RTLAB UG 104 00 131 Perspectives 132 RTLAB UG 104 00 Editors Editors Most perspectives in the Workbench are comprised of an editor area and one or more views You can associate different editors with different types of files For example when you open a file for editing by double clicking it in the Project Explorer view the associated editor opens in the Workbench If there is no associated editor for a resource the Workbench attempts to launch an external editor outside the Workb
133. Problems view Development Page This page contains two main sections that define development settings for the edited model target platform and compiler linker settings The default property values for a new model come from the RT LAB Preference pages If a property is changed from the RT LAB preference pages each new model created will inherit from these properties After that if you change a model property only the edited model will be affected Target Platform section Compiler and linker settings Customize the compiler and linker settings Target platform Windows XPiVista Y Target platform Allows you to choose the target platform or the operating system on which to run the simulation QNX6 Redhat Redhawk Windows XP Vista 7 system Compiler Linker settings section This section is composed of five sub sections sources includes librairies library path and compiler Sources RTLAB UG 104 00 139 140 Development Page Sources gt Includes Libraries Library Path li Compiler Source Files Sources Names of source files to be compiled in addition to the code generated by RTW AutoCode Used to incorporate user written code into the model executable e g file1 c file2 c file3 c Add Adds a source file to the list of source files Edit Edits the path and name of the selected source file Delete Removes a source file from the list Move up Changes the order of the source
134. SV DDF Configurator RT LAB Orchestra includes a graphical tool called the DDF Configurator that you can use instead of editing the XML file directly Launching the Orchestra DDF Configurator The DDF Configurator can be launched as a standalone application or from a block of the RT LAB Orchestra Simulink library Double click the file DDFConfig jar located in lt RT LAB installation dir gt Common bin to run the DDF Configurator DDF Configurator is a Java application that requires a Java Runtime Environment to be installed Refer to the section Environment Requirements for further detail Once you have created a DDF you can use it to configure a block from the RT LAB Orchestra Simulink library To launch DDF Configurator from a Simulink block open the RT LAB Orchestra library Click the block and select Configure Key features DDF Configurator allows you to e Create a DDF from scratch e Import and update an existing DDF e Import a Dymola configuration file and create a DDF from it e Import data from a CSV file into DDF Configurator e Save DDF data to a CSV file Graphical views The DDF Configurator consists of two views separated by a movable divider and of a toolbar located along the upper edge of the panel The lefthand side view is called the Explorer View while the right hand side view is called the Properties View The Explorer View is a tree structure that displays the simulation data currently defin
135. Save Perspective As Related concepts Views Fast views Detached views Perspectives RTLAB UG 104 00 557 Opening views 558 RTLAB UG 104 00 Moving and docking views Moving and docking views To change the location of a view in the current perspective e Drag the view by its title bar Do not release the left mouse button yet e As you move the view around the Workbench the mouse pointer changes to one of the drop cursors shown in the table below The drop cursor indicates where the view will be docked if you release the left mouse button To see the drop cursor change drag the view over the left right top or bottom border of another view or editor You may also drag the view outside of the Workbench area to turn it into a Detached view e When the view is in the location that you want relative to the view or editor area underneath the drop cursor release the left mouse button e Optional If you want to save your changes select Window gt Save Perspective As from the main menu bar e Note that a group of stacked views can be dragged using the empty space to the right of the view tabs You can also move a view by using the pop up menu for the view Left click on the icon at the left end of the view s title bar or right click anywhere else in the view s title bar As well as moving the view this menu will provide sortcut options for turning a view into either a Fast or Detached view Drop cursor Where t
136. Strategy option of the OpCtrlReconfigurablelO block must then be used to differentiate between the OP5130 cards e Only 16 32 bit IN OUT ports are provided by the DataIN OUT blocks and the maximum width of each of these outputs is 250 samples 524 RTLAB UG 104 00 Using ScopeView Using ScopeView This chapter describes how to use ScopeView with RT LAB Introduction The ScopeView software is used to display signals and waveforms acquired from various data acquisition systems and to perform mathematical calculations and signal processing ScopeView is tightly integrated with RT LAB and allows visualization of signals acquired from real time simulation and also serves as an analog and digital oscilloscope ScopeView can acquire and import signals and data from many sources It supports RT LAB data source and other data source types like HYPERSIM EMTP RV MATLAB and COMTRADE It also allows managing many data sources at the same time Once the data has been acquired and or imported ScopeView make it possible to execute many type of graphics processing such as zoom superimposition tracking cursor graph displacement It also offers a rich set of mathematical functions to calculate new waveforms and to generate complex analyse Report can then be produced and exported to various file formats such as PDF MATLAB or Post Script More information is available in ScopeView user manual to access this document open ScopeView and click t
137. Subsystems Select subsystems to edit their properties Name Assigned node Platform XHP Debug Cores sm_controller 193 2x4 Redhat E OFF EH OFF 1 S ss plant 193 2x4 Redhat Eor Dorr 1 No subsystem selected Edit settings for selected subsystems Choose a physical node Run in XHP mode Advanced Run in debug mode The user can set properties for each subsystem directly in the subsystem table target assignation XHP mode debug mode and core assignation Subsystems Select subsystems to edit their properties Name Assignednode Platform XHP Debug Cores sm_controller 193 2x4 Redhat E or Ej oF 1 2H ss_plant 193 2x4 Redhat Dor Dorr 1 Name Model s subsystem names Assigned Node Select the target node where the subsystem will be executed from the list of available targets By default the Assigned node is set to the development node See Preferences gt RT LAB gt Simulation Tools gt RT LAB section Platform Type of platform of the selected target QNX 6 X Redhat Windows XHP If checked the subsystem will be executed in eXtreme High Performance XHP mode available only on QNX 6 and RedHat Linux Debug Check the subsystems you want to debug See section Debugging on page 30 CPU For advanced users only CPU cores allocated and optionally specified for the subsystem and its worker threads The system will allocate cores and will assign subsystems using the following set of rules e Single core systems
138. The toolbar and the context menu provide some commands to control the Log Console Command Name Terminate g Save Bs Clear Console BB Scroll Lock Pin Console E Display Selected Console RTLAB UG 104 00 Description Closes the current console Saves current content to a file Clears the current console Toggles the Scroll Lock Pins the current console to remain on top of all other consoles in the current Console View Opens a listing of current consoles and allows you to select which one you would like to see Availability Toolbar Toolbar Toolbar and Context menu Toolbar Toolbar Toolbar 225 Log Console Command Name Description Availability ry Open Console Opens a new console of Toolbar the selected type 226 RTLAB UG 104 00 Variables Table View Variables Table View The Variables Table View displays one or more sets of RT LAB variables such as Signals and Parameters in a tabbed notebook 47 Search Ed Monitoring Variables Table 3 amp 2 Se Dee Demo Name Path Value Data Type Complex Size RTW Access signall MyProject matrixTest sm_master Constant portl 1 0 Double False Scalar 1x1 True Read Only J Value MyProject matrixTest sm_master Constant Value 10 Double False Scalar 1x1 True Read Write bJ Value MyProject matrixTest sm_master Matrix Value lt 28 Double Double False Matrix 2x3 True Read Write b XO MyProject matrixTest ss_slave Memory X0 0 0 Double False S
139. Uncheck all resources 312 RTLAB UG 104 00 Add Model wizard Add Model wizard This wizard explains how to add an existing RT LAB model to a project The model will be added to the selected destination project inside the Models folder Project Explorer 3 7 ASD Ay E dy Targets E E rtdemo Te tS File system Figure 73 Models folder The next sections show how to add an existing RT LAB model to a project By default the Project Explorer view is included in the Edition perspective To add it to the current perspective click Window gt Show view gt Other gt General gt Project Explorer How to add an existing RT LAB model To add an existing model click on the Add gt Existing Model menu item Right click on a project or its Models folder to open the contextual menu Project Explorer El asi WY 7O y Targets a B RT Demo e models New gt Add 4 Existing model 5 Paste Ctrl Import t Export Refresh F5 Simulation Properties Alt Enter Figure 74 Add existing model menu This operation has opened the Add Model dialog RTLAB UG 104 00 313 Add Model wizard Add RT LAB Model RT LAB Model Add an existing RT Lab model to the project Model file Project RT Demo Cancel Figure 75 Add model dialog Then you can browse the file system to select any model file you want to add to the selected project This project should already be selected in the Project
140. While adequate for most tasks you may find yourself wanting to have the presentation show more than stack In these scenarios don t maximize minimize all the other stacks except the ones you want in the presentaton Once you have it set up you can still subsequently maximize the editor area but the un maximize will only restore the particular stack s that were sharing the presentation not the ones you ve explicitly minimized Normal Presentation RTLAB UG 104 00 Maximizing and minimizing elements of the workbench presentation File Edit Navigate Search Simulation Tools Window Help iH H B 4l0wnsi 4 amp AAA ES E Eton Gia wee This is sample text file There is not much else ve can really say about it other than it has five lines of text that are rather dull E de Targets de MyTarget202 B MyProject 8 Models SS File system B HS help HS models po Pg RR amp Python264 Y produits devirt lab bl Display X E Properties Compilation A Matlab View Progress ga Console o RSP Anan B MyProjectfle txt Editor Area Maximized MEN Edit Navigate Simulation Tools Window Help it 1 8 d0Pn21 BB 48 686 6 EX E Edition Bi filete 2 BS fiez 1 his is sample text file Fe There is not much else we can really say about it other than it has five lines of text that are rather dull RTLAB UG 104 00 577 Maximizing and minimizing el
141. _208 vl Redhat redhawk _1 78 M Redhat 64 v Advanced Target root directory jhome FabienneG softDev Release v m Restore Defaults Apply The value of these parameters are used when a new model is created If you change a property from Preference page each new model will inherit from Properties defined into Preference page but the existing models will stay unchanged The Restore Defaults button enables the user to restore the defaults value of the parameters Development targets QNX Redhat Redhat64 Identifies the target node where the compilation is done Target nodes must be defined in the workbench by using the New Target wizard before the development node can be chosen For more details see New Target Wizard Target root directory Path to be used to find the RT LAB executables include files and libraries or the target nodes This allows previous versions of RT LAB to be used side by side with newer versions The set up script makes the last version installed the default system but this option can be used to specify a version based on its path Automatic setting means the target path is automatically set based on the last installed RT LAB version default value Automatic RTLAB UG 104 00 395 RT LAB preference page 396 RTLAB UG 104 00 Target Detection preference page Target Detection preference page Use the Window gt Preferences gt RT LAB gt Execution gt Target Detection dialog page to con
142. a co simulation is provided in the RT LAB distribution under the directory lt RT LAB installation dir gt Examples Features Orchestra Simulink src RTLAB UG 104 00 509 Running an RT LAB Orchestra co simulation Integration of a Dymola model to an RT LAB Framework This section details the steps required to connect a standalone Dymola application to an RT LAB Framework e Translate the Dymola model you want to connect to an RT LAB Framework This will generate a dsmodel c file and a dsin txt that contains the lists of inputs and outputs signals to the Dymola model e Ina subsystem of the RT LAB Framework add a Dymola Proxy block Configure the block by double clicking on it which will open the DDF Configurator graphical tool Import the Dymola dsin txt file and select the input and output signals e Add calls to the Orchestra RT API in file StandAloneDymosim c Build an executable for the standalone Dymola model Refer to lt RT LAB installation dir gt Examples features Orchestra Dymola src for a list of source files required to build this executable Running an RT LAB Orchestra co simulation This section describes how to set up the External Components you want to connect to an RT LAB Framework It is assumed that you have already built and loaded the Framework itself Transferring External Components executables Build an executable for each external component you want to connect to an RT LAB Framework by following the steps liste
143. a keyword will display the given topic Bookmarks RTLAB UG 104 00 Search gt Search expression Project Explorer view gt Search scope Default AP Project Explorer view This view provides a hierarchical view of the resources in the Workbench Here is what the Project Explorer view looks like Project Explorer View To add the Project Expl ap Linking the Project Explorer view to the active editor When you have multiple files open for editing you can configure one of the navigation views to automatically bring an open File to the foreground make its editor session ap Showing or hiding files in the Project Explorer view You can choose to hide system files or generated class files in one of the navigation views System files are those that have only a file extension but no file name for e Ap Navigating and finding resources The Workbench provides a number of mechanisms for navigating and finding resources See the Related tasks links For more details Related concepts Resources Project Explo ap Resource hierarchies Resources are stored and displayed in the Workbench in hierarchies Described below are the terme cad uihan rafarrina ka Go To Al Topics S Related Topics CN Bookmarks Al Index Note The index page will only appear when index content is available in the workbench Ql Bookmarks a m Help l Infocenter Help view 255
144. aa en dans rail 21 Edit 4 54 dus ade Sie Babs tha da Dreier 23 MEWS td Se oA Lat o At aS ab lata sa eta fe ga dat fe ya a 25 A Simple project ssi u au guise aan ann se 27 Using the File menu 29 Using the POPUP 4444444 nn au dead ae 31 Using the New button 35 Preparing and building model 37 Selecting the development node 39 Editing the model 41 Preparing the build configuration 43 Building the model 45 Assigning subsystems 47 Executing model 4 24 2 ar an a Ra BOP eee bte a ge BS abl 49 Selecting the simulation mode 51 Loading the model s iii ci aii er aa a es 53 Running the model 55 Using th Consol sea desde aaa Date ne 57 Resetting the model 4 4 4 59 Closing and editor 61 Navigating resources 63 Opening resources in the Project Explorer 65 FICS ao 2 ata a wine ee aaa Bah ta 67 Deleting resources 1 44444 4454444 ua uma est eu une ose 69 Copying and renaming 71 COPYING coria a A Aaa 73 Renaming a ars a AA a ae ta hee Te Di 75 Searching A ig ew dow ae a a We ne see ea bola ne dre a T 4 77 Rearranging view
145. able various product components of RT LAB such as Operator or Developer environments By default no capabilities are active and only the basic functionalities of RT LAB are active The Restore Defaults button enables the user to restore the defaults value of the parameters Operator This capability enables all features that allow user to manage consoles and make some changes to the parameters and aliases of the models It enables all components making data acquisition and monitoring and also basic operations on the simulator as loading executing pausing or reseting the models default value false Developer This capabilities enables all features related to the development of models scripts and codes It also enables all features of the operator capabilities default value false Advanced User This capabilities enables all products components including operator and developer capabilities Moreover it also enables other unclassified features related to Eclipse and external plugins default value false RTLAB UG 104 00 369 Capabilities preference page 370 RTLAB UG 104 00 Compiler and Linker preference page Compiler and Linker preference page Use the Window gt Preferences gt RT LAB gt Development gt Compiler and Linker dialog page to set the preferences concerning the RT LAB compiler and Linker Here is what the Compiler and Linker preference page looks like Compiler and Linker Ge v Here are the c
146. ach block inserted into a simulation model different parameters must be set to indicate to RT LAB where to find the card or module that corresponds to the block These blocks have no effect when running offline When loading the model the target subsystem where the 1 0 block has been inserted SM_ or SS_ must be assigned to the target node with the corresponding 1 0 card Refer to the online documentation to get more information about each block RTLAB UG 104 00 497 I O blocks 498 RTLAB UG 104 00 RT LAB Connectivity RT LAB Connectivity This chapter describes RT LAB add ons that expand the capabilities of RT LAB e RT LAB Orchestra e RT LAB Asynchronous processes e RT LAB User SFunction e RT LAB Xilinx System Generator toolbox integration RTLAB UG 104 00 499 RT LAB Connectivity 500 RTLAB UG 104 00 RT LAB Orchestra RT LAB Orchestra Introduction RT LAB Orchestra is an add on that extends RT LAB s connectivity capabilities to heterogeneous co simulations Heterogeneous co simulations consist of simulations written in different programming languages or generated by various simulation tools Although Simulink provides some connectivity capabilities through the use of S functions the main advantage of using RT LAB Orchestra is flexibility co simulation components can be developed and tested by different teams then integrated to form a cohesive co simulation system When using RT LAB Orchestra RT LAB is r
147. ach target in the list of targets has their own properties To consult these properties right click on the specific target and click on the Properties menu item The Properties view displays the name the ip address the operating system and the hardware of the target The Properties view will be added in a tabbed notebook at the rightmost position See the next figure to know which information is provided by the Properties view O Properties 3 1 items selected Property Advanced LE 1 Overview 192 168 0 201 IP address name 2 Operating System detected platform version 3 Hardware architecture CPU speed MHz disk space MO number of CPUs Value tONX201 QNX 6 x 6 3 2 xB6pc 2333 8812 8 Figure 82 Target Properties view Related concepts Views Perspectives Toolbars Related tasks Opening views Moving and docking views RTLAB UG 104 00 319 New Target wizard Related reference Target platform Project Explorer 320 RTLAB UG 104 00 Detected Targets Wizard Detected Targets Wizard This wizard is used to manage newly detected RT LAB Targets Each detected Target can be either added to the workbench or ignored r gt Detected RT LAB Targets e ex Select and edit detected RT LAB targets Selected targets will be added to the workbench others will be ignored See the RT LAB Target Detection preference page to customize target detection RT LAB name alias IP addr
148. ached while navigating an element RTLAB UG 104 00 411 Compare Patch preference page e Prompt If this option is on and you selected to compare a single element you will be asked whether you want to go to the beginning end of the element after the end beginning is reached If you are comparing two or more elements you will be asked whether you want to go to the beginning end of the current element or to go to the next previous element Moreover if you choose to remember your decision this option will be changed to one of the below respectively e Loop back to the beginning end When this option is on the selection will me moved back to the beginning end after you reach the end beginning of an element e Go to the next previous element If you are comparing two or more elements and this option is on after you reach the end beginning of an element the next previous element will be opened 412 RTLAB UG 104 00 Content Types preference page Content Types preference page The General gt Content Types preference page enables you to edit content types and their associated file names and character sets You can also associate arbitrary file names or file extensions with content types A content type acts as a description of a certain class of files for instance XML files RT LAB uses this description in various scenarios such as editor look ups and file comparisons To access the Content Types preference page select Window gt Preferen
149. ady exists in the file system you will be prompted to overwrite the file If you do not want to be prompted turn this option on Off Create directory structure for files Create hierarchy folder structure in the file system as it exists in the Workbench Create only selected directories Create hierarchy folder structure in the file system only for selected folders File System If you choose this option you will export files to the file system Select resources to export The project and resources within that project to export to the file system Select Types Dialog to select which file types to export Use this to restrict the export to only certain file types Select All Checks off all resources for export RTLAB UG 104 00 335 Export wizard Deselect All Uncheck all resources Directory The directory on the file system into which the resources will be exported Type the path select a previous export path from the drop down list or Browse to select a path Overwrite existing files without warning Determines whether exporting a resource should silently overwrite a resource which already exists in the file system If this option is off you will be prompted before a given file is overwritten in which case you can either overwrite the file skip it or cancel the export Create directory structure for files Create hierarchy folder structure in the file system as it exists in the Workbench Create only selected di
150. age Environment Variables preference page Use the Window gt Preferences gt RT LAB gt Execution gt Environment Variables dialog page to add environment variables Here is what the Environmemt Variables preference page looks like 4 Environment Variables es Environment variables to set Name Value Description VARI ON VARZ OFF Select VARS 10 select Restore Defaults Apply The value of these parameters are used when a new model is created If you change a property from Preference page each new model will inherit from Properties defined into Preference page but the existing models will stay unchanged The Restore Defaults button enables the user to restore the defaults value of the parameters Name Name of the user variable Value Value of the user variable Description Description of the user variable RTLAB UG 104 00 377 Environment Variables preference page 378 RTLAB UG 104 00 Files transfers preference page Files transfers preference page Use the Window gt Preferences gt RT LAB gt Execution gt File transfers dialog page to add some files to be transfered Here is what the File Transfers preference page looks like File Transfers ar vi Here are the file transfer preferences Basic File retrieval root directory Advanced v Enable automatic file retrieval V Allow file retrieval during simulation Y Build intermediate tree on file retrieval Notificati
151. ak point working set RTLAB UG 104 00 127 Working Sets New Working Set Select a working set type A general purpose working set that can contain any type of file based Eclipse resource Working set type resource doBreakpoint Cancel If you create a new resource working set you will be able to select the working set resources as shown below The same wizard is used to edit an existing working set Different types of working sets provide different kinds of working set editing wizards Note Newly created resources are not automatically included in the active working set They are implicitly included in a working set if they are children of an existing working set element If you want to include other resources after you have created them you have to explicitly add them to the working set Related concepts Project Explorer view 128 RTLAB UG 104 00 Local history Local history A local edit history of a file is maintained when you create or modify a file using the RT LAB editors Each time you edit and save the file a copy is saved so that you can replace the current file with a previous edit or even restore a deleted file You can also compare the contents of all the local edits Each edit in the local history is uniquely represented by the date and time the file was saved Only files have local history projects and folders do not RTLAB UG 104 00 129 Local history 130 RTLAB UG 104 00 Perspectives
152. al time simulator Disabled MATLAB Versions On Windows operating system the selection menus for the Matlab versions display all Matlab version supported by RT LAB However RT LAB disables the Matlab versions that has not been installed or that has not been registered in Windows COM interfaces To register a Matlab version in Windows COM interfaces e open the command prompt of the operating system e set the working directory to the Matlab installation directory and then e execute the following command matlab exe regserver This command will enable the specific Matlab version so it can be used in RT LAB Then to verify that Matlab has been registered correctly perform the following steps e execute the following command Matlab exe automation e If Matlab doesn t start correctly Matlab must be reinstalled using the normal installation procedure If none of the steps above solved your problem please contact RT LAB support Toolbar The toolbar in the Matlab View contains the following buttons 212 RTLAB UG 104 00 Matlab View ICON DESCRIPTION N Open Matlab Opens the selected Matlab version It is also possible to open Matlab using the default Matlab version View Menu Opens the View Menu View menu The menu in the Matlab View contains the following items Close Matlab This command closes the instance of Matlab in the current view Close View This command closes the Matlab View but doesn t close the Matlab in
153. alculation step changing the time factor for the I O may give results which differ from the offline simulation This parameter should be used only to determine the simulation s minimum calculation step Once this step is determined this parameter must be brought back to a value of 1 The model s basic calculation step must be updated accordingly by setting the correct value in the Simulink SystemBuild model and by recompiling it 206 Execution real time use restricted mode For advanced user only This setting can be used only when the model s current target platform is QNX 6 x When this platform is selected a given model can be loaded either in Free Clock mode or in Restricted Clock mode In Free Clock mode the user can load one non Software Synchronized model on a given target node and is free to use any time step value within the boundaries of the QNX 6 x restrictions If the user tries to load another non Software Synchornized model on the same target node it will be stopped with a relevant error message In Restricted Clock mode the user can load a series of non Software Synchronized models on a given node In this mode each model time step must be consistent i e a multiple of with a specific base Clock Period that should be specified by the user Each time an additional model is being loaded on this specific target its time step will be checked against the current base Clock Period to validate the load operation
154. alization 2 A set of blocks placed inside the RT LAB model allows the user to specify the configuration parameters of the Asynchronous Program and to select the data signals to be sent to or retrieved from the Asynchronous Program during execution of the model Note that although the source code of the Asynchronous Program must be designed specifically for the user application using templates and the API of functions provided with RT LAB Simulink blocks usually do not require development other than possibly masking the basic blocks provided with RT LAB to make a specific user interface for the application Asynchronous Programs exchange data with the model periodically via a shared memory opened by the RT LAB model during initialization as presented in Figure 15 below RT LAB then starts the asynchronous program which name is defined in a configuration block placed in the RT LAB model the Asynchronous Controller block During model execution both the model and the Asynchronous Process read from and write to the shared memory in order to exchange data RTLAB UG 104 00 511 Building the asynchronous application model mdl create connect to shared memory shared memory execute user defined code timestep say 100 ys Figure 15 Communication between asynchronous user program and RT LAB model In the serial communication example described above data are processed in the Asynchronous Program as soon as they are received
155. alue of these parameters are used when a new model is created If you change a property from Preference page each new model will inherit from Properties defined into Preference page but the existing models will stay unchanged RT LAB preferences are organized into the following categories Capabilities preference page Development e Compiler and Linker preference page Diagnostic e Debugging preference page e Monitoring preference page Execution e Environment Variables preference page e Files transfers preference page e Performance preference page e Real time preference page e Hardware preference page Simulation Tools preference page e EMTP preference page e Matlab preference page e Matrixx preference page e RT LAB preference page Target Detection preference page RTLAB UG 104 00 367 RT LAB Preferences Pages 368 RTLAB UG 104 00 Capabilities preference page Capabilities preference page Use the Window gt Preferences gt RT LAB gt Capabilities dialog page to set the preferences concerning the RT LAB capabilities Here is what the Capabilities preference page looks like Capabilities gt v Capabilities allow you to enable or disable various product components These capabilities are grouped according to a set of predefined categories Capabilities Description Ca Operator Ca Developer Ca Advanced User Restore Defaults Apply The capabilities preference page allows you to enable or dis
156. alue true Reset model on I O board missing When this option is checked and the model is loaded RT LAB will stop loading and will generate an error if some I O boards required by the model are not detected on the target s RT LAB will generate only a warning if this setting is unchecked Note that only a few 1 0 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 default value true Abort compilation on bitstream missing When this option is 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 default value false RTLAB UG 104 00 385 Hardware preference page 386 RTLAB UG 104 00 Simulation Tools preference page Simulation Tools preference page Use the Window gt Preferences gt RT LAB gt Simulation Tools dialog page to set the simulation tools preferences Here is what the Simulation Tools preference page looks like Simulation tools An a Here are the simulation tool preferences General Matlab Matrixx command before opening model Example myYar 1 Matlab Matrix command after opening model Example myYar 1 Console Handle console automatically Restore Defaults Apply The value of these parameters are used when a new model is created
157. an be used to filter the contents Simply type in an entry and any matching results will remain in the tree view Descriptions and previews are provided when the Workbench colors and font settings are selected RTLAB UG 104 00 409 410 Colors and Fonts preference page RTLAB UG 104 00 Compare Patch preference page Compare Patch preference page The following preferences can be changed on the General gt Compare Patch page General options Open structure compare automatically This option controls whether a structure compare is automatically performed whenever a content compare is done Turn this option off if you don t want to see the structural differences Show structure compare in Outline view when possible If this option is on structure compare will be displayed in the Outline view whenever it is possible Show additional compare information in the status line If this option is on additional information about a change is shown in the status line Turn this option on if you are interested in additional information about a change Ignore white space This option controls whether or not whitespace change are shown in the compare viewer Turn this option on if you want to see changes in whitespace Automatically save dirty editors before browsing patches This option controls whether any unsaved changes are automatically saved before a patch is applied Turn this option on if you want to save changes automatically Filtered
158. ar consoles and allows you to select which one you would like to see Opens a new console of Toolbar the selected type When typing commands in the Interactive Python Console the following shortcuts are available SHORTCUT ACTION Ctrl Space Code completion PageUp Displays history in a dialog Up Down Arrows Cycles through the history Esc Clears current line Ctrl f Opens the search dialog Configuration Enabling the Advanced User Capabilities preference page allows you to configure the Interactive Python Console Go to Window gt Preferences gt PyDev gt Interactive Console RTLAB UG 104 00 221 Interactive Python Console _ Preferences type filter text Interactive Console Colorer Library Edkor Pydev interactive console preferences General Help Stdout color Pydey Bulders derr color Debug Edtor ane Interactive Console Prompt coloe Interpreter Tron Python Interpreter Jython Background color cS Loggng pin import sys osjimport os sys path append os environ RTLAB_ROOT fcommonybin Pyint Pyurit Scripting Pydev Task Tags e RT LAB Initial E RunjDebug nterpreter E Tesm commands Terminal Ym Args for jython used only on external process option Maximum connection attempts For intial communication Figure 38 Python Console settings You can also change the current Python version and settings in Window gt Preferences gt PyDev gt I
159. ardware synchronized mode or using processor clock in software synchronized mode The monitoring service also calculates time elapsed between these events These measurements are called probes Generally the probes are the time elapsed between two events that occur on the same time step e the beginning and the end of a task Tasks are any calculations performed on the target during the real time simulation Also note that most common tasks are completely executed during one single step and are executed at every step of the simulation The monitoring service measures all time spent by all RT LAB services including acquisition communication and IOs It could also measure time spent by other tasks such as user C Code function called during simulation or time spent by one or more subsystems in the model s diagram The most common and useful probes are Major and minor computations Time spent by the model to perform blocks calculation including algebraic calculation discrete and continuous states calculation See Continuous Sample Time and Major Minor Time Step for more detail on major and minor computations RTLAB UG 104 00 483 Enabling Monitoring e Execution cycle Time spent to compute all tasks of the model major and minor computation and RT LAB services and overhead status update and communication IOs Total step size Time to execute one time step of the model It it very close to the model s time step and is limite
160. are two ways to open Matlab inside the Matlab View The first one is to use the toolbar menu button to open a specified version The second one is to click on the Open Matlab button Open Matlab with toolbar menu button Inside the Matlab View you can click on the Matlab button and open a specified version of Matlab The specified version of Matlab will open inside the Matlab view 5 comtation E Depas dated en E A 7 Matlab R20088 7 7 pen Matla Matlab R2009B 7 9 e Matlab R2008 Select Figure 30 Open Matlab with toolbar Open Matlab using the defaut matlab version RTLAB UG 104 00 211 Matlab View Click on the Open Matlab button located inside the Matlab View lors Compilation Display Sh matlab View ES N A A e Open Matlab Figure 31 Open Matlab with button What does the Matlab View offer One of the coolest things with this feature is that you don t have to switch between Matlab and RT LAB to use Matlab functionalities The embedded Matlab View gives opportunity to e Edit or modify the model before the compilation process For more information see Building models e Start an offline Matlab simulation e Change parameters before the compilation process e Execute scripts to analyze data e Use other Matlab functionalities Note However because there is no Matlab environment on the real time operating system any changes to the Simulink model requires that you recompile it to affect the re
161. arget its time step will be checked against the current base Clock Period to validate the load operation Restricted clock time step us For advanced user only Defines the Clock Period in microseconds specified by the user for the Use Restricted mode option Only available when the Use Restricted mode option is enabled 384 RTLAB UG 104 00 Hardware preference page Hardware preference page Use the Window gt Preferences gt RT LAB gt Hardware dialog page to set the hardware preferences Here is what the File Hardware preference page looks like Hardware Qar x Here are the hardware preferences Basic Enable cacheable DMA memory access Reset model on IO missing C Abort compilation on bitstream missing Restore Defaults Apply The value of these parameters are used when a new model is created If you change a property from Preference page each new model will inherit from Properties defined into Preference page but the existing models will stay unchanged The Restore Defaults button enables the user to restore the defaults value of the parameters Enable cacheable DMA memory access When this option is 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 This option is available on QNX6 only default v
162. art of an RT LAB project are hidden from the Project Explorer as shown in Figure 3 When this filter is disabled files and folders are visible RTLAB UG 104 00 181 Project Explorer Project Explorer 2 E B Der i Targets E RT Demo EH Models a rtdemoi ma rtdemo2 rtdemo3 y u BP E HS help amp models 2 gt rtdemoi a ApivB_example H E Opcommon gt report gt rtdemoi_sm_computation gt rtdemoi_2_sc_user_interface mdl gt rtdemot_init mdl gt rtdemoi mdl B rtdemoi probe HS rtdemo2 H S rtdemo3 gt tmseq Figure 20 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 List Filter Use filter Target platform Redhat Figure 21 Target Filter dialog In this example only the Targets that run RedHat and whose IP address starts with 192 168 0 will be displayed in the Project Explorer View Menu This command displays a menu for managing Working sets and Filters 182 RTLAB UG 104 00 Project Explorer 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 Capabilit
163. ave data contained in an S Function when a snapshot is taken you must register your S Function in RT LAB To do this use the OpalSnapshotRegister function in your s function This function enables you to register data so it can be saved when a snapshot is taken and reloaded when the snapshot is restored Follow these steps to register your s function 1 RTLAB UG 104 00 Include the model_main h header file in your s function source code include model_main h This file is located in the lt RT LAB directory gt common include_ target directory on a WINDOWS OS environment or in usr opalrt common include directory on a QNX or RedHat environment Define a structure to be copied with the snapshot For example def struct real_T value unsigned int count char string 50 jLocalData 535 536 Registering a User S Function for Snapshot Once your S Function is registered every snapshot taken will contain a raw copy memcpy is used of your data Note that the structure definition must not contain pointers since snapshot will not copy the area referred by your data pointer In this case when a snapshot is restored the pointers will be reset to their previous value and you will get an invalid pointer that may corrupt your s function and the real time simulation This problem is caused by the fact that the memory allocation that was performed for the current simulation may be different from the memory allocation perf
164. be extensively customized in RT LAB Use the General gt Keys preference page to assign key sequences to many of the commands in RT LAB RTLAB UG 104 00 587 Changing the key bindings 588 RTLAB UG 104 00 Changing font and colors Changing font and colors By default the Workbench uses the fonts and colors provided by the operating system However there are a number of ways that this behavior can be customized Fonts The Workbench lets you directly configure the following fonts Banner Font Used in PDE editors welcome pages and in the title area of many wizards For instance the New Project wizard uses this font for the top title Dialog Font Used for widgets in dialogs Header Font Used as a section heading For instance the Welcome page for the RT LAB Platform uses this font for the top title Text Font Used in text editors Ignored Resource Font Used to display resources that are ignored from CVS Outgoing Change Font Used to display outgoing changes in CVS Detail Pane Text Font defaults to text font Used by the debug console Properties File Editor Text Font defaults to text font Used by Properties File editors Compare Text Font defaults to text font Used by textual compare merge tools Part Title Font defaults to properties file editor text font Used for view and editor titles Note It is recommended that this font not be bold or italic because the workbench will use bold and italic versio
165. board at each calculation step The samples are transmitted to the target node via the SignalWire link Here again some transformation of the data may be needed The figure below shows the type of transformation done in the data reformatting from uint32 to double subsystem to extract 16 bit ADC samples and convert them to the double type Note that a shift arithmetic block is used to scale the information properly Since ADC samples are in the Fix_16_10 format in the FPGA a shift by 10 bit to the right is necessary in the target Wy Vu 2510 Qy Qu gt gt 10 Ey Eu Bitwise OXFFFF My Vu 2416 Bitwise Qy Qu gt gt 16 AND Ey Eu OxF FFF Vy Vu 2510 Qy Qu gt gt 10 Ey Eu Figure 24 Conversion subsystem connected to the inports of the OpCtriReconfigurablelO block RTLAB UG 104 00 523 RT LAB Xilinx System Generator toolbox integration Limitations e As of RT LAB v8 3 the only reconfigurable IO card supported is the Opal RT OP5130 card RT LAB support for new RT XSG supported boards such as Xilinx ML506 development board and Opal RT Spartan3 based module is under way and RT LAB examples for these boards will be integrated in future releases e Communication between multiple OP5130 reconfigurable IO card is not yet possible However it is possible to place several OpCtrlReconfigurablelO blocks in the model in order to communicate with several OP5130 cards from the same CPU model The Search
166. bug Pydev E Resource 8 Team Synchronizing Reset Perspective This command changes the layout of the current perspective to its original configuration Close Perspective This command closes the active perspective Close All Perspectives This command closes all open perspectives in the Workbench window Navigation This submenu contains shortcut keys for navigating between the views perspectives and editors in the Workbench window e Show System Menu Shows the menu that is used for resizing closing or pinning the current view or editor e Show View Menu Shows the drop down menu that is available in the toolbar of the active view e Maximize active view or editor Causes the active part to take up the entire screen or if it already is returns it to its previous state e Minimize active view or editor Causes the active part to be minimized e Activate Editor Makes the current editor active e Next Editor Activates the next open editor in the list of most recently used editors e Previous Editor Activates the previous open editor in the list of most recently used editors e Switch to editor Shows a dialog that allows switching to opened editors Shows a dialog that allows switching to opened editors e Quick switch editor Shows a searchable popup that allows switching to a new editor RTLAB UG 104 00 295 Window menu e Next View Activates the next open view in the list of most recently used views
167. calar 1d True Read Write Filter Ex Search Ex CIRE 4 Loaded 4 Shown 0 Selected Sort Path FWD Figure 41 Variables Table View Overview By default the Variables Table View is included in the Edition perspective To add it to the current perspective click Window gt Show view gt Other gt RT LAB gt Variables Table Working Sets Variables Working Sets are intended to represent logical groups of RT LAB variables for example the main parameters of a controller This allows you to focus on a particular set of variables without having to search for them within an entire model Several Variables Table Views can be used to display different working sets The same working set can also be shared between several Variables Tables Selecting Working Sets When a new Variables Table View is created it opens a default working set This working set is fully functional but will not be saved when RT LAB is closed To have a working set restored the next time RT LAB is opened you must create a working set with a unique name The easiest way to do so is to click on the New Working Set button Enter a name and click OK to create a new working set containing all the variables currently displayed in the Variables Table View This working set is then automatically opened in the Variables Table and its name appears at the top of the table This method can also be used to merge several workings sets into a new one select the
168. can also detach a view by selecting Detached from the context menu that opens when you click the icon at the left side of the view s title bar Related concepts Views Detached views Perspectives RTLAB UG 104 00 567 Detaching views 568 RTLAB UG 104 00 Opening files for editing Opening files for editing You can launch an editor for a given file in several ways e By right clicking the file in the Project Explorer view and then selecting Open from the pop up menu e By double clicking the file in one of the navigation views All of the above alternatives open the file in the default editor for that type of file To open it in a different editor select Open With from the file s pop up menu Related concepts Editors External editors Model Editor Project Explorer view RTLAB UG 104 00 569 Opening files for editing 570 RTLAB UG 104 00 Editing files outside the Workbench Editing files outside the Workbench To edit a Workbench resource outside the Workbench e Navigate in the file system to the Workbench s installation directory Go into the workspace directory and open the file that you want to edit with the external editor e Edit the file as needed Save and close it as usual e Important Go back to the Workbench right click the edited file in one of the navigation views and select Refresh from the pop up menu The Workbench will perform any necessary update operations to process the changes that you made o
169. cation are done to the original model into one computation subsystem and one console with one acquisition group The signals to display could be added later dynamically when the model is running Interaction to the model is done by setting the model s parameter on the fly subsystem model You may want to modify your model to make it compatible with RT LAB It could be useful when you want to set some signals to be always sent from the SM to the SC subsystem and also to define some control signals In this case the rules for creating the model is the same than a distributed model except that there will be no SS subsystems Refer to the next paragraph to learn how to create an RT LAB model Building a distributed Model for RT LAB Any Simulink or SystemBuild model can be implemented in RT LAB but some modifications must be made to distribute the model and transfer it into the simulation environment The success of distributed computing with a complex model will depend on the separation of that model into small subsystems synchronized to run in parallel This should be kept in mind early in and throughout the design process To build an distributed model users must modify the block diagram mdl or sbd file by regrouping the model into calculation subsystems inserting OpComm communication blocks taking into account step size calculations and exchanging state variables or using Delay blocks each of these topics is covered within this chapter
170. cators are shown in the text editor Show whitespace characters This option controls whether to display whitespace characters in text editors Enable drag and drop of text This option controls whether text drag and drop is enabled Warn before editing a derived file This option controls whether to warn if a derived file is going to be edited Smart caret positioning at line start and end This option controls whether the editor automatically positions the caret and the start or end of a line Show affordance in hover on how to make it sticky This option controls whether to show an affordance in the hover on how to make it sticky Appearance color options This option controls various appearance colors RTLAB UG 104 00 445 Text Editors preference page 446 RTLAB UG 104 00 Web Browser preference page Web Browser preference page The following preferences can be changed on the General gt Web Browser preference page Use internal Web browser This option enables you to use an internal Web browser Use external Web browser This option enables you to use an external Web browser Select the required browser from the list of available external web browsers RTLAB UG 104 00 447 Web Browser preference page 448 RTLAB UG 104 00 Workspace preference page Workspace preference page On the General gt Workspace preference page you can manage various IDE specific workspace preferences settings in the Workbench Build automa
171. ce Properties The default property values for a new model come from the RT LAB Preference pages If a property is changed from the RT LAB preference pages each new model created will inherit from these properties After that if you change a model property only the edited model will be affected Real Time Properties Real Time Properties Set the real time properties of the model Target platform Windows XP Vista v Real time simulation mode Software synchronized v Real time communication link type LDp IP v Time Factor 1 0 v Stop Time s Infinity Y Pause Time s Infinity v Advanced C Use restricted mode Restricted clock time step us Target platform Allows the user to choose the target platform on which to run the simulation QNX6 Redhat Redhawk Windows XP Vista 7 system Real Time simulation mode Enables the user to define how the model s simulation can be executed on a QNX6 RedHat or Windows XP Vista 7 system e 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 142 RTLAB UG 104 00 Execution Page e 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 Please note that the Simulation with low priority mode is
172. ce to one of the commands or remove it from the other Another type of conflict can be caused by multiple key stroke key sequences For example in the Emacs scheme there are many multiple key stroke key sequences beginning with the key stroke Ctrl X Ctrl X K is assigned to Close Ctrl X H is assigned to Select All As previously mentioned the Emacs scheme borrows key bindings from the Default scheme In the default scheme Ctrl X is assigned to Cut Though the Emacs scheme doesn t explicitly redefine Ctrl X pressing Ctrl X is required as part of many of its key bindings In the Emacs scheme when one presses Ctrl X one is half way to entering one of many possible assigned key sequences One would not expect the Cut action to be invoked at this time For this type of conflict the rule is that the Ctrl X key sequence assigned to Cut would be ignored Otherwise it would not be possible to complete many of the key bindings in the Emacs configuration RTLAB UG 104 00 427 Keys preference page 428 RTLAB UG 104 00 Label Decorations preference page Label Decorations preference page Label Decorations allow additional information to be displayed in an item s label and icon The General gt Appearance gt Label Decorations preference page provides a description of each decoration and allows the selection of which decorations are visible type filter text Label Decorations Y VY aus kban ho Label decorations show extra
173. ces gt General gt Content Types By selecting a content type in the topmost tree you can alter the file names and extensions that are associated with it Note Certain items will be marked as locked An item is locked if it is one of the associations provided by the plug in that declares the content type In other words you can remove only user contributed associations Adding an association is as simple as clicking Add A dialog prompts you to enter the file name or extension In addition to adding and removing file names or extensions you can also set the default encoding for a given content type To do this simply enter the encoding name in the provided field and click Update RTLAB UG 104 00 413 414 Content Types preference page RTLAB UG 104 00 Editors preference page Editors preference page You can change the following preferences on the General gt Editors preference page Size of recently opened files list Each file that is opened in an editor is stored in a list of recently used files in the File menu This option controls the number of files that is displayed in that list Show multiple editor tabs Specifies whether you wish to show multiple editor tabs If off editor workbooks have one large tab and all non visible editors are accessible only from the chevron Close editors automatically Specifies whether or not to re use editors in the Workbench If on you may specify the number of editors to use
174. ck will also produce a toolbar in the trim at the outer edge of the workbench window a Trim Stack This bar will contain an icon for each of the views in the stack Clicking on one of these icons will result in the view being displayed as an overlay onto the existing presentation Finally the fast view bar is a toolbar that contains icons representing the current set of fast views A fast view is a shortcut to a view that is frequently used see the section on fast views for more information The fast view bar appears in the bottom left corner of the workbench by default However it is possible to position it on the left or right as well In all cases you can find out what toolbar buttons do by moving your mouse pointer over the button and reading the tooltip that opens See the list of related reference topics below for a table of all toolbar buttons Related concepts Workbench Views Perspectives Fast views RTLAB UG 104 00 299 Toolbars 300 RTLAB UG 104 00 Main Toolbar Main Toolbar The Main Toolbar or the Worbench Toolbar contain buttons that provide quick access to most used commands Generally these commands are available in the Workbench Menus too Here is what the Main Toolbar looks like my gr 0 Bi ME e a ie Figure 67 Main Toolbar overview The different toolbar sections may be rearranged by grabbing and dragging their vertical separators Note that sections could be added or removed by Configuring per
175. computer on QNX Once you enabled the Multi Processor feature of QNX you can assign a XHP slave on each processor of that computer Communication type Two computation subsystems on the same physical node regardless of the number of logical nodes will exchange real time signals using a shared memory If computation subsystems SM or SS are on different physical nodes you must select which real time network type to use either UDP IP slow Firewire a k a OHCI IEEE 1394 or INFINIBAND Red Hat Linux target only The real time link is configured using Model Editor in the Execution Page UDP IP This link requires ethernet board on targets It is a slow link and it should not be used for hard real time simulation OHCI This link requires OHCI board on target RT LAB support OHCI 400 IEEE 1394a and OHCI 800 IEEE 1394b The type of card is detected automatically One OHCI board is required per target Additional card could be added to extend the bandwidth computation subsystem exchanging data using 2 OHCI boards per target or to allow multiple subsystems to communicate to other subsystems when there are multiple subsystems on the same physical nodes only one subsystem could access an associated OHCI board Dophin This link requires one Dolphin D352 board to be installed on each target The D352 offers two bi directional links of 20Gbits s The cards SCI links are hot swappable connections It should be used when high da
176. corresponding wizard Note that before you can create a new file you must create a project in which to store the file Open File Enables you to open a file for editing including files that do not reside in the Workspace Close Ctrl W Closes the active editor You are prompted to save changes before the file closes Close All Shift CtrI W Closes all open editors You are prompted to save changes before the files close Save Ctrl S Saves the contents of the active editor Save As Enables you to save the contents of the active editor under another file name or location Save All Shift Ctrl S Saves the contents of all open editors Revert Replaces the contents of the active editor with the previously saved contents Move Enables you to move the currently selected resources to a different project Rename F2 Enables you to change the name of the currently selected resource Refresh F5 Refreshes the resource with the contents in the file system Convert Line Delimiters To Alters the line delimiters for the selected files Changes are immediate and persist until you change the delimiter again you do not need to save the file Print Ctrl P Prints the contents of the active editor Switch Workspace RTLAB UG 104 00 279 280 File menu Opens the Workspace Launcher from which you can switch to a different workspace This restarts the Workbench Import Launches the Import wizard which enables you to add r
177. could miss some data if the command station is too slow or if the target node does not have enough time left This technique helps ensure hard real time performance Aliasing is another acquisition issue which arises with the use of small frames As described previously it is possible that the next data frame received may not immediately follow the frame currently displayed Consequently in case of small frames like one value per frame the possibility of losing some values results in incorrect data display To illustrate this concept let s assume that we have a sine signal as shown here 480 RTLAB UG 104 00 Understanding Data Reception 85 SA Alia DA Time offset 0 Figure 12 Figure with no Aliasing Tf for example data is acquired once every n steps because acquisition cannot follow the real time simulation the display shows values without properly updating the time axis which results in aliasing the frequency of the resulting signal is increased by a factor of n Figure 13 Aliasing Non synchronized Time Axis The data reception problem occurs because the Console isn t aware that data from the target node is being missed To circumvent this problem it is possible to synchronize the Console time with the simulation time to avoid data loss and data reception errors During acquisition the console subsystem acquires signals from the simulation platform enabling you to view data Scope To Workspace type blocks etc There
178. ct Expl 3 RTLAB UG 104 00 85 86 Rearranging tabbed views RTLAB UG 104 00 Tiling editors Tiling editors The Workbench allows for the creation of two or more sets of editors in the editor area The editor area can also be resized but views cannot be dragged into the editor area e Open at least two editors in the editor area by double clicking editable files in one of the navigation views e Click and drag one of the editor s tabs out of the editor area Do not release the mouse button e Notice that the restricted cursor displays if an attempt is made to drop the editor either on top of any view or outside the Workbench window e Still holding down the mouse button drag the editor over the editor area and move the cursor along all four edges as well as in the middle of the editor area on top of another open editor Notice that along the edges of the editor area the directional arrow drop cursors appear and in the middle of the editor area the stack drop cursor appears e Dock the editor on a directional arrow drop cursor so that two editors appear in the editor area e Notice that each editor can also be resized as well as the entire editor area to accommodate the editors and views as necessary e It is important to observe the color of an editor tab in the figure below there are two groups one above the other blue indicates that the editor is currently active default gray on Windows XP indicates that the edit
179. ct Explorer view expand the model and press Ctrl click on the sm and ss subsystems View Menu Find Direction Forward O Backward Options C Case sensitive Wrap search Figure 25 Find dialog 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 Related concepts Views Perspectives Toolbars Related tasks 196 Loading the model Running the model Resetting the model Using the Console Opening views RTLAB UG 104 00 Display View Moving and docking views Related reference Project Explorer view RTLAB UG 104 00 197 Display View 198 RTLAB UG 104 00 Variable Viewer 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 yao atrixTest varM 2x3 Double 1 2 3
180. cuted Issues Introduced by XHP Mode on Red Hat Linux target On Red Hat Linux target the XHP mode is enabled per cpu basis It means that only the CPU assigned to an XHP subsystem will not be available to other process and OS If the number of subsystems running in XHP mode on a SMP target is less than the number of CPUs the OS will not be disabled and all the functionalities provided by the OS will be available In this case the following paragraph explaining limitations for XHP mode will not apply If the number of subsystems running in XHP mode is equal to the number od CPUs the target will be set in full XHP model and all limitations will apply Limitations and Solutions for XHP Mode 468 Acquisition and model control from the command station Because the network card driver is not available during XHP runs the communication between this computation node and the command station is not available Only the inter computation node communication using Firewire or shared memory on SMP machines is still available This means that signals you wish to be acquired during execution in XHP mode must be routed to another non XHP computation node which will be able to send these signals to the command station If you do not have a second computation node to use as a relay you can also set your model to pause automatically using the RT LAB Pause a Clock and some logic blocks at a given interval When the model pauses it switc
181. cuting pausing or reseting the models default value false RT LAB Developer This capabilities enables all features related to the development of models scripts and codes It also enables all features of the operator capabilities default value false RT LAB Advanced User This capabilities enables all products components including operator and developer capabilities Moreover it also enables other unclassified features related to Eclipse and external plugins default value false Development Use the Eclipse SDK to develop applications Team Use configuration management systems to manage resources RTLAB UG 104 00 405 Capabilities preference page 406 RTLAB UG 104 00 Appearance preference page Appearance preference page You can change the following preferences on the General gt Appearance preferences page Current presentation Specify the currently active presentation look and feel Override presentation settings Locally override the settings from the current presentation s defaults Editor tab positions Specify either top or bottom to indicate where you want tabs for stacked editors to appear Top View tab positions Specify either top or bottom to indicate where you want tabs for stacked views to appear Top Perspective switcher positions Specify the location of the perspective switcher bar Top right Current theme Specify the currently active theme color and font set Default current Show text on pe
182. d by the clock s precision use to synchronized the simulation e Total idle Available time that can be used to compute more calculation The monitoring service also performs statistical analysis and summarizes this information to detect where the CPU time is going The monitoring service is based on the RT LAB acquisition system and performs data acquisition similarly to normal acquisition It means that the monitoring service performs data acquisition for N consecutive steps Data acquisition can be triggered and acquired data can be saved to a file See Acquiring and Viewing Data for more information on the acquisition concepts and features Acquired probes are sent to the host computer and can be displayed in the Monitoring View Enabling Monitoring In order to be able to monitor a model the monitoring service must be enabled before loading the model on target Since the monitoring will add a small overhead to your model s calculation time a few microseconds depending on the target CPU speed it is not enabled by default To enable the monitoring 1 Select the model in the Project Explorer view 2 Double click on the model to open its editor 3 Select the diagnostic tab refer to Diagnostic Page for more information 4 Check the Enable monitoring property Note if the OpMonitor block is inserted into the model the monitoring is automatically enabled when the model is compiled and loaded on target Using the
183. d Hat Linux For pure simulation or real time execution Simulation mode Standard mode e Simulation Free run as fast as possible simulation on target In this mode no synchronization is done Target nodes in a distributed simulation are synchronized with the communication link The data exchanged depends on the model s data flow e Simulation in low priority Win32 target only Same as simulation but the computation subsystem runs in lower priority It is useful when the simulation runs on the command station it will let cpu resource to other applications e Software synchronized the model runs in real time In this mode the model is synchronized on the internal RTOS timer Only one computation node is synchronized when executing a distributed simulation Other subsystems are synchronized with the communication link The data exchanged depends on the model s data flow e Hardware synchronized the model runs in real time In this mode the model is synchronized on an external hardware timer A specific block is required to be inserted in the model to specify and configure where the external clock is located Only one computation node is synchronized when executing a distributed simulation Other subsystems are synchronized with the communication link The data exchanged depends on the model s data flow eXtreme High Performance XHP mode The XHP mode is a means for the real time operating system to disable interrupts This is done on a
184. d above Note that when setting up an RT LAB Orchestra co simulation domain participants need to be co located on the same processor Specifically the executable for an external component that connects to a given domain must reside on the same target node as the RT LAB subsystem that contains the Proxy block for that domain Open an FTP connection to a target node and copy the External Component s excutable Run the executable by typing its name inside of a command window Environment requirements 510 RT LAB Orchestra is supported on the same platforms as RT LAB To run the DDF Configurator as a standalone application you need a Java J2SE Runtime Environment 5 0 or later JRE installed on your machine The JRE can be downloaded free of charge from Sun s website http java sun com To run the DDF Configurator from a Simulink block you need to use Matlab 7 1 Matlab R14 SP3 or later RTLAB UG 104 00 RT LAB Asynchronous processes RT LAB Asynchronous processes Introduction In keeping with the design principle of openness RT LAB features can be extended through the use of Asynchronous User Applications also called Asynchronous Processes This gives RT LAB users access to the full power of the operating system and allow them to implement their own interfaces to various external devices Although usually targeted for use with communication devices such as GPS receivers and power monitors Asynchronous User Applications can be develope
185. d by external domain participants The Subscribe set contains the list of data items read from the communication layer by the RT LAB Framework and therefore published by an external component Data items Data items are the actual signals exchanged within a co simulation Data items are identified by a name attribute in a DDF Item names have to be unique within a given domain Data items are further defined by a type and a length The type corresponds to native types in the C programming language such as double or int The C code char type is denoted by byte The lt length gt element is used to represent data items that consist of arrays of native types For example a data item defined with the C code int 4 corresponds to the DDF elements lt type gt int lt type gt and lt length gt 4 lt length gt For documentation purposes you can insert an optional lt description gt XML element inside an lt item gt element You can also assign a default value to data items in the Subscribe set Valid formats for default values correspond to acceptable definitions for a C code double e g 1 2 1e2 E 2 etc Note that it is an error to assign a default value to a data item that is part of the Publish set of a domain this is because an Orchestra framework publishes all the data items of a Publish set at every time step therefore default values would be overwritten before they can be read by a subscriber External Compone
186. d how to add new views to the perspective rearrange the views and convert views into fast views The Workbench also allows this layout to be saved for future use e In the shortcut bar click on the Edition perspective The Edition perspective is now active e Drag the Compilation view and stack it with the Project Explorer view e Choose Window gt Save Perspective As e The Save Perspective As dialog allows for an existing perspective to be redefined or for a new perspective to be created Click OK to update the Edition perspective and Yes to the subsequent confirmation dialog The new perspective layout will be used if the perspective is reset or if a new one is opened e In the Edition perspective move the Compilation view so that it is now stacked with the Display view e Choose Window gt Reset Perspective Notice the Compilation view is stacked with the Project Explorer view Originally when the Workbench was first started it was stacked with the Display view but because the perspective was saved with the Project Explorer view stacked it now considers this its initial layout While the Edition perspective has been changed there is a way to get back the original layout To reset the Edition perspective to its original layout e Choose Window gt Preferences e Expand RT LAB and select Capabilities e Select the Advanced capability and click OK Preferences type filter text Capabilities E RT AB e Capabilities allow you to
187. d to interface acquisition boards or implement system specific software such as file management etc Architecture overview Asynchronous User Applications allow the user to execute applications asynchronously to RT LAB while running on the same target computer as RT LAB They are asynchronous because they are not synchronized with the model i e they run independently of the RT LAB model either at their own periodic rate or triggered by an external interrupt To illustrate this let s take example on an application that needs to perform data acquisition on a serial link at low speed while processing other computation data at higher speed It would not be convenient in that case to run the model at the low speed of the serial link In the Asynchronous Process architecture the low speed serial data acquisition is performed in a process separate from the main RT LAB model the Asynchronous Program The RT LAB model can then be set up with the calculation step required to process the high speed data Dedicated Simulink blocks are then placed in the RT LAB model in order to allow data transfers to and from the Asynchronous Program One Asynchronous Process application thus consists in two parts 1 One source code written in C or C implements the user specific function and handles communication with the RT LAB model This source code is compiled in an executable program which is transferred to the target computer and launched during model initi
188. d to the current Orchestra container If the imported DDF contains a domain whose name matches another domain already present in the Explorer View the imported domain is rejected and processing proceeds with the remaining domains of the DDF Importing a Dymola input file Select the File gt Import item on the toolbar menu then choose the dsin txt item A dialog allows you to pick the Dymola input file The file dsin txt is opened and parsed then its content is added to a default menu named dsinImportDomain where represents a positive integer that increments sequentially until there is no name conflict with any already defined domain The inputs to the Dymola RTLAB UG 104 00 507 RT LAB Orchestra Simulink blocks model are inserted into the Publish set namely the FRAMEWORK gt CLIENT set and the outputs generated by the Dymola model are inserted into the Subscribe set namely the CLIENT gt FRAMEWORK set Importing from a CSV file To import a CSV file Select the File gt Import item on the toolbar menu then choose the CSV File items Clearing the Explorer View Select the File gt Clear item on the toolbar menu to delete all the data contained inside the Orchestra root node Note that this will not remove a previously saved DDF Selecting a domain and data items When you launch the DDF Configurator from a Simulink block of the RT LAB Orchestra library not all the domains and data items pres
189. d while working with other applications on the same computer Note Please note that the Simulation with low priority mode is only available when working with a Windows target e 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 e g on QNX6 1 the smallest sampling time available is 500 us RTLAB UG 104 00 205 Properties View e 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 value is Infinity the model will execute 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 QNX6 Redhat Redhawk Windows XP Vista 7 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 Because the model always uses the basic c
190. dHat231 Project Demo Browse Figure 97 Embedded simulation dialog If the project that was used to start the simulation exists in the workbench it should already be selected in the Project field Otherwise clicking on the Browse button next to it allows you to select another project from the workspace However be careful when choosing anoher project it must contain an exact copy of the currently embedded model Trying to connect to an embedded model with a different model may cause the simulation to crash The selected project must be closed and must neither be running nor active to enable the reconnection See detailed information on project states in Model and project states Click Finish to start the reconnection Project Explorer 3 ETS ayog de Targets wal localhost ae M201 ni RedHat231 Demo embedded E Running simulations Es Demo bo Demo Running Embedded on RedHat231 Figure 98 Project is ready to be connected Then you can simply open the project and use it as usual to interact with the simulation RTLAB UG 104 00 Project Explorer E de Targets wa localhost ge M201 g RedHat231 Demo embedded Running simulations LS Demo E Demo E Models dal rtdemol Paused Embedded on RedHat231 Figure 99 Project is connected lA Connect to Embedded Simulation Wizard If you close the project it will automatically be disconnected from the embed
191. dded Clear embedded i Embedded simulation ready e 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 e all model parameters to the original values set when the model was compiled and e all model properties and configurations to the values set the last time the the model was loaded through the user interface As mentionned above configurations and properties files are transfered to the target during load e 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 RTLAB UG 104 00 531 Embedding Simulation 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 f
192. de s hard disk The generated MATFILE mat file can be transferred to the command station and analyzed using MATLAB or Xmath with a mathscript file lt RT LAB Installation dir gt SystemBuild lib readOpFile msc The write to file does not affect the simulation step size in synchronized mode because all writing is done during the simulation s spare time The OpWriteFile block uses a circular buffer architecture that enables continuous data acquisition If the circular buffer is full it will be emptied completely before starting again For simulations with small step size a large buffer size is recommended to avoid discontinuous data in the write to file The Simulink block has one input the signals to be saved You can save multiple signals by using a vector as the block input In SystemBuild the OpWriteFile block should have as many inputs as there are signals to record Each OpWriteFile block must be associated with an acquisition group number Moreover because the write to file block is considered an extra acquisition group an OpTrigger block is used to write data when certain conditions occurs For additional information on OpWriteFile and its parameters consult online Help Understanding Data Reception Communication Between the Console and the Target Nodes The Console is connected to each computation node by an Ethernet network Because this type of network is much slower than a FireWire type network and because a command station i
193. ded simulation Follow this procedure again to reconnect it Related concepts Views Perspectives Related tasks Embedding Simulation Opening views Moving and docking views Related reference Project Explorer RTLAB UG 104 00 343 Connect to Embedded Simulation Wizard 344 RTLAB UG 104 00 Load Parameters wizard Load Parameters wizard This wizard helps you load the values of a set of parameters and apply them to the model currently selected in the Project Explorer Selecting the Parameters File The first wizard page lets you select the file that you want to load Here is what the page looks like Load Parameters File Load Parameters File Load parameter values from the local File system File name C templparam_set_3 paraml Browse Comment My comment Created by Vincent Created on Tue Dec 21 11 44 40 2010 Model Information Previous Model used when the parameters file was saved Model file name kspace_networkjrtdemo1 models rtdemo1lrtdemo1 md Created by Paul Baracos Created on Wed Nov 21 11 28 32 2001 Last saved by QuentinDerouault Last saved on Fri Nov 20 17 14 27 2009 Model Revision 1 108 Current Model Model file name Created by Created on Last saved by Last saved on Model Revision kspace_networkjrtdemo ImodelsIrtdemo1 rtdemo mdl Paul Baracos Wed Noy 21 11 28 32 2001 QuentinDerouaul
194. dings RT LAB includes three schemes e Default e RT LAB extends Default e Emacs extends Default The Default scheme contains a general set of bindings in many cases recognizable as traditional key sequences for well known commands For instance Ctrl A is assigned to Select All and Ctrl S is assigned to Save It is important to understand why the RT LAB scheme says that it extends Default The RT LAB scheme is not a complete set of bindings like the Default scheme Rather it borrows from the Default scheme where possible only defining explicit RT LAB style bindings where they vary from the Default scheme Choose the scheme you are most comfortable with by changing the Scheme setting on the keys preference page If you choose the Default scheme all RT LAB bindings are ignored If you choose the RT LAB scheme explicit RT LAB style key sequence assignments take precedence over any conflicting assignments in the Default scheme Contexts Key bindings can vary based on the current context of RT LAB Sometimes the active part might be a text editor for instance where a different set of key sequence assignments may be more appropriate than if the active part was an html file editor This context is usually determined by the active part but it can be influenced by the active window or dialog as well If the active part does not choose a particular context the workbench will set the active context to In Windows RT LAB includes a nu
195. ditor pages refer to the following documents e Model Overview Page e Development Page including compiler and linker properties e Execution Page including real time and performance properties e Environment Variables Page e Files Page e Assignation Page including subsystem properties and utilities e Diagnostic Page including monitoring and debugging properties e Hardware Page including monitoring and performance properties e Simulation Tools Page including Matlab Simulink and Matrixx SystemBuild properties Each modification of a model property covers only the edited model and is saved only for the edited model A modification made in the Preference menu will not change edited model but will be effective for each new RT LAB model created after the modification Model Overview Page The Overview page contains three main sections that define important model properties e General Information e Preparing and compiling e Executing General Information RTLAB UG 104 00 137 Model Overview Page General Information This section describes general information about this model Name rtdemol Path C Git RT LAB build release win32 workspace rtdemol Simulink rtdemol mdl State Loadable Description RTDemol a The rtdemol model demonstrates m What is a PID controller PID stands for Proportional Integral Derivative This is a type of feedback controller whose output a control variable CV is generally based on the e
196. do not support XHP mode e Assignation starts at CPU 1 on multiple core systems CPU 0 is reserved e Specified cores are allocated first e Unspecified cores of XHP subsystems are allocated before unspecified cores of other subsystems RTLAB UG 104 00 Assignation Page e XHP subsystems cannot share cores with any other subsystem e Unspecified workers threads are allocated last using a fair distribution until no core are available Note that a system with N CPU has a maximum of N 1 subsystems in XHP When the Advanced section is activated select the in the Cores column to display the core selection dialog Then select the number of cores and optionally select specific cores Subsystem Core Selection Total Number of Allocated Cores y 4 Core Selected Core 0 Corel Core 2 Core 3 Core4 Core5 Core 6 Core 7 Core 8 Core 9 Core 10 Coreil Core 12 IB ROR RRATAORSESsG SelectAl Deselect All Multiple Assignation When selecting multiple subsystems at the same time in the table the user can set the properties for this group below the table target assignation XHP mode and debug mode This can also be used when only one subsystem is selected in the table 1 subsystem selected ss_plant Edit settings for selected subsystems Choose a physical node 193 24 E Run in XHP mode E Run in debug mode Select one or N subsystem s
197. dt 958 46 us dt 782 m pf Den Info Data ES gt Probes area This area shows all probes currently visible It also shows the model and subsystems probes that summarize the tasks for the model and the subsystems By default only commonly used probes are visible To select which probes are visible use the Filter dialog to edit and select filters Info area This area shows the main statistics of all visible probes By default only the CPU usage is visible but it is also possible to show the minimum maximum and mean durations of all visible probes for the current acquisition frame using the expand collapse buttons of this area Data area This area shows the duration start time and stop time for all visible probes for each time step of the acquisition frame The expand collapse buttons of this area show hide the time steps with without overruns By default only the steps with overruns are visible and only the durations are visible in the cells but it is possible to add timing content from the view menu When a time step contains an overrun a red symbol appears at the top of the column RTLAB UG 104 00 241 Monitoring View Using the Monitoring View Here are the steps to use the Monitoring view See the following sections for more detail on the toolbar and menu items Toolbar Select the model you want to monitor in the Project Explorer view Open the Monitoring view if necessary Click Window gt Show view gt Oth
198. e The easiest way to realize this is to right click on the Active Project and select Add to workspace The Active Project will then be replaced by a standard RT LAB project Project Explorer 32 E amp ae El Ja Targets E myproject Be EEA rtdemoi rtdemo2 rtdemo3 H E E Figure 13 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 FE Top Level Elements gt Select Working Set Deselect Working Set Customize view Link Editor Figure 14 Working Set Menu Clicking on Select Working Set displays the following dialog 178 RTLAB UG 104 00 Project Explorer Select Working Set Select a working set O Window Working Sets O No Working Sets Demos Testing Select All Deselect All Figure 15 Working Set 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 that 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 vog Top Level Elements gt Projects e Working Sets Select Working Set Deselect Working Set Customize Vie
199. e copied to the shared memory It is possible to use a mux block to send multiple values Data is actually updated in the shared memory when the Data Ready line is asserted The figure below is an example of usage of these three blocks in the example model for TCP IP communication gt AsynciP_sl sm_ip_test Ele Edit View Simulation Format Tools Help D a a ip m int Nomal v D i S BEATE Br Simple Ethernet communication example errors_status constants data ready 100Hz UDPAP amp TOPAP Asynchronous Ctr timeout send message 1 receive message 1 setwidth message 1 data OpiPSocketCti1 Figure 17 Example model subsystem with RT LAB asynchronous blocks Note that in this example the OpAsyncGenCtrl is replaced by the OpIPSocketCtrl block which uses the same s function sfun_gen_async_ctrl as the OpAsyncGenCtrl block but with a mask adapted to present only the subset of configuration parameters used by this specific application Preparing the C source code Once the user has defined what signals of his model must interface with the Asynchronous Program he must develop the C source code that will implement the specific algorithm required by his application All Asynchronous Programs use minimally the same 4 steps Initialization send loop receives loop and close section All of these programs use the Asynchronous API functions provided with RT LAB The available API functions are listed in the header file AsyncApi h l
200. e decimation factor and the number of samples per signal using this formula Duration Decimation factor x Number of samples per signal x Basic calculation step Sampling Pause Enables you to interrupt a signal acquisition and transmission without affecting the model which continues to run This parameter is used with repetitive sampling Sampling Continue Enables you to resume data acquisition after a pause This parameter is used with repetitive sampling Sampling Rearm Enables you to manually rearm the acquisition system This parameter is used with non repetitive sampling Sampling Apply to all Applies the current sampling options to all acquisition groups Console blocks on group This multiple choice function Groups 1 to n or without blocking enables you to stop signal display devices from the scope blocks Simulink scopes LabVIEW panels etc when data acquisition is not available But because all Simulink windows are frozen in blocking mode a Do not block option is added to avoid completely freezing Simulink In this mode and when acquisition is stopped the value displayed is the one chosen by the Output value when no data available parameter Output value when no data available When the Do not block option is selected this parameter enables you to choose an output value in the absence of data zero or the last output value Set group control Enables multiple users to connect to the same model and control ac
201. e Inthe subsystems table for each subsystem select the Assigned Node cell and then select the desired target node from the drop down menu RTLAB UG 104 00 47 48 Assigning subsystems RTLAB UG 104 00 Executing model Executing model Now that there is a builded model in your project here s how to make a typical simulation load execute change parameter reset e Selecting the simulation mode e Loading the model e Running the model e Using the Console e Resetting the model RTLAB UG 104 00 49 50 Executing model RTLAB UG 104 00 Selecting the simulation mode Selecting the simulation mode Before loading your model for real time simulation you must select the simulation mode of your model You have choice between four simulation modes Simulation Simulation with low priority Software Synchronized and Hardware Synchronized The model does not contain any I O card so you could choose Software Synchronized mode the model will run in real time and will be synchronized on internal timer If you would have I O card we would choose Hardware SYnchronized in this mode the model would run in real time and would be synchrnoized on external timer for example synchronized on 1 0 card timer To set the simulation mode e Activate the Project Explorer view e Select the model MyModel in the Project Explorer view e Double click the model to open its editor e Select the Execution page of the editor e Sel
202. e Parameters wizard 351 DIAlOGS steed Leu unten queen are du hee aha ey a ER Re ay ee ad aed 353 Build Configurations 355 File Search ti aa de oh mt de a edd 357 RT LAB SearchA 256 2 te te wb he da ead Wad a eaters Wake 359 License Request Dialog 363 Preferences use ee ces hd a AD ha Sa ee wet 365 Capabilities preference page 369 Compiler and Linker preference page 371 Monitoring preference page 373 Debugging preference page 375 Environment Variables preference page 377 Files transfers preference page 379 Performance preference page 381 Real time preference page 383 Hardware preference page 385 Simulation Tools preference page 387 EMTP preference page 389 Matlab preference page 391 Matrixx preference page 393 RT LAB preference page 395 Target Detection preference page 397 General preferences pages 399 Accessibility preference page 401 Annotations preference page 403 Capabilities preference page 405 Appearance preference page
203. e Previous View Activates the previous open view in the list of most recently used editors e Next Perspective Activates the next open perspective in the list of most recently used perspectives e Previous Perspective Activates the previous open perspective in the list of most recently used perspectives Preferences This command allows you to indicate your preferences for using the Workbench and RT LAB There are a wide variety of preferences for configuring the appearance of the Workbench and its views and for customizing the behavior of all tools that are installed in the Workbench 296 RTLAB UG 104 00 Help menu Help menu This menu provides help on using the Workbench Welcome This command will open the welcome content Help Contents This command displays the help contents in a help window or external browser The help contents contains help books topics and information related to the Workbench and installed features Help Search This command displays the help view opened on the Search page Dynamic Help This command displays the help view opened to Related Topics page Key Assist This command will display a list of key bindings Open Cheat Sheets This command will open the cheat sheet selection dialog Software Updates This command allows you to update your product and to download and install new software About This command displays information about the product installed features and available plu
204. e another Consider the case for Ctrl B above if contexts did not exist One plug in would assign Ctrl B to Build the other plug in would assign Ctrl B to Make Bold Text How would RT LAB properly resolve this conflict Though conflicts are drastically reduced by employing the above mechanisms they can still occur Two plug ins independent of one another could assign the same key sequence to different commands with the same context scheme platform and locale Consider if a plug in assigned Ctrl F4 in the In Windows context and Default scheme to one of its commands This directly conflicts with RT LAB assigning Ctrl F4 to the close command in the same context and scheme 426 RTLAB UG 104 00 Keys preference page This is a conflict It wouldn t be proper to invoke both commands nor would it be proper to simply choose one of the two commands to receive the key stroke We pop up the Key Assist Dialog with the conflicting commands and allow the user to select one The Key Assist Dialog is the same dialog that displays command choices for multiple key stroke key bindings For example if 2 commands were bound to F12 you might see a small dialog with two choices If the user sets a keybinding and creates a conflict the conflicting bindings will be displayed in the conflicts list This can be used to navigate between conflicting keybindings so that they can be changed These types of conflicts can be resolved by explicitly assigning the key sequen
205. e any error reporting will not appear on the screen For this reason it is always preferable to use the latter version of the command when launching DDF Configurator from the command line In addition you can pass options to the DDF Configurator as command line arguments The following command formats are supported e DDFConfig jar open sourceFile xml csv txt This command imports a DDF CSV or Dymola input file and starts a DDF Configurator that shows the corresponding data e DDFConfig jar convert sourceFile xml csv txt targetFile xml csv This command imports a DDF CSV or Dymola input file and converts it to either a DDF or a CSV file Note that this command will not show the graphical interface Again to execute the DDF Configurator with a console you need to prepend java jar to the above commands RT LAB Orchestra Simulink blocks RT LAB Orchestra blocks are connection end points of the Orchestra communication layer they are used to bridge the Framework and External Components 508 RTLAB UG 104 00 Setting up an RT LAB Orchestra co simulation There are 2 types of blocks in the RT LAB Orchestra Simulink library namely Proxy blocks and External Components blocks You insert Proxy blocks into a subsystem of an RT LAB Framework whereas External blocks are used from within an external Simulink model that you want to connect to an RT LAB Framework Refer to the Blocks reference on page 1 chapter of the RT LAB library s
206. e common to both views and editors We use the term part to mean either a view or an editor Parts can be active or inactive but only one part can be active at any one time The active part is the one whose title bar is highlighted The active part is the target for common operations like cut copy and paste The active part also determines the contents of the status line If an editor tab is not highlighted it indicates the editor is not active however views may show information based on the last active editor In the image below the Project Explorer view is active File Edit Simulation Tools Window Help E E edition Project Explorer 22 EI Display 32 E Properties Im Compilation H Matlab View Progress E Console Ao YP I SO No selection 0 items selected Clicking on the Display view causes the Display s title bar to become highlighted and the Project Explorer s title bar to no longer be highlighted as shown below The Display view is now active RTLAB UG 104 00 21 22 RTLAB UG 104 00 Editors Editors Depending on the type of file that is being edited the appropriate editor is displayed in the editor area For example if a TXT file is being edited a text editor is displayed in the editor area The figure below shows an editor open on the file file1 txt The name of the file appears in the tab of the editor An asterisk appearing at the left side of the tab indicates that the editor has u
207. e run on the target where the model executes The name of the Asynchronous Program is specified via a mask parameter and the Asynchronous Program itself must be compiled and transferred to the target prior to model execution The following sections will detail the build and transfer process Several OpAsyncGenCtrl blocks can be placed in the same RT LAB model to control either several instances of the same Asynchronous Program or several different Asynchronous Programs RTLAB UG 104 00 513 Building the asynchronous application Each OpAsyncGenCtrl block defines one unique Controller ID that is used by the asynchronous Send and Receive blocks to refer to the Asynchronous Program instance controlled by this OpAsyncGenCtrl block The OpAsyncGenCtrl block also allows the user to specify a set of parameters to be transferred to the program These parameters are retrieved by the Asynchronous Program using the OpalGetAsyncCtrlParameters function of the asynchronous programs API e OpAsyncRecv This block is used to receive data from the Asynchronous Program during model execution Its input allows the user to specify a Timeout value to be optionally used by the Asynchronous Program The Data output contains the values retrieved by the model in the shared memory It is possible to use a demux block to receive multiple values e OpAsyncSend This block is used to transfer data from the model to the Asynchronous Program The input is the data to b
208. e their settings in an attempt to show as much useful information as possible without making the code difficult to read e Code analysis Provides error finding in python programs It finds common errors such as undefined tokens duplicated signatures and warns about things such as unused variables or unused imports e Code completion provides context sensitive completions and is enabled with Ctrl Space key in the editor e Refactoring Provides functionalities to change the source code to improve code readability reduce complexity and improve the maintainability of the source code such as renaming extracting inlining code elements e Navigation Views Outline View Hierarchy View e Content Assistants Helps user to write code faster and more efficiently by providing list of accessible keywords such as variable method import module Once your script is open in the editor perform the following steps to edit your script e Locate the part of your script you want to edit e Type your text e Save your file by clicking the Save button in the main toolbar Running a Macro Script Follow these steps to run a macro e Select the Python script from the Project Explorer or click inside your script in the editor area e On the Tools gt Python menu click Run item Ctrl F11 or simply click the Run item in the drop down menu of the Python toolbar RTLAB UG 104 00 493 Using Python Script and the Macro Recorder Debu
209. eature using the Diagnostic Page of the model editor Refer to the Block Library Reference Guide for more information about the OpMonitor block Measuring a Model s Subsystem Calculation Time RT LAB monitoring provides information about RT LAB overhead and calculation time of the whole model Sometimes only a part of the Simulink SystemBuild model needs to be monitored In this case user probes could be added to the model s diagram using the OpMonitoringStart and OpMonitoringStop blocks These blocks allow you to measure the time spent by one subsystem on the model that is connected to these blocks Refer to the Block Library Reference Guide for more information how to insert these blocks into the model Measuring User Code Source Calculation Time User C code could be added to the Simulink SystemBuild model using S functions or UCBs This user code is part of the major and minor calculation time event At times parts of the user code need to be monitor This can be achieved using the monitoring API functions provided by RT LAB e OpalMonitoring_Register Registers a new event name and type e OpalMonitoring_LogStart Starts logging the timing of the specified event 486 RTLAB UG 104 00 Events and Probes List e OpalMonitoring_LogStop Stops logging the timing of the specified event See the Monitoring1 template to learn how to insert monitoring probes within user code e Create a new RT LAB Project e Type its name and then click Next
210. ecified extra files if any are transferred to the host target This option is not available for Windows platform Select All Add all steps to the build process Deselect All Remove all steps from the build process OK Applies changes and starts the build process Cancel Closes panel without applying changes 356 RTLAB UG 104 00 File Search File Search This dialog is useful to find files in the workbench The Search File dialog looks like DOC RSS 18 RT LAB Search AP File Search Containing text w Case sensitive any string any character escape for literals 1 Regular expression File name patterns Patterns are separated by a comma any string any character C Consider derived resources Scope Workspace O working set Figure 102 File Search This is how to search the Workbench for files e Inthe Containing text field type it The Containing text field also displays a list of recently performed searches to select from e The Case sensitive checkbox can be selected or deselected depending on whether or not a case sensitive search is to be performed You can also select the Regular expression checkbox to enable more powerful searching capabilities To see what is available in regular expression mode press Ctrl Space while the cursor is over the text field to get content assistance that lists the possibilities For this example onl
211. ecked to use the default location for your new model e Leave the box checked to use the default location for your new project Click Next when you are done New RT LAB Model RT LAB Model Create a new RT LAB model Model name MyModel Model type Matlab Simulink v This is a model with 1 real time subsystem o Model description Project MyProject Use default location e At this point you can select a template model containing a skeleton for your new model Select the Basic gt model_1_subsystem template This template contains a model with one real time subsystems and one console This is a perfect model to run a simulation on 1 core target RTLAB UG 104 00 31 32 lt New RT LAB Model RT LAB Model Select a template for your new model Available Templates B E Basic m model_2_subsystems model_3_subsystems gt empty Using the popup Model with 1 subsystem simple Simulink model with 1 subsystem Use this template to generate a simple Simulink model containing 1 subsystem Cancel e Click Finish when you are done The Project Explorer view will update to show your newly created model RTLAB UG 104 00 Using the popup CER File Edit Simulation Tools Window Help H E B a orna E A AE GRG Project Explorer 2 als MyModel mdl 3 SEEM E E Edition Overview amp de Targets ae MyProject General
212. ect This project can be generated from a template Available Templates orch gt k a gt Features Orchestra C E so E Rice Code Example Dymola a This model demonstrates how to use RT LAB Orchestra with an external C code Overview u 5 Figure 70 New Project wizard filtering templates Clicking on lt Finish gt will generate a new project from the selected template This project will then appear in the Project Explorer and will be ready to begin a simulation Note that modifying files in the newly created project will not affect the template itself This allows to make lots of changes and to create another similar and clean project if things go wrong RTLAB UG 104 00 307 New RT LAB project wizard 308 RTLAB UG 104 00 New RT LAB model wizard New RT LAB model wizard Main interface panel Use File gt New gt RT LAB Model to open the dialog that enables you to create a new model in the workbench New RT LAB Model RT LAB Model Create a new RT LAB model Model name MyModel Model type Matlab Simulink Model description Project rtdemoi Use default location Figure 71 New Model wizard main page Description This wizard explains how to create a new empty model or a model that is a copy of one supplied template model Parameter The first page of the wizard helps you to set parameters of your model Model name Name of the new model This field is required
213. ect Software Synchronized from Real Time simulation mode e Note that the Execution page allow to configure the real time options and performance options RTLAB UG 104 00 51 52 Selecting the simulation mode RTLAB UG 104 00 Loading the model Now that your model and RT LAB are configured here how to load your model with RT LAB e Activate the Project Explorer view e Select the model MyModel in the Project Explorer view e To start the load process use one of the following methods e From the menu bar select Simulation gt Load e From the the view s popup menu choose Simulation gt Load or e From the main toolbar click on the load button RTLAB UG 104 00 Loading the model 53 54 Loading the model RTLAB UG 104 00 Running the model Now that your model are loaded here how to execute your model with RT LAB e Activate the Project Explorer view e Select the model MyModel in the Project Explorer view e To start the run process use one of the following methods e From the menu bar select Simulation gt Execute e From the the view s popup menu choose Simulation gt Execute or e From the main toolbar click on the execute button RTLAB UG 104 00 Running the model 55 56 Running the model RTLAB UG 104 00 Using the Console Using the Console Now that your model and RT LAB is running here how to interact with your model by using the Simulink Console e Activate the Project Explorer
214. ect matrixTest sm_master Memory X0 1 0 MyProject matrixTest sm_master ConstantVarValue 33 0 MyProject matrixTest sm_master ConstantVar portl 42 0 MyProject matrixTest sm_master Constant Value 6 3 MyProject matrixTest sm_master Constant port1 10 Figure 47 Variables Table with pending changes Data T Double Double Double Double Double Variables Table View xy agn 0 Complex Size False False False False False Scalar 1x1 Scalar 1x1 Scalar 1x1 Scalar 1x1 Scalar 1x1 RTW True True True True True Access Read Write Read Write Read Only Read Write Read Only Note that pending changes are shared between views which means that only one pending change is allowed per variable at any time To edit the value of a vector or a matrix you have to use the Variable Viewer double click on the variable or right click on it and select Show In gt Variable Viewer Table Customization You can sort variables by name path type or any property by clicking on the corresponding column header Columns can be resized and moved by drag and drop The Variables Table also provides Filter and Search funcitonalities at the bottom of the view For advanced customization open the View Menu and select Customize Table to open the following dialog RTLAB UG 104 00 231 Variables Table View ustomize Table Customization Namespace RT LAB Select Customizatio
215. ected resource Overwrite existing resources without warning Determines whether importing a resource should silently overwrite a resource which already exists in the Workbench If this option is off you will be prompted before a given resource is overwritten in which case you can either overwrite the resource skip it or cancel the import Off Existing Project into Workspace Imports a project into this workspace that was previously located in this workspace or that currently exists in another workspace Select root directory Root directory in the File System to start scanning for projects to import Type in the full path or Browse to select the path on the file system Select archive file Archive file to scan for projects to import Type in the full path or Browse to select the archive on the file system Select All Check all of the projects that were found for import Deselect All Uncheck all projects Refresh Rescan the selected source for projects to import Copy projects into workspace When selected this will cause the imorted project to be copied into the current workspace Import as binary project RTLAB UG 104 00 311 Import wizard File System If you choose this option you will import files from the file system Directory The directory from which to import files Select a previous path from the drop down combo or Browse to select the path in the file system Filter Types Dialog to select which file types t
216. ed Console ES Open Console Description Clears the current console Toggles the Scroll Lock Pins the current console to remain on top of all other consoles in the current Console View Opens a listing of current consoles and allows you to select which one you would like to see Opens a new console of the selected type Most Console types provide the following additional commands 216 Availability Toolbar and Context menu Toolbar Toolbar Toolbar Toolbar RTLAB UG 104 00 RTLAB UG 104 00 Command Name Close Console Save Console session Console View Description Availability Closes the current Toolbar console Saves the current Toolbar content of the Console to a file 217 Console View 218 RTLAB UG 104 00 Interactive Python Console Interactive Python Console The Interactive Python Console is shown in the Console View This Console is provided by the PyDev plugin available at http pydev org Here is what the Interactive Python Console looks like vdey Console 2 gt gt gt import sys Os import os sys path append os environ RTLAB ROOT common bin r264 75708 Oct 26 2009 08 23 19 Python 2 6 4 MSc w 1500 32 bit Intel RT LAB v dev gt gt gt Figure 35 Interactive Python Console Overview To open a new Interactive Python Console you can use the main application toolbar BE 666 4 Run Run Configurations gg Open C
217. ed a Data Description File DDF A DDF is decomposed into a 4 level hierarchy Each level is further described in subsequent sections The figure below shows the structure of a sample DDF RTLAB UG 104 00 501 502 Configuring the RT LAB Orchestra communication layer lt xml version 1 0 standalone no gt lt orchestra gt lt domain name uav1 gt lt synchronous gt yes lt synchronous gt lt multiplePublish llowed gt no lt multiplePublish Allowed gt lt states gt no lt states gt connection type local gt lt set name PUBLISH gt lt item name Autopilot gt lt type gt double lt type gt lt item gt lt item name Throttle gt lt type gt int lt type gt lt length gt 4 lt length gt lt item gt lt set gt lt set name SUBSCRIBE gt lt item name Elevation gt lt type gt double lt type gt lt default gt 12 3e4 lt default gt lt item gt lt item name Heading gt lt type gt double lt type gt lt description gt Where the aircraft nose is pointing lt description gt lt default gt 23 lt default gt lt item gt lt item name Roll gt lt type gt byte lt type gt lt length gt 1 lt length gt lt item gt lt set gt lt domain gt lt forchestra gt The Orchestra root element The lt orchestra gt element is at the top of a DDF All the XML elements comprised between the opening and closing lt orchestra gt tags are part of the same co sim
218. ed between SS subsystems they are not automatically sent at the beginning of the step To exchange all data that are available at the beginning of a simulation step and maximize communication between your network s nodes the variables priority must be declared so that the RT LAB scheduler will most efficiently send the outputs In Simulink this is done by adding an underscore followed by an s _s where the s stands for Start by sending Adding this notation will instruct RT LAB to start the calculation step by sending the output data identified by the _s a a Out Qutl_s Figure 7 Adding an _s to the outport Adding an _s to the end of an output s label does not mean input dependant data will automatically become state variables ready to send at the beginning of the step Whether an output is input dependant or a state variable is a property inherent to the nature of that variable in the system so changing a variable s name will not affect its behavior Whenever input dependant data is to be sent as a priority a Delay block must be used RTLAB UG 104 00 Executing models Executing models This chapter describes the simulation types available with RT LAB explains how to build and execute a model Target platform RT LAB supports three different target platforms e Windows XP Vista 7 For pure simulation or pseudo real time execution e QNX 6 x For pure simulation or real time execution e Re
219. ed in the menu and could be changed in the Matlab preference page Preference page Python Launches Python scripts opens an interactive console or use the Macro recorder e Run Starts the currently selected Python script Run configurations Opens a dialog to set the settings used when running a Python script Open Console Opens the Interactive Python Console e Record Record the next actions performed on a project in a new Python macro e Stop recording Stop the recording of the Python macro and save it to file e Pause recording Pause the recording e Resume recording Resume the recording e Cancel recording Cancel the recording RTLAB UG 104 00 287 Tools menu 288 RTLAB UG 104 00 Simulation menu Simulation menu This menu allows to control a simulation Build Ctri Alt C Builds the selected Subsystems the selected Models or all the Models of the selected Project See Building models Build configurations Opens the Build Configurations dialog Assign Ctrl Alt A Opens the Assignation Page for the selected Models Load Ctrl Alt L Loads the selected Models or all the Models of the selected Project See Executing models Execute Ctrl Alt S Starts the execution of the selected Models or all the Models of the selected Project See Executing models Execute a single step Simulate one calculation step at a time of the model only available when the model is paused Pause Ctrl Alt P
220. ed to work with that tool When you finish working with that tool the next step is automatically highlighted and it becomes the current step When the current step is a manual task you will need to perform the work and click Click to Complete to move to the next step check mark appears in the left margin of each completed step Getting help information for tasks To get step by step instructions for that step click the help link in the step before you click Click to Perform and the step by step instructions on how to work with that tool will be displayed in the Help window Additional help for entry fields in the tool or wizard may be available by focusing on the field use the Tab key to position to that entry and pressing Fl Skipping a step If a current step has a Click to Skip option then it is an optional step You must click Click to Skip to skip the current step when you do the step will have the skip mark in the left margin If the task does not present Click to Skip you must perform that step and you cannot skip it Redoing a step You can redo any step that you may have completed or skipped in the current cheat sheet To redo the step expand the step by clicking its expand icon and then clicking Click to Redo After redoing a step the cheat sheet will continue from the redo step Closing the cheat sheet When you finish the last step in a cheat sheet it automatically restarts You can also close the active cheat
221. ed under the Orchestra root node At the top of the Explorer View is the root node The root node is a container for all the other data elements of a DDF namely domains data sets and item names You can expand a tree node to view its content The Properties View displays the properties of the element currently selected in the Explorer View There are 4 variants of the Properties View that correspond to the 4 level hierarchy of a DDF The figure below shows a snapshot of the DDF Configurator with the data item Heading selected in the Explorer View and the corresponding Properties View RTLAB UG 104 00 505 506 DDF Configurator DDF Configurator File Domain item Help E orchestra 9 E uav CJ FRAMEWORK gt CLIENT yes y 9 CI CLIENT gt FRAMEWORK Elevation Data Type For Item Heading 4 item Heading Is Selected double Rd Array length E Pitch E Roll Default Value For Item Heading 23 Description For tem Heading Where the aircraft nose is pointing Creating a domain A domain in the Explorer View consists of a Publish set and a Subscribe set The Publish set denoted FRAMEWORK gt CLIENT contains the data items published written by the RT LAB Framework to the Orchestra communication layer whereas the Subscribe set denoted CLIENT gt FRAMEWORK contains the data subcribed from read from the Orchestra communication la
222. eferred to as the Framework and simulation components that exchange data with this Framework are referred to as External Components RT LAB Orchestra provides a real time user configurable communication layer that sits on top of the RT LAB Framework In this context RT LAB becomes a backbone that provides a transport layer between simulation components Currently supported External Components are e C code applications e standard non RT LAB and RT LAB Simulink models e standalone Dymola models As a software application RT LAB Orchestra consists of the following entities e a configuration file used to specify the simulation data exchange between the Framework and External Components the communication layer depends on the content of this configuration file e a library of Simulink blocks the rtlab_orchestra Simulink library that provides interfaces between the Framework and External Components e a C code application programming interface the Orchestra RT API which is used by External Components to exchange simulation data with the Framework Calls to the RT API are embedded in an External Component where the data exchange takes place Each of these entities is further described below Configuring the RT LAB Orchestra communication layer The RT LAB Orchestra Data Description File You configure the RT LAB Orchestra communication layer by specifying the simulation data to be exchanged in an eXtended Markup Language XML file call
223. el MyModel in the Project Explorer view To start the complete build process use one of the following methods e From the menu bar select Simulation gt Build e From the the view s popup menu choose Simulation gt Build or e From the main toolbar click on the build button It is also possible to start the build process using the Build Configuration dialog This dialog allows you to change RT LAB configurations For example it allows 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 do the following e From the menu bar select Simulation gt Build Configurations e From the the view s popup menu choose Simulation gt Build Configurations or e From the main toolbar select the drow down menu of the Build button then click the Build configurations item menu After starting the build process the Compilation view will output compilation results RTLAB UG 104 00 45 46 Building the model RTLAB UG 104 00 Assigning subsystems Assigning subsystems The last step before executing the model in real time is to select on which target nodes each subsystems will be executed This step is called assignation e Activate the Project Explorer view e Select the model MyModel in the Project Explorer view e Double click the model to open its editor e Select the Assignation page of the editor
224. elete and click Delete e Click OK Related concepts Perspectives RTLAB UG 104 00 551 Deleting a user defined perspective 552 RTLAB UG 104 00 Resetting perspectives Resetting perspectives To restore a perspective to its original layout e Open the General gt Perspectives preference page e From the Available perspectives list select the perspective you want to restore e Click Reset e Click OK Related concepts Perspectives RTLAB UG 104 00 553 Resetting perspectives 554 RTLAB UG 104 00 Working with views and editors Working with views and editors Views and editors are the main visual entities which appear in the Workbench In any given perspective there is a single editor area which can contain multiple editors and a number of surrounding views which provide context The Workbench provides a number of operations for working with views and editors Related concepts Views Editors Fast views Detached views Perspectives RTLAB UG 104 00 555 Working with views and editors 556 RTLAB UG 104 00 Opening views Opening views Perspectives offer pre defined combinations of views and editors To open a view that is not included in the current perspective select Window gt Show View from the main menu bar You can create fast views to provide quick access to views that you use often After adding a view to the current perspective you may wish to save your new layout by clicking Window gt
225. ements of the workbench presentation Related concepts Editors 578 RTLAB UG 104 00 Customizing the Workbench Customizing the Workbench Many aspects of the appearance and behavior of the Workbench can be customized to suit your individual needs For example you can e Rearrange where items appear in the main toolbar e Change the key bindings used by editors e Change the fonts and colors which are used Related concepts Views Editors Workbench RTLAB UG 104 00 579 Customizing the Workbench 580 RTLAB UG 104 00 Customizing the Welcome Customizing the Welcome The welcome appearance can be customized via the customize page button above the welcome page This opens a customize dialog which allows you to select one of the pre defined themes which affects the overall look of the welcome You can also select which pages will be displayed and the visibility layout and priority of the items within each page Related concepts Welcome RTLAB UG 104 00 581 Customizing the Welcome 582 RTLAB UG 104 00 Workspace Switching Workspace Switching The current workspace for RT LAB can be switched by using the File gt Switch Workspace command The Switch Workspace menu item will open the switch workspace dialog The dialog will allow you to browse for or manually enter a new workspace location The combo will also allow you to select your previously selected workspaces Settings Transfers When you switch your work
226. en the Load Parameters wizard that let you load a set of parameters and set values on the selected model Save Parameters 290 RTLAB UG 104 00 Simulation menu Open the Save Parameters wizard that let you save the values of all parameters of the selected model RTLAB UG 104 00 291 Simulation menu 292 RTLAB UG 104 00 Window menu Window menu This menu allows you to display hide and otherwise manipulate the various views perspectives and actions in the Workbench New Editor This command opens an editor based on the currently active editor It will have the same editor type and input as the original Open Perspective This command opens a new perspective in this Workbench window This preference can be changed on the General gt Perspectives preference page All of the perspectives that are open within the Workbench window are shown on the shortcut bar The perspectives you will likely want to open are listed first This list is dependent on the current perspective From the Other submenu you can open any perspective Open Perspective E Edition default Pydev Resource 0 ds amp Team Synchronizing Cancel Show View This command displays the selected view in the current perspective You can configure how views are opened on the General gt Perspectives preference page Views you are likely to want to open are listed first This list is dependent on the current perspective From
227. enable or disable various product components These Capabilities capabilities are grouped according to a set of predefined categories Development Diagnostic Execution Hardware O Ca Developer Simulation tools Ca Advanced User Team E WindowTester Capabilities Description Restore Defaults Apply RTLAB UG 104 00 97 98 Choose Window gt Preferences Expand General and select Perspectives Select Edition default gt Make Default and then click OK gt Preferences type filter text amp Colorer Library Editor General Appearance Capabilities Compare Patch Content Types Editors Keys Perspectives Search Startup and Shutdown Web Browser Workspace Help E Pydev RT LAB H Run Debug t Team Terminal WindowTester Perspectives Saving perspectives Open new perspective 6 In the same window In a new window Open a new view within the perspective As Fast view Open the associated perspective when creating a new project O Always open Never open Prompt Available perspectives Note Reset takes effect the next time the perspective is opened Resource ro Team Synchronizing Restore Defaults Apply Any changes to the saved state of the perspective has now been undone To update the current copy of the Resource perspective that is being worked with also choose Window gt Reset Perspective from the Workbench s
228. ench On Windows the Workbench will first attempt to launch the editor in place as an OLE document This type of editor is referred to as an embedded editor For example if you have a doc file in the Workbench and Microsoft Word is registered as the editor for doc files in your operating system then opening the file will launch Word as an OLE document within the Workbench editor area The Workbench menu bar and toolbar will be updated with options for Microsoft Word Any number of editors can be open at once but only one can be active at a time The main menu bar and toolbar for the Workbench window contain operations that are applicable to the active editor Tabs in the editor area indicate the names of resources that are currently open for editing An asterisk indicates that an editor has unsaved changes By default editors are stacked in the editor area but you can choose to tile them in order to view source files simultaneously Here is an example of a text editor in the Workbench File Edit Navigate Simulation Tools Window Help H H B a4l0wus 6 4 2 FS Project Explorer 52 gt 01 filei txt 23 ESE HJ Targets E g Project1 H Models ts File system ES Filet txt This is a sample text file name appears in the tab above 1 2 3 The name of the kile is filel txt and the 4 5 A indicates that the editor has unsaved changes EE Display 53 E Properties lord Compilation Sh matlab View Progress El
229. end Initially no projects will be selected Related Concepts New RT LAB project wizard Project Explorer RTLAB UG 104 00 325 New Resource Project wizard 326 RTLAB UG 104 00 New Folder wizard This wizard helps you create a new folder in the Workbench Here is what the New Folder wizard looks like 2 New Folder Folder Create a new folder resource Enter or select the parent folder A BE JaneQUser mW JaneQUser2 Folder name Parameters Enter or select the parent folder Cancel New Folder wizard The resource in which the new folder will be created Type or navigate the list to select the resource The default value is the resource that was selected when you chose to create the new folder Folder name The name for the new folder Advanced The Advanced button reveals or hides a section of the wizard used to create a linked folder Check the Link to folder in the file system checkbox if you want the new folder to reference a folder in the file system Use the field below the checkbox to enter a folder path or the name of a path variable Use the Browse button to browse for a folder in the file system Use the Variables button if you want to use a path variable to reference a file system folder Related Concepts Linked resources RTLAB UG 104 00 327 New Folder wizard 328 RTLAB UG 104 00 New File wizard New File wizard This wizard helps you create a new
230. ent in the Explorer View will be mapped back to the block s mask Only one domain can be associated with a given block and therefore you need to select that domain if there are more than one domains in the Explorer View To select a specific domain left click it and set the toggle button to yes At any time you can view which domain is currently selected by clicking the Orchestra root node and checking the Selected Domain field of the corresponding Properties View Note that selecting a domain automatically un selects the previously selected domain if any Once a domain is selected you can also choose to map only a subset of the data items to a block s inports and outputs By default all data items created inside a data set are selected To un select a data item click the item name in the Explorer View this will display the Properties View for that item Then choose no under the Item item name Is Selected field on the Properties View When DDF Configurator is launched as a standalone application selecting a domain or selecting data items has no incidence on the generated DDF DDF Configurator Command Line Arguments To launch the DDF Configurator from the command line enter ddfConfig jar or java jar ddfConfig jar Either of these commands will show an empty DDF Configurator The difference between these 2 command s is that the former version does not associate a console with the executable therefor
231. enu or by clicking on the Search button in the main toolbar BAUER File Edit Navigate Search Simulation Tools Window Help Fr 105 4 Search Ctrl H N 4 EP File E Project Explorer SP RT LAB Search Text gt HJ Targets Figure 1 Search Menu i ye 1 RT LAB Search P 2 File Search Figure 2 Search buttons Main toolbar The Ctrl H shortcut key can be used to open the RT LAB Search dialogs The search dialogs available in the workbench are e RT LAB Search e File Search The results of the search will be displayed in the Search View It is also possible to start a quick text search To perform this type of search select a text select the sub menu Text from the main menu Search and then click on Workspace It will start a file search with the specified text and the results will be displayed in the Search View RT LAB File Edit Navigate Search Simulation Tools Window Help Pr B 4 Search Ctri H ES File P RT LAB Search Working Set Figure 3 Quick text search RTLAB UG 104 00 77 78 Searching RTLAB UG 104 00 Rearranging views and editors Rearranging views and editors This section will explain how to rearrange editors and views to customize the layout of the Workbench Setup Before rearranging the Workbench a little housekeeping is required e Start by choosing Window gt Reset Perspective and selecting OK This will reset the current perspective to its orig
232. er menu and the select the RT LAB gt Monitoring item While the model is running click the Get Probes or Get Probes constantly buttons to perform 1 or N monitoring acquisitions respectively If consecutive acquisitions are performed click the Stop button to cancel the acquisition In the probe area expand and collapse model and subsystem probe items to display the probes of interest If necessary click the Filter button in the toolbar to apply different filters and change which probes are visible By default only the most commonly used probes are displayed Expand and collapse the Info and Data area to get more details on the probes Click the Units menu item and then use the Units dialog to change the units of all timing information Click the Properties menu item and then use the Monitoring Properties dialog to change the acquisition setting of the monitoring Search for time step with overrun in the data area To do so use e the Search overrun button from the toolbar e scroll through the column in the data area to find the error symbol or e collapse the column without overruns using the expand collapse button from the data area Save the monitoring results to a CSV file or copy the cells to your favourite text editor The view toolbar contains the following buttons 242 ICON DESCRIPTION dh Get probes 1 Get probes from the running simulation It acquires only one acquisition frame of N consecutive steps E Get
233. er history to make room for new history Maximum file size MB Indicates the maximum size of individual states in the history store If a file is over this size it will not be stored RTLAB UG 104 00 433 Local History preference page 434 RTLAB UG 104 00 Perspectives preference page Perspectives preference page On the General gt Perspectives preference page you can manage the various perspectives defined in the Workbench Open a new perspective Use this option to set what happens when you open a new perspective Do you want the perspective opened within the current Workbench window or opened in a new window Open a new view Use this option to specify what happens when a new view is opened It is either opened to its default position within the current perspective or it is opened as a fast view and docked to the side of the current perspective New project options Use this option to specify the perspective behavior when a new project is created You can set it to switch the current perspective to be the one associated with the project type and open the perspective in the same Workbench window as the current one switch the perspective and open it in a new Workbench window or not to switch perspectives at all Available Perspectives Options Make Default Sets the selected perspective as the default perspective Reset Resets the definition of the selected perspective to the default configuration This option is only a
234. er the network This will enable the target detection for a few seconds and if any new target is detected the Detected Targets Wizard will be opened Naming Targets Each RT LAB Target of the workbench must have a unique name This is an alias that is saved on the Host computer A Target has also a local name stored on the target itself and shared with all users By default the hostname defined by the Targets s Operating System is used This local name appears in the Detected Targets Wizard and can be changed later using the Target Editor It is stored in a text file located at usr opalrt local targetname If the local name is a default one such as localhost or if this name already exists in the Workbench the Detected Targets Wizard automatically generates a unique name such as Target_XXX where XXX are the last 3 digits of the Target s IP address Hidden targets If you set the local name of a Target to hidden this Target will not be detected by this wizard anymore so other users will not be notified when this Target is connected to the network However this Target still remains accessible and can be added to any workbench by using the New Target wizard 322 RTLAB UG 104 00 Detected Targets Wizard Ignoring targets When pressing Finish unselected targets will be ignored at least until RT LAB is restarted or until a target discovery is performed Optionally targets may be definitively ignored
235. erated by RT LAB Figure 19 Customize View Filters dialog Here is a brief description of the RT LAB filters FILTER DESCRIPTION Internal resources generated by RT LAB Hides internal files such as llm IIp Project Explorer 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 see Filter Resources 180 RTLAB UG 104 00 Project Explorer Target Shows only Targets that match user settings Note Settings are editable through the ToolBar see Filter Targets ToolBar The Toolbar of the Project Explorer contains the following elements ICON NAME Collapse All Link Editor B D Filter Resources 3 Filter Targets View Menu q 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 p
236. erface e MonitoringViewer Starts the Monitoring View e ProbeControl Starts the Probe Control Panel e Dinamo Starts the DINAMO panel e ScopeView Starts the ScopeView application to acquire and display signals from real time simulation See Using ScopeView for more information e Display Controller s Displays RT LAB Controller application in the taskbar Unchecked by default e Enable Controller s log Creates a file called Controller log in the RTLAB_ROOT common bin folder for debugging use Unchecked by default e Help Opens the RT LAB Help Center e Exit Closes MetaController RTLAB UG 104 00 453 MetaController 454 RTLAB UG 104 00 Help Help The Help system lets you browse search bookmark and print help documentation The documentation is organized into sets of information that are analogous to books The help system also supplies a text search capability for finding the information you need by search phrase or keyword and context sensitive help for finding information to describe the particular function you are working with You can interact with help system in the workbench using the Help view or in the separate Help window The view and window provide the same information but in different ways The Help view The Help view provides help inside the workbench You can open the view from the main menu by selecting Help gt Dynamic Help or Help gt Search The view will open showing the Related Topics or
237. erspective As Display LS Projecti Reset Perspective Ah Matlab view ES Models Close Perspective El TS File system Close All Perspectives R B E Project Explorer ES file2 txt Navigation gt E Properties ES file3 txt Progress Preferences Other Alt Shift Q Q ES Project1 filet txt Through the normal course of using the Workbench you will open move resize and close views If you d like to restore the perspective back to its original state you can select the Window gt Reset Perspective menu operation RTLAB UG 104 00 A simple project A simple project Now that the basic elements of the Workbench have been explained here are some instructions for creating a simple project New projects folders files models and targets can be created using several different approaches In this section resources will be created using three different approaches e File menu e Project Explorer s view context menu e New Wizard button A project can be created using the File menu Once the project has been created a model and target can be created as well RTLAB UG 104 00 27 28 A simple project RTLAB UG 104 00 Using the File menu Using the File menu You can create new resources by using the File gt New menu on the Workbench menu bar Start by creating a simple project as follows e From the menu bar select File gt New gt RT LAB Project e Inthe Project name field type your name as the name o
238. erties Opens the Development Page of this Model Editor Build the model Builds the model with RT LAB 138 RTLAB UG 104 00 Development Page Consult result in the Compilaiton view Opens the Compilation View Check errors in the Problem View Opens the Problems view Assign targets to subsystems Opens the Assignation Page of this Model Editor Executing Executing To execute the model Set the execution properties O Load D gt DD y the model E check execution results in the Display View E Check execution warnings and errors in the Problem View This section provides some shortcuts relative to the model execution Set the execution properties Opens the Execution Page of this Model Editor Load Loads the executable code onto the target nodes only avalaible when the model is loadable Execute Starts the simulator and the execution of the distributed model s simulation on the network of target only avalaible when the model is paused Pause Puts the system in a waiting state stopping calculation without resetting the nodes To continue execution click on Execute only avalaible when the model is running Reset Terminates the execution of the executable s on the target nodes and causes a complete stop of the simulator only avalaible when the model is running or paused Check execution results in the Display View Opens the Display View Check execution warnings and errors in the Problem View Opens the
239. es reside in projects Projects can contain Model folders and or individual files RTLAB UG 104 00 63 64 Navigating resources RTLAB UG 104 00 Opening resources in the Project Explorer Opening resources in the Project Explorer Using the Project Explorer there are several ways to open an editor e In the Project Explorer view select the file MyScript py e To open an editor on the file choose one of the following approaches e To edit a resource using the default editor for that resource either double click on the resource or select the resource and choose Open from its popup menu e To use a specific editor to edit the resource start by selecting the resource and choose the Open With option from the popup menu e The Workbench remembers the last editor that was used for editing a specific file This makes it easier to use the same editor down the road The default editors can be configured using the General gt Editors gt File Associations preference page Using the Project Explorer there is also a simple way to open an editor of a model e In the Project Explorer view select the model MyModel e To open an editor on the model double click on the resource or select the resource and choose Open from its popup menu e To edit the block diagram of the model using Simulink SystemBuild or EMTP Works select the resource and choose Edit from its popup menu RTLAB UG 104 00 65 66 Opening resources in the Project
240. es such as files and folders Except if they are filtered see Filters below all the files and folders present in a project s directory appear as children of the File system container RTLAB UG 104 00 171 172 Project Explorer Project Explorer 2 E NE D Targets g RT Demo H jE Models 5 File system H S help ECS models gt rtdemoi EC rtdemo2 H E Opcommon HS report gt rtdemo2_sm_master gt rtdemo2_ss_slave gt rtdemo2_2_sc_user_interface mdl gt rtdemo2 mdl B rtdemo2 probe gt rtdemo3 H E tmseq 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 gt File or New gt 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 when creating a linked folder New Folder Folder Create a new folder resource Enter or select the parent folder RT Demo A gt iS RT Demo Folder name Scripts Link to Folder in the file system C NOPAL RT Scripts Figure 4 Linking a folder RTLAB UG 104 00 Project Explorer The selected folder will then appear in the Project Explorer as shown below Project Explorer 3 BG AI E se Targets 2 5 RT Demo 8 Models 25 File system HS help
241. esired environment variables that you want to import If you want to select deselect all environment variables you CAN click on the Select All and the Deselect All buttons respectivel 3 Click on the OK button Edit an user variable 146 Environment Variable Properties Name Value Description To modify an user variable MyUserYariable 1 1 Select an user variable from the list to modify 2 Click on the Edit button 3 Change the desired field Name Value or Description field For the Value field you could choose between these options e Fill a value manually e Select a path to a file or a folder by clicking on File or Folder button RTLAB UG 104 00 Files Page e Get the value of an host environment variable by clicking on Variable button 4 Click on OK button Delete an user variable To remove an user variable 1 Select the user variable from the list to delete 2 Click on the Delete button Set Unset an user variable You can also Set or Unset an user variable to activate deactivate variables on the target nodes Unset variables are unavailable on the target 1 Select the user variable you want to Set or Unset 2 Click on the Set Unset button Files Page This page shows the files properties for the edited model The default property values for anew model come from the RT LAB Preference pages If a property is changed from t
242. esources to the Workbench Export Launches the Export wizard which enables you to export resources from the Workbench Properties Alt Enter Opens the Properties dialog for the currently selected resource Recent file list Contains a list of the most recently accessed files in the Workbench You can open any of these files from the File menu by simply clicking the file name You can control the number of files in this list from the Editors preference page Exit Closes and exits the Workbench RTLAB UG 104 00 Edit menu Edit menu This menu helps you manipulate resources in the editor area and in the Project Explorer view Undo This command reverses your most recent editing action Redo This command re applies the editing action that has most recently been reversed by the Undo action Cut This command removes the selection and places it on the clipboard Copy This command places a copy of the selection on the clipboard Paste This command places the text or object on the clipboard at the current cursor location in the currently active view or editor Delete This command removes the current selection Select All This command selects all text or objects in the currently active view or editor Find Replace This command allows you to search for an expression in the active editor and optionally replace the expression with a new expression Find Next This command allows you to search for the next occurrence of the curre
243. ess Local name Y Target_172 192 168 0 172 localhost localdomain Y WandaBox 192 168 0 231 WandaBox W Target_190 192 168 0 190 localhost localdomain Select all Deselect all Figure 83 Detected Targets Wizard How to open this wizard This wizard can be opened in three different ways Clicking on a New Target notification If target notifications are enabled see Target Detection preference page a popup will be displayed each time a new target is detected on the network 3s New target detected Click here to manage this target WandaBox 192 168 0 205 Figure 84 New Target notification Clicking on this notification will open the Detected Targets Wizard Clicking on the New Target icon on the status bar When new targets are available an icon is displayed on the Status Bar RTLAB UG 104 00 321 Detected Targets Wizard gt as Figure 85 Status bar icon of the Detected Targets Wizard Clicking on this icon will open the Detected Targets Wizard e Performing a Target discovery from the Project Explorer At any time even if automatic target detection is disabled you can start a target detection over the network right click on the Targets item of the Project Explorer and select Discover targets Project Explorer E E Targets New gt Paste Ctrl V Delete Delete Rename F2 2 Discover targets Properties Alt Enter Figure 86 Discovering targets ov
244. estore Default Value This command is used to restore the default value defined in the preference pages RTLAB UG 104 00 Matlab View Matlab View The Matlab View provides a quick access to the local Matlab application inside RT LAB From here it is possible to make modification to the offline model with Matlab The Matlab View appears in a tabbed notebook ED Display E Properties Si matlab View ES Progress Ex Problems Console ors Compilation E Display A Se Li e do AB amp amp ry CART LAB1buildireleaseywin321Examples Basiciredemo21Simulink v m E Shortcuts 2 Howto Add a What s New Current Directory O A x gt Command Window a 12x es amp New to MATLAB Watch this Video see Demos or read Getting Started x All Files gt gt ID Opcommon report 5 rtdemo2_sm_controller DO ridemo2_ss plant E tdemo2 lim 1 tdemo2 mdl E rtderno2 probe la rtdemo2_2_sc_user_interface mdl lt gt Command History CEE a A 18 01 10 11 24 IM a 18 01 10 11 25 AM iim 18 01 10 1 39 PM 7 lt ill gt i Figure 29 Matlab View The next section presents how to open Matlab Other sections show some examples and explain the toolbar By default the Matlab View is included in the Edition perspective To add it to the current perspective click Window gt Show view gt Other gt RT LAB gt Matlab View How to open Matlab within RT LAB There
245. et To activate the drop down menu simply click on the down arrow File Edit Simulation Tools Windo CE AO LS RT LAB Project E RT LAB Target E la P RT LAB Model F Other Ctri N e Inthe Name field type a unique name for a new target computer Do not use spaces or special characters in this name for example MyTarget201 It is a good practice to add the last number of the IP address of the target at the end of the name to help you to quickly identify your target e Inthe IP address field type the IP address of your target computer Use the following format for the IP address where is a number between 0 and 9 e At this point you can verify that the target is up and running by clicking the Ping button New RT LAB Target RT LAB Target IP address must be specified Name MyTarget202 IP Address 192 168 0 202 e Click Finish when you are done e In the Project Explorer view ensure your project is still selected and the view is active e Click New Wizard in the Workbench toolbar Previously we clicked on the drop down arrow of the New button Here we clicked on the button itself which has the same effect as choosing File gt New gt Other e Inthe New wizard select General gt File Then click Next e Once again your project s name appears by default in the Enter or select the parent folder field e Inthe File name field type a unique name for an py file Pytho
246. eys Selecting a resource with the arrow keys will open it in an editor Note Depending on which view has focus selecting and opening a resource may have different behavior RTLAB UG 104 00 421 General preference page 422 RTLAB UG 104 00 Help Content preference page Help Content preference page Help topics from remote servers can be included seamlessly into the local help system Use the Help gt Content preference page to configure one or more remote server to include content from Include help content from a remote infocenter If checked this option enables the use of remote help content The rest of the fields on the page are only enabled if this option is checked Add Edit Delete Add edit or delete a remote data source View Properties View the properties for this remote data source Test Connection Tests to see if it is possible to connect to this host port combination Disable Enable Allows a data source to be disabled so the help system will not try to read topics from that source Pressing the Add button opens a dialog to add a new infocenter these are the fields that can be entered in the Add new infocenter dialog Name A name for this infocenter Host Specifies the host name of the system that is running the infocenter to server remote help content This must be a host name and cannot be a URL i e it cannot start with http Path Specifies the context root of the Infocenter application running
247. f your new project Do not use spaces or special characters in the project name for example MyProject New RT LAB Project RT LAB Project Create a new RT LAB project This project can be generated from a template Project name MyProject Use default location Project description Leave the box checked to use the default location for your new project Click Finish when you are done If you sneak a peek at the navigation view you will see that it now contains the simple project we just created 74 Project Explorer 3 O ERDA de Targets 8 E MyProject RTLAB UG 104 00 29 30 Using the File menu RTLAB UG 104 00 Using the popup Using the popup Now that we have our project we will create a model We will create our model using the Project Explorer view s popup menu e Activate the Project Explorer view and select the project MyProject From the view s popup menu choose New gt RT LAB Model e In the New Folder wizard your project name appears by default in the Project field This is because we chose to create the new model from your project s context menu e Inthe Model name field type a unique name for your new model Depending on the platform you are running on some characters will not be allowed for example MyModel e In the Model type field select the type of model you want to create e Inthe Model description field type a description of your model Leave the box ch
248. ference page Properties Opens the Properties View to display informations 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 the 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 RTLAB UG 104 00 187 SOURCE File File or folder Model or model file Model or model file Model or model file Model or model file Subsystem Subsystem Subsystem Console Target Target Target Python script py Bitstream bin DESTINATION Folder Project RT LAB project or Models folder Target Editors area Matlab View Target Editors area Matlab View Matlab View Subsystem Model Target folder Target Target Related references 188 Wizards Executing models Toolbars Workbench Menus Project Explorer ACTION Move this file to the destination folder Hold lt Ctrl gt key to make a copy instead of moving the file Move this file or folder to the destination project Hold lt Ctrl gt key to make a copy instead of moving the file or folder Add the model file to the destination project and create a new Model resource in this project Hold lt Ctrl gt key to make a copy of the model and add this copy to the project
249. figure the RT LAB target detection Here is what the Target Detection preference page looks like Target Detection z VA Here you can configure the target detection Basic Y Enable target detection Y Display notifications Automatically add new targets to the workbench Adwanced Ignored targets Detection ranges Restore Defaults Apply The Restore Defaults button enables the user to restore the defaults value of the parameters Enable target detection Uncheck this option to completely disable automatic target detection Target detection can still be manually done by right clicking on the Targets item of the Project Explorer and selecting the Discover targets menu Display notifications Displays a popup notification each time a target is detected a New target detected Click here to manage this target WandaBox 192 168 0 205 Figure 105 New target notification Clicking on the notification opens the Detected Targets Wizard Automatically add new targets to the workbench New targets are added to the workbench as soon as they are detected RTLAB UG 104 00 397 Target Detection preference page Ignored targets If you do not want to be notified when a particular target is connected to the network simply add its IP address to this table This table is also automatically populated by the Detected Targets Wizard Detection ranges Here you can limit the target detection to some
250. file is enabled Dynamic Signals panel The Dynamic Signals panel is the graphical interface to manage dynamic signals The dynamic signals are the signals available inside the model A signal is the port s outputs of a block Any signals could be added to an acquisition group in order to be displayed In order to have access to all the signals inside them the model the option Reuse storage signals should be set to off in the Simulation parameters of the Simulink model Dynamic Signal Panel Acquisition group num 1 Current model systems and signals set CH Dynamic Signals rtdemo1 Signal label signal1 a sm_computation Signal path rtdemo1 sc_user_interts 8 Control Signals Signal alias a T ttdemol Signal value 0 000000 a sc_user_interface lt Acquisition Signals Signal Yalue E rtdemo1 a sm_computation Get E Dynamic signals list Nm Path Signalwidh Max number of dynamic signall rtdemol sm_computation G ain Kp portl ne signall rtdemol sm_computation G ain Ki port1 100 List control Remove Remove All Save Load Cancel Figure 52 Dynamic Signal panel Following is a description of the parameters of the dialog RTLAB UG 104 00 239 Probe Control Panel Current model systems and signal set Signals tree containing three groups of signals e Dynamic signals any signals inside the model e Control signals signals that are sent from the console SC_ subsys
251. files moves up the selected source file in the list Move down Changes the order of the source files moves down the selected source file in the list Includes Sources Includes px Libraries Library Path m Compiler Include Paths Includes Target path s where user include files can be found Used to search for include files required to compile user written code when the include files do not reside in already searched paths Add Adds an include path to the list Edit Edits the selected include path Delete Removes the selected include path from the list Move up Changes the order of the include paths moves up the selected include path in the list Move down Changes the order of the include paths moves down the selected include path in the list Libraries RTLAB UG 104 00 Development Page Sources Includes px Libraries Library Path m Compiler Libraries 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 Add Adds the path of a library to the list Edit Edits the path of the selected library Delete Removes the selected library from the list Move up Changes the order of the libraries moves up the selected library in the list Move down Changes the order of the libraries moves down the selected library in the list Library path B Sources gt Includes
252. g a linked resource will not cause the corresponding resource in the file system to be deleted However deleting child resources of linked folders will cause them to be removed from the file system Related concepts Workbench Project Explorer view Resources Resource hierarchies RTLAB UG 104 00 125 Linked resources 126 RTLAB UG 104 00 Working Sets Working Sets Working sets group elements for display in views or for operations on a set of elements The Project Explorer view uses working sets to restrict the set of resources that are displayed If a working set is selected in the view only resources children of resources and parents of resources contained in the working set are shown When using the search facility you can also use working sets to restrict the set of elements that are searched Different views provide different ways to specify a working set The working Set of the Project Explorer view is specified in the Working Sets menu of the pull down menu of the Project Explorer view and is initially empty Views that support working sets typically use the following working set selection dialog to manage existing working sets and to create new working sets gt Select Working Set Select a working set O Window Working Sets Oj O selected Working Sets When you create a new working set you can choose from different types of working sets In the example below you can create a resource working set or a bre
253. g ins RTLAB UG 104 00 297 Help menu 298 RTLAB UG 104 00 Toolbars Toolbars There are five kinds of toolbars in the Workbench The main toolbar sometimes called the Workbench toolbar is displayed at the top of the Workbench window directly beneath the menu bar The contents of this toolbar change based on the active perspective Items in the toolbar might be enabled or disabled based on the state of either the active view or editor Sections of the main toolbar can be rearranged using the mouse There are also individual view toolbars which appear in the title bar of a view Actions in a view s toolbar apply only to the view in which they appear Some view toolbars include a Menu button shown as an inverted triangle that contain actions for that view A third type of toolbar is the perspective switcher The perspective switcher allows quick access to perspectives that are currently open It also has a button that can open new perspectives The perspective switcher is normally located in the top right next to the main toolbar However it is also possible to position it below the main toolbar top left or to position it vertically on the left hand side of the workbench left The name of the perspectives is shown by default but it is possible to hide the text and show only the icons To reposition the perspective or hide the text right click on it and choose the appropriate item from the context menu Minimizing a view sta
254. g session tdemo1_1_sm_computation exe gt working directory na Program arguments 3e 005 1 105 1 4 127 0 0 1 1796 8404994 Remote executable path and file name q AAA 7 Open source file you want to debug and insert breakpoints Press F5 to start the debugger Debugging remotly from the command station Windows QNX 6 x or RedHat targets RTLAB UG 104 00 475 Debugging In order to debug remotly an application called X server is required to display the debugger This manual explain how to use cygwin one of the most popular as an X server 1 Download and install Cygwin at http www cygwin com make sure that the Xfree86 package is selected 2 Start Cygwin 3 Start the X server XWin screen 0 1024 768 emulate3buttons 4 Set the DISPLAY export DISPLAY lt IP_ADRESS_OF_WINDOWS gt 0 0 5 Start the window manager wmaker amp 6 Enable remote access xhost 7 On paragraph Setting RT LAB configuration on page 472 replace DISPLAY value by DISPLAY lt IP_ADRESS_OF_WINDOWS gt 0 0 for instance DISPLAY 192 168 0 1 0 0 8 Load model DDD should open in the X server Windows targets This option is not supported with this target 476 RTLAB UG 104 00 Acquiring and Viewing Data Acquiring and Viewing Data This chapter discusses aspects related to the acquisition and viewing of your simulation data including acquisition groups and their parameters Acquisition Groups
255. g the Editor Area results in a trim stack containing only a placeholder icon representing the entire editor area rather than icons for each open editor since in most cases all the icons would be the same making them essentially useless The editor area E filet txt Zo E filez txt becomes this Trim Stack when minimized g 7 A If your particular workflow is such that you need to have more than one element i e having the Editor Area and a View Stack in the presentation at the same time you can still gain additional screen space by minimizing the stacks that aren t of current interest This will remove them from the main presentation and place them on the outer edge of the workbench window as Trim Stacks allowing more space for the remaining stacks in the presentation Note There are two ways to end up with a stack in the trim e Directly minimizing the stack e As the result of another stack being maximized Depending on how the Trim Stack was created its behavior is different when un maximizing only those trim stacks that were created during the initial maximize will be restored to the main presentation while stacks that were independently minimized stay that way Tip This difference is important in that it allows you fine grained control over the presentation While using maximize is a one click operation it s an all or nothing paradigm i e no other stack is allowed to share the presentation with a maximized stack
256. gging a Macro Script Follow these steps to debug a macro e Open the Python script macro See Opening a Macro Script for more information e Add break point to your script e Double click the script s left ruler or e Type CtrI F10 to open the context menu If everything goes ok you ll have the breakpoint shown in your sidebar as below def Scriptili LU Scripti This is a script used ft Macro recorded 2010 08 13 14 44 pr er er A import time import Rtlabipi time sleep 1 e Right click the file and choose to debug the file as a python run NOTE if you want to re run the last executed file you can click F11 to debug it When it hits the breakpoint it will ask you to go to the debug perspective you should click YES to this dialog This perspective has the actions needed for debugging and allows you to see the variables and evaluate expressions 494 RTLAB UG 104 00 Using Python Script and the Macro Recorder File Edit Source Refactoring Navigate Search Simulation Run Tools Window Help A Da B At le rid e o 3 Debug 22 2 R al e rtdemo1 Scripti py Python Run Name Value S E Scripti py amp Globals Global variables pydevd reader 1 O RtlabApi module lt module RtlabApi from Y prod vo D variables 52 o Breakpoints p pydevd writer 1 yg MainThread pidS184_seq1 Script1 Scripti py 27 lt module gt Scripti py 122 ig run pydevd py 780 gt l
257. gt Preferences gt RT LAB gt Diagnostic gt Monitoring dialog page to set the preferences parameters concerning the RT LAB monitoring Here is what the Monitoring preference page looks like Monitoring or v Here are the monitoring preferences Basic Enable monitoring Display controller in operating system task bar Display warning when disk space is lower than Mo 1 Target display information Minimal v Advanced Message precision factors us o Restore Defaults Apply The value of these parameters are used when a new model is created If you change a property from Preference page each new model will inherit from Properties defined into Preference page but the existing models will stay unchanged The Restore Defaults button enables the user to restore the defaults value of the parameters Enable monitoring Enables or disables the monitoring during the execution of the model default value true Display controller in operating system task bar Displays RT LAB Controller application in the taskbar Unchecked by default default value false Display warning when disk space is lower than Mo When checked a warning message is displayed when the disk space is lower than the value specified default value false Target display information Represents the amount of information that is displayed in the display window during load and execution Setting the value from MINIMAL to EXHAUSTIVE allows t
258. gt models s amp scripts e TestSequence py HS tmseq Figure 5 Linked Folder in the Project Explorer Note that an overlayed arrow on the icon indicates a linked resource Since linked resources are only links deleting such a resource will only remove the link The original file or folder will not be affected However children of a Linked Folder are not linked so deleting them will destroy the original files or folders For further documentation see the following paragraph and Workbench User Guide gt Concepts gt Workbench gt Linked resources Organizing resources Resources on the file system As said above each project maps to a directory on the file system By default these directories are located in the workspace folder lt RTLAB_ROOT gt workspace A project s directory has the same name as the project itself so renaming a project in the RT LAB Workbench will rename its directory automatically Similarly deleting a project will entirely delete its directory When you create a resource in a project for example when creating a new Model with the New RT LAB model wizard this resource is stored in its mapped directory The default resource hierarchy of a project respects the following rules e There is one folder per Model containing all model related files e All Model folders belong to a folder named models e This models folder is a direct child of the project Here is an example of this hierarchy
259. h time it is started for what workspace to use Refresh workspace on startup If this option is turned on then the workbench will synchronize its contents with the file system on startup Confirm exit when closing last window If this option is turned on then the workbench will ask if you wish to exit when closing the last window if Plug ins activated on startup This option allows you to select which available plug ins should be activated on startup RTLAB UG 104 00 443 Startup and Shutdown preference page 444 RTLAB UG 104 00 Text Editors preference page Text Editors preference page The following preferences can be changed on the General gt Editors gt Text Editors page Appearance options Undo history size This option allows you to set the size of the undo history for text editors Displayed tab width This option allows you to set the displayed tab width for text editors Insert spaces for tabs This option allows you to insert space characters in place of tab characters Highlight current line This option controls whether or the current line is highlighted or not Show print margin This option controls whether the print margin is visible or not Print margin column This option allows you to set the print margin column position Show line numbers This option controls whether or not line numbers are shown on the left side of the text editor Show range indicator This option controls whether or not range indi
260. he FPGA RTLAB UG 104 00 RT LAB Xilinx System Generator toolbox integration Figure 22 Conversion subsystem connected to the inports of the OpCtrlReconfigurablelO block Inside the three Concatenation subsystems you will find the type conversion blocks as well as the concatenation logic Concatenation is necessary in this case because the waveform generators are connected to a DAC I F with 16 bit channels Bitwise AND OxF FFF Bitwise AND OxFFFFOOOO two 16 bit concatenate signals form one 32 bit signal Figure 23 Concatenation of 2 16 bit data values into one single value to be transmitted to the OP5130 Input port Ini takes care of the lower 16 bits and input port In2 of the upper part In this example both ports are connected to the same source and come out of output port 2 sawout of the double to uint32 convert which in turn is connected to the input port number 2 of the OpCtrl ReconfigurableIO block This port corresponds to one entry port of the FPGA model which in this example is directly connected to the OP5330 DAC interface block Each of the DAC input port of this block represents two 16 bit concatenated channels Signal concatenation as presented above is not mandatory and will depend on the logic implemented in each FPGA model but it is nonetheless advantageous because it uses the available bandwidth more efficiently The outputs of the OpCtrlReconfigurablelO block are used to retrieve data from the OP5130
261. he RT LAB preference pages each new model created will inherit from these properties After that if you change a model property only the edited model will be affected Files Properties Set the file properties of your model V Enable automatic file retrieval v Allow file retrieval during simulation W Build intermediate tree on file retrieval File retrieval root directory myfiles Abs Name Mode Step Subsystems Add filenamel bd ascii Before load All E Delete Delete All ES Edit Enable automatic file retrieval 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 Enable file retrieval during simulation If this option is enabled RT LAB retrieves the files generated by the model simulation as soon as they are created on the target If this option is disabled RT LAB will retrieve those files after the model resets Build intermediate tree on file retrieval Specifies if intermediate folders are generated or not in the retrieve directory File retrieval root directory Directory where the files retrieved by RT LAB after the model execution will be copied List of extra files This list specifies one or more files to be copied and transferred to or from the target environment RTLAB UG 104 00 147 Files Page Here are the properties for each extra file e Name Extra file path and name e Mode F
262. he User Manual item from the Help menu Opening ScopeView To open ScopeView click on the ScopeView icon in the RT LAB main toolbar This icon is represented by a Cartesian plan with red and blue signals ke ScopeView will appear after the display of the splash screen Please refer to the RT LAB installation guide for more details on how to install ScopeView Note that a valid ScopeView license is required to launch ScopeView At start up ScopeView opens the main ScopeView window and the Signals form The Signals form allows choosing a signal source Refers to the following sections for more details on the main ScopeView window and the Signal form ScopeView C temp ScopeView templates Untitled File Edit view Zoom Graph Acquisition Help ER a anf Sh XDD deu va MEME ee 1 Apply Action To All Pages Auto Layout V Number of Columns E 5 RTLAB UG 104 00 Dames 525 Using ScopeView Selecting and Loading an RT LAB data source In order to be able to acquire data and signals from the real time simulator you need to select and load an RT LAB data source in ScopeView Click the Open Data Source Files button from the main toolbar Alternatively click the corresponding File menu item Ctrl 0 At this point the Data Sources Chooser dialog is displayed Data Sources Chooser Data Source File HYP SI TestView RT LAB Projects MyProject Model
263. he background For example building a model can sometimes take more than a few minutes during which time you may wish to continue to use other functions in RT LAB While the model is being built select Run in Background from the Building Model dialog and the Responsive UI will allow you to carry on with other tasks in RT LAB Building model Building MyModel Separating model Run in Background For information on the status of the action and additional operations that are currently running click Details The Details panel displays the status information of the operation at hand as well as any additional operations that may be running simultaneously The Progress Information dialog also indicates when one operation is being blocked by another RTLAB UG 104 00 111 112 Responsive UI RTLAB UG 104 00 Exiting the Workbench Exiting the Workbench Each time the Workbench is exited the Workbench is automatically saved including all open perspectives and windows The next time the Workbench is reopened it will appear exactly as it was when it was last closed To exit the Workbench select File gt Exit from the menu bar or close the workbench with the window close button x When the latter option is used a prompt will ask if you really wish to exit the workbench RTLAB UG 104 00 113 114 Exiting the Workbench RTLAB UG 104 00 Welcome Welcome The welcome page is the first page you see when you f
264. he following lines of text and save the file This is line 1 This is line 2 This is line 3 This is line 4 This is line 5 e In the Project Explorer view select file1 txt and use Ctrl C to copy the file e Use Ctrl V Paste to create the copy In the name conflict dialog which appears rename the file to file2 txt There are now two identical files file1 txt and file2 txt RTLAB UG 104 00 101 Comparing 102 RTLAB UG 104 00 Simple compare Simple compare In the Project Explorer view select file1 txt and file2 txt choose Compare With gt Each Other from the context menu A dialog will appear indicating that the two files are the same gt Compare 1 There are no differences between the selected inputs Edit file1 txt as follows e delete line 1 This is line 1 e change line 3 to be This is a much better line 3 e insert a line 4a before line 5 that reads This is line 4a and it is new The file file1 txt should now read as follows This is line 2 This is a much better line 3 This is line 4 This is line 4a and it is new This is line 5 Save the contents of the file by choosing File gt Save or pressing Ctrl S To compare the files once again select file1 txt and file2 txt and choose Compare With gt Each Other in the navigation view context menu A special compare editor opens The next section will explain how to use this compare editor RTLAB UG 104 00 103 D il oe puis is li
265. he model e SS_ slave subsystem s There can be several slave subsystems inside the model It contains the computational elements of the model when distributing the processing across multiple nodes These top level subsystems map directly to logical nodes The SC subsystem is the command station while SM is the target For distributed computation the SS subsystems allow you to dispatch additional computation on other targets Each CPU of a target physical node is considered a logical node e 1 target SM subsystem only e 2 targets SM and SS subsystems e 1 target 2 CPU SM and SS subsystems e 2 target 2 CPU each SM and 3 x SS subsystems With RT LAB for SystemBuild the model must contain only one top level superblock All the SC_ SM_ and SC_ superblocks should be located one level below this top superblock in the model superblock s hierarchy With RT LAB for SystemBuild Interactive Animation IA blocks should not be contained directly in the SC superblock Users should gather them in superblocks that are within SC Native Simulink model RT LAB supports any Simulink model without modifying the model However this model has to be compatible with Real Time Workshop RTW before opening it with RT LAB e uses fixed step solver e uses blocksets compatible with RTW RTLAB UG 104 00 459 Single Building a distributed Model for RT LAB During the compilation process the model will be automatically separated no modifi
266. he two most popular filters All Errors and Warnings on Selection are provided by default Problems can be fixed by selecting Quick Fix from the context menu The list of possible resolutions will be shown To add the Problems view to the current perspective click Window gt Show View gt Other gt General gt Problems RTLAB UG 104 00 275 276 RTLAB UG 104 00 Workbench Menus Workbench Menus The Workbench Menus contain menu items that provide access to all commands of RT LAB Note that menu items could be added or removed by Configuring perspectives and menu items may appear or disappear when Capabilities preference page are enabled or disabled Menu items are grayed when the corresponding commands are disallowed Commands are enabled according to e the active part of the RT LAB Workbench it means the Editor or the View that has the focus e the element that is selected in this active part e the state of this element for example a running Model cannot be loaded The RT LAB workbench provides the following menus e File menu e Edit menu e Navigate menu e Search menu e Simulation menu e Tools menu e Window menu e Help menu RTLAB UG 104 00 277 Workbench Menus 278 RTLAB UG 104 00 File menu File menu The File menu enables you to create save close print import and export Workbench resources and to exit the Workbench New Shift Alt N Enables you to create new resources by opening the
267. he user to retrieve more information about communication and I Os initialization for example This can be used to debug unexpected model behaviors default value minimal Message precision factor us Defines the precision of the timer reporting the time required to perform one calculation step in microseconds The default value is O no printout Value 1 prints the step size of the model every 1 000 000 steps with a precision of 1 us Value 100 prints the model s step size every 10 000 steps with a precision of 100 us and so on default value 0 RTLAB UG 104 00 373 Monitoring preference page 374 RTLAB UG 104 00 Debugging preference page Debugging preference page Use the Window gt Preferences gt RT LAB gt Diagnostic gt Debugging dialog page to set the preferences concerning the debugging of RT LAB model when running on the target nodes Here is what the debugging preference page looks like Debugging is v Here are the debugging preferences Advanced C Enable controller log s Enable extended timeout Enable watchdog Watchdog timeout ms sooo C Compile model in debug Restore Defaults Apply The value of these parameters are used when a new model is created If you change a property from Preference page each new model will inherit from Properties defined into Preference page but the existing models will stay unchanged The Restore Defaults button enables the user to restore the defaults value
268. he view will be moved to Dock above The view is docked above the view underneath the cursor Dock below The view is docked below the view underneath the cursor gt Dock to the right The view is docked to the right of the view underneath the cursor Dock to the left The view is docked to the left of the view underneath the cursor E Stack The view is docked as a Tab in the same pane as the view underneath the cursor Detached The view is detached from the Workbench window and is shown in its own separate window Restricted You cannot dock the view in this area Related concepts Views Fast views Detached views Perspectives RTLAB UG 104 00 559 Moving and docking views 560 RTLAB UG 104 00 Rearranging tabbed views Rearranging tabbed views In addition to dragging and dropping docking views inside the Workbench you can rearrange the order of views within a tabbed notebook e Click on the tab of the view that you want to move and drag it to where you want it A stack symbol appears as you drag the view across other view tabs e Release the mouse button when you have the view tab in the desired location The view that you selected is now moved Related concepts Views RTLAB UG 104 00 561 Rearranging tabbed views 562 RTLAB UG 104 00 Creating fast views Creating fast views Fast views are hidden views that can be quickly opened and closed They work like other views except they do not take u
269. hes back to normal mode and the acquired signals can be sent to the command station Be sure to set your acquisition window to the size of your execution interval Be aware that this is only possible for models that can be interrupted regularly and is rarely a viable solution because of this Distributed computation using UDP IP communication Again because the network card driver is not available during XHP runs communication protocols which use this card are not possible You need to use OHCI Firewire cards for communication or multi processor machines which communicate through shared memory Multi rate models cannot to be executed in true multi rate Because the ability to maintain multiple threads is disable in the XHP mode for increased performance it is not possible to run a multi rate model in multi tasking form true multi rate Multi rate systems can be still executed in single tasking mode but this has many disadvantages See more about true vs pseudo multirate for details or the Real Time Workshop User s Guide Parameter tuning Just as for acquisition parameter modification is not possible for parameters of subsystems running in XHP mode If you want to be able to modify some parameters they will have to be relocated on a non XHP node and wired to the XHP subsystem at the diagram level or while the model is paused Snapshot and dynamic signal acquisition Also because of the single thread restriction
270. hes 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 parameters is checked RT LAB detects overruns and performs the action specified in the Action to perform on 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 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 e XP Vista 7 system UDP IP e QNX 6 x OHCI UDP IP e RedHat OHCI UDP IP SCI INFINIBAND Execution real time simulation mode Enables the user to define how the model s simulation can be executed on a QNX6 RedHat or Windows XP Vista 7 system e 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 e Simulation with low priority this simulation mode can be used to run a simulation in the backgroun
271. highlights steps where overruns are detected It enables you to save the results and to export them to other software such as Excel Monitoring your model helps you to profile your CPU usage and your tasks and to distribute your simulation by evaluating time spent by each part of the simulation See Monitoring Models for more information about monitoring To show the monitoring view in the current perspective click Window gt Show view gt Other menu and the select the RT LAB gt Monitoring item Here is what the Monitoring view looks like Details about each area are explained below Selected model Expand Collapse button Expand Collapse button to to show hide statistics show hide all time steps lt Info Data Usage Max Mean 1 2 3 El a rtdemot Ts 0 0010 5 0 9 24 sm_computation Ts 0 0010 s 0 9 dt 3 29 us dt 39 35 us dt 8 96 us dt 5 07 us dt 5 07 us dt 6 3t D Majar computation time 0 1 aeons dt 27 91 us dt 1 02 us dt 0 46 us dt 0 29 us dt 0 74 Probes iy Minor computation time b 13 dt 0 73 us dt 11 97 us dt 1 29 us dt 0 84 us dt 0 80 us dt 0 9 ik Execution cycle 0 9 dt 3 29 us dt 39 35 us dt 8 96 us dt 5 07 us dt 5 07 us dt 6 3 il Total step size 100 0 lt 17 13 us dt 1970 37 us dt 1008 57 us dt 974 45 us dt 1154 35 us dt 793 i Total idle STE t 30 13 us dt 1944 85 us dt 927 87 us dt 30 13 us
272. hted parameter When you open the page all non existing parameters will have a undesirable status unresolved or estimated For each parameter you will have to accept the estimation confirm that you want to ignore the parameter or find a new corresponding matching item in the current model This process is not automatic but RT LAB will try to find good estimation for renamed or moved parameters Generally when parameters are deleted from a model you will ignore them If they were renamed or moved they still exist in the current model with a different path so you will try to find a corresponding parameter in the current model Here are the steps to solve structural differences Accepting a estimated parameter 1 Select a parameter from the Structural Differences list that is stated as estimated 2 If you believe the estimation is correct click the Accept button or check the box at the beginning of the line to force RT LAB to accept the estimation The value loaded from the file will be applied to the matching parameter of the current model Finding a new matching parameter 1 Select any parameter from the Structural Differences list 2 Inthe Current Parameter list at the bottom right browse the tree structure and locate the parameter you want to use 3 Double click the parameter to map this parameter to the previous parameter 4 The difference status will be resolved The value loaded from the file will be applied to
273. ic The contents of the toolbar are also editor specific To add the Outline view to the current perspective click Window gt Show View gt Other gt General gt Outline RTLAB UG 104 00 273 274 RTLAB UG 104 00 Problems view As you work with resources in the workbench various tools may automatically log problems errors or warnings in the Problems view When you double click the icon for a problem error or warning the editor for the associated resource automatically opens to the relevant line of code By default the problems view will group your problems by severity You can also group them by type or not at all Certain components will add their own grouping The grouping can be selected using the Group By menu The first column of the Problems view displays an icon that denotes the type of line item the category and the description Left click the item to open the file in an editor and highlight the line containing the problem You can configure the contents of the Problems view to view only warnings and errors associated with a particular resource or group of resources This is done using the Configure Contents dialog available from the drop down menu You can add multiple filters to the problems view and enable or disable them as required Filters can either be additive any problem that satisfies at least one of the enables filters will be shown or exclusive only problems that satisfy all of the filters will be shown T
274. ick Show Next Match button two more times Once again the Search view automatically opens the file file2 txt e Itis sometimes useful to remove uninteresting matches from the search results The Search view s popup menu allows you to do this using Remove Selected Matches which removes any selected file entries and all matches in them from the Search view Note that this only removes the entries in the Search view it does not affect the files themselves Select file1 txt and choose Remove Selected Matches from the popup menu The Search view now shows only the matches for file2 txt e Perform a second search for that by clicking on the Search button in the Workbench s toolbar e The Search view updates to show the results of the new search Use the drop down button on the Search view s toolbar to move back and forth between the two search results e In the drop down button choose it 2 match in workspace The Search view switches back to show the original search On the context menu choose Search Again to repeat the initial search Notice that once again there are four matches So far you have seen how to manage your search results and how to switch between different searches However it might happen that you do not want the search view to change even if further searches are performed For this you can pin the search view which causes subsequent searches to be shown in a second Search view 260 RTLAB UG 104 00 Search View Toolba
275. ience in using these tools Specialized blockset for distributed processing inter node communication and signal I O RT LAB provides tools for easy separation of the system model into subsystem models that can be executed on parallel target processors standard PCs running either the QNX Real Time operating system or Red Hat Linux In this way if you need to run a model in real time that cannot be run on a single processor RT LAB provides a means of sharing the load over several processors Fully integrated with third party modeling environments and user code libraries RT LAB supports models from StateFlow StateMate CarSim RT GT Power RT AMESim Dymola as well as legacy code in C C and FORTRAN Comprehensive API for developing your own on line application Using environments such as LabVIEW C C Visual Basic TestStand Python and 3D virtual reality tools it is possible to create custom user and test automation interfaces Off the shelf technologies RT LAB is the first fully scalable simulation and control package that allows you to separate models for execution in parallel on a network of standard desktop PCs PC 104s or on SMP symmetric multi processor servers Driven by the demands of a mass market users take advantage of rapid advancements in a wide range of readily available technologies as well as relatively low costs RT LAB uses standard Ethernet and FireWire IEEE 1394 communications and an extensive range of
276. ies preference page are enabled Common File Here are the menu entries that are common for files folders projects and some other resources New Enables you to create 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 This command places a copy of the selection on the clipboard Paste Ctrl V This command places the text or object on the clipboard at the current cursor location in the currently active view or editor Delete DEL This command removes the current selection Rename F2 Enables you to change the name of the currently selected resource Import Launches the Import wizard which enables you to add resources to the Workbench Export Launches the Export wizard which enables you 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 Here are the menu entries for file resources Open Opens the file in its associated editor Open With Opens the file with the specified editor Close RTLAB UG 104 00 183 Project Explorer Closes the active editor You are prompted to save changes before the file closes Project Here are the menu entries for project resources Close Project Closes this project See Organizing resources Close Unrelated Projects Cl
277. iggered by Apply changes immediately toogle 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 cancelled An asterisk appears after a value when it has been edited but the changes have not yet been applied E variable Viewer 52 X Y Y B et E Wb_line6ph_console sm_masterjim1 do not delete this gain Gain 1x1 Double Figure 28 Viewer explorer value being edited 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 To display multiple variable simultaneously and for more details to the multiple view display please see Variable Table Display output highlights data format error with red color RTLAB UG 104 00 Toolbar Variable Viewer The toolbar in the Variable Viewer contains the following buttons ICON r3 Related concepts Views Perspectives Toolbars Related tasks Opening views DESCRIPTION Pin view Pins the view to selection means that the Variable Viewer will lock the output to the current selected variable so the view will continue to dis
278. ignali MyProject rtdemo2 sm_controller Gain Kp T signali MyProject rtdemo2 sm_controller Actuator response time T signali MyProject rtdemo2 j ss_plant 2220pComm Receive_1 S Function T signali MyProject j rtdemo2 sm_controller Gain Ki T signali MyProject rtdemo2 j sm_controller Gaini signali MyProject rtdemo2 sm_controller Sumi T signali MyProject rtdemo2 j sm_controller Gain Kd T signali MyProject rtdemo2 j ss_plant Integrator3 T signali MyProject rtdemo2 j ss_plant Sensor response time T signali MyProject rtdemo2 j sm_controller OpComm Receive S Function T signali MyProject rtdemo2 sm_controller Derivative1 Figure 60 Search View show as a List If you close the Search View you can return to it later by selecting Window gt Show View gt Other gt General gt Search Display the results as a tree To enable the display of the results as a tree select the option Show As Tree from the view menu T IR DOF mP MV 48 matches in MyProject E 12 MyProject S E Models a Du sc_user_interface gt sm_computation ET Integrators E InitialCondition UpperSaturationLimit b LowerSaturationLimit T signali oO Sensor response time 11 Gain Kp Show as List Ul Figure 61 Show results as a Tree RTLAB UG 104 00 257 Search View Working wi
279. il 1 0 2 0 3 0 2 4 0 5 0 6 0 Figure 26 Variable Viewer By default the Variable Viewer is included in the Edition perspective To add it to the current perspective click Window gt Show view gt Other gt RT LAB gt 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 EX Variable Viewer 3 E j m Variable Viewer 3 ES 3470 matrixTest varM 2x3 Double ee matrixTest sm_master Cvector Value 6x1 Double 1 2 3 1 1 0 2 0 2 4 0 5 0 1 0 2 0 3 0 4 0 5 0 6 0 D non gt Figure 27 Variable Viewer Multiple views with pinned one 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 RTLAB UG 104 00 199 200 Variable Viewer In auto apply mode the default mode tr
280. ile Delete an extra file from list To remove an extra file from list 1 Select the extra file from the list 2 Click on the Delete button Delete all extra files from list To remove all extra files from list 1 Click on the Delete All button 148 RTLAB UG 104 00 Assignation Page Edit an extra file _ Extra File Properties File Name Filename1 txt Subsystems All Mode ascii Transfer time Before load v Description The file will be transfer to the target directory of the subsystems before the model is loaded To edit an extra file in list 1 Select an extra file 2 Modify the field s you want to change 3 Click on the OK button to add the file Assignation Page This page gives the subsystems properties for the edited model The subsystems page contains two main sections that define the subsystems properties e Allows the user to assign the computation subsystems to the different target nodes e Clean a target or to embed a subsystem Assignations This section provides a table that allows the user to set all the properties for subsystems of a real time model The editor allows the user to directly edit the properties in the table or to edit the selected subsystems in the field below RTLAB UG 104 00 149 150 Assignation Page Subsystem settings Assignations Set the properties of the subsystems and assign them to physical nodes
281. ile transfer type ascii or binary e Transfer time Time when file will be transferred Here are the different transfert times e Before compilation File will be transferred before compilation process e After compilation File will be transferred after compilation process e Before load File will be transferred before the load of model e After reset File will be transferred after the reset of model e Subsystem Subsystem directory where files should be transferred Type All if you want to transfert file for each subsystem Note that a unique folder exists for each subsystem on the target nodes and on the host computer Add an extra file to list _ Extra File Properties BAR File Name filename1 txt Subsystems All Mode ascii Transfer time Before load Description The file will be transfer to the target directory of the subsystems before the model is loaded To add a new extra file 1 Click on the Add button 2 Fill the File Name field or select a file from the file system by clicking on the button You can select an absolute path by clicking on the Abs button 3 Select the subsystem directory where files should be transferred If you want to transfer the files on All subsystem directory type All on field Subsystems 4 Select the transfert mode of your file 5 Select the transfert time of your file 6 Click on the OK button to add the f
282. ime interval the watchdog verifies the model is still running 5000 ms by default Compile model 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 Hardware Page The Hardware page contains two main sections that define the hardware properties Monitoring properties and Performance properties The default property values for a new model come from the RT LAB Preference pages If a property is changed from the RT LAB preference pages each new model created will inherit from these properties After that if you change a model property only the edited model will be affected Monitoring Properties RTLAB UG 104 00 153 Simulation Tools Page Monitoring Properties pet the monitoring properties of the hardware Reset model on IO missing C Abort compilation on bitstream missing Reset model on IO missing When this option is checked and the model is loaded RT LAB will stop loading and will generate an error if some I O boards required by the model are not detected on the target s RT LAB will generate only a warning if this setting is unchecked Note that only a few 1 0 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 Abort compilation on bitstream missing When this option is enabled if some b
283. 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 e g on QNX6 1 the smallest sampling time available is 500 us Hardware Synchronized in this mode an I O board clock is used to synchronize the entire simulation Real time communication link type Sets the target cluster s communication medium default value UDP IP RTLAB UG 104 00 383 Real time preference page Here are the available choices for each target platform e XP Vista 7 system UDP IP e QNX 6 x OHCI UDP IP RedHat OHCI UDP IP SCI INFINIBAND 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 default value 1 0 Note This parameter enables you to change the I O acquisition speed Because the model always uses the basic calculation step changing the time factor for the I O may give results which differ from the offline simulation This parameter should be used only to determine the simulation s minimum calculation step Once this step is determined this parameter must be brought back to a value of 1 The model s basic calculation step must be
284. inal views and layout e Ensure there are editors open for file1 txt and file2 txt Close any other editors The Workbench should now look like this File Edit Navigate Search Simulation Tools Window Help Mr BA ajo oa B i O G86 2 CAR Project Explorer 23 OB filet txt 3 E fieztx E E Bw 7 1 This is sample text file There is not much else ve can really say about it other than it has five lines of text that are rather dull E dy Targets ow MyTarget202 g MyProject amp Models ES File system B CE E gt help gt models e Python264 Y Aproduitsidewjrt labibu Display lt Properties Compilation Sh Matlab vien E Progress El Console m Be a Anmam No selection RTLAB UG 104 00 79 80 Rearranging views and editors RTLAB UG 104 00 Drop cursors Drop cursors Drop cursors indicate where it is possible to dock views in the Workbench window Several different drop cursors may be displayed when rearranging views RTLAB UG 104 00 DESCRIPTION Dock above If the mouse button is released when a dock above cursor is displayed the view will appear above the view underneath the cursor Dock below If the mouse button is released when a dock below cursor is displayed the view will appear below the view underneath the cursor Dock to the right If the mouse button is released when a dock to the right cursor is displayed the view will appear to the right of
285. information about an item on its label or icon ena Select which additional decorations should be displayed Appearance Colors and Fonts Available label decorations Label Decorations E Containers with Resource Filters Compare Patch Y File Icons Based On Content Analysis Content Types Java Build Path Indicator Editos Y Java Method Override Indicator ale as A Java Type Indicator Kansch Y Linked Resources Security PyDev elements error decorations Startup and Shutdown Y RT LAB Model State Web Browser RT LAB Platform Workspace 7 RT LAB Problems icons Help RT LAB Problems messages Install Update Y RT LAB Subsystem Assignation pos E RT LAB Target 3 7 Virtual Folders PyDev RT LAB Run Debug ETT Team escnption Terminal Shows the state of RT LAB projects and models RTLAB UG 104 00 O Figure 106 Preference page Label Decorations 429 Label Decorations preference page 430 RTLAB UG 104 00 Linked Resources preference page Linked Resources preference page The General gt Workspace gt Linked Resources preference page is used when working with linked resources The preference Enable linked resources is used to globally enable or disable the linked resource feature for the entire workspace By default linked resources are enabled If you disable linked resources then you will not be able to create any new linked resources or import existing projects that contain
286. ing processes e Know which versions of softwares are installed e Launch configuration scripts e Install new softwares 248 RTLAB UG 104 00 e Debug models e Consult information logs e Open crash files e Execute operating system commands Terminal View Note All Red Hat commands are available on RedHawk target List of commands for QNX and Red Hat targets Command usr opalrt common bin flash_update bim Is lo usr opalrt uname a ps A ifconfig a Is dev Description This is a request to get Board Identification Messages BIM of remote SignalWire boards It searches and displays data on installed board Lists the RT LAB versions installed on the target Prints the name version and other details about the current target and the operating system running on it Reports the process status Allows the user to view information about the configured network interfaces Lists the devices that are currently running on the target List of commands specific to QNX targets Command pidin info pci v Is lo var dumps Description Displays information about the processors installed on the target Prints information on PCI card installed on the target Use the command pci v grep Device ID to get list of the device IDs Lists the dump files that are written by the dumper utility Whenever a program terminates abnormally a dump of the current state of the program is written to disk The dump
287. ing the key bindings 587 Changing font and colors 589 Changing the placement of the tabs 591 CHAPTER 5 LEGAL Introduction 1 1 1 2 About RT LAB RT LAB is a distributed real time platform that facilitates the design process for engineering systems by taking engineers from Simulink or SystemBuild dynamic models to real time with hardware in the loop in a very short time at a low cost Its scalability allows the developer to add compute power where and when needed It is flexible enough to be applied to the most complex simulation and control problem whether it is for real time hardware in the loop applications or for speeding up model execution control and test RT LAB provides tools for running simulations of highly complex models on a network of distributed run time targets communicating via ultra low latency technologies in order to achieve the required performance In addition RT LAB s modular design enables the delivery of economical systems by supplying only the modules needed for the application in order to minimize computational requirements and meet customers price targets This is essential for high volume embedded applications Key Features Fully integrated with MATLAB Simulink and MATRIXx SystemBuild All model preparation for RT LAB is done with established dynamic system modeling environments which allows the user to leverage exper
288. irst launch RT LAB Its purpose is to introduce you to the product Welcome content typically includes an overview the product and its features tutorials to guide you through some basic tasks samples to get you started etc le rr La6 ee Eile Edit Navigate Search Simulation Tools Window Help Li Welcome Li Go to the workbench Overview Tutorials Get an overview of the features Go through tutonals Migrate Migrate to the new release What s New VW Find out what is new RTLAB UG 104 00 115 116 Welcome RTLAB UG 104 00 Concepts Contents e Welcome e Workbench e Perspectives e Editors e Views e Workbench Menus e Toolbars e Wizards e Preferences e Cheat Sheets e MetaController e Help RTLAB UG 104 00 117 Concepts 118 RTLAB UG 104 00 Workbench Workbench The term Workbench refers to the desktop development environment The Workbench aims to achieve seamless tool integration and controlled openness by providing a common paradigm for the creation management and navigation of workspace resources Each Workbench window contains one or more perspectives Perspectives contain views and editors and control what appears in certain menus and tool bars Related concepts Resources Perspectives Views Editors RTLAB UG 104 00 119 Workbench 120 RTLAB UG 104 00 Resources Resources Resources is a collective term for the projects folders and files that exi
289. is option is available for SIMULINK models only 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 RTLAB UG 104 00 155 Simulation Tools Page 156 RTLAB UG 104 00 Target Editor Target Editor RT LAB provides a simple form based multi page target editor that manages all target properties To open a user friendly target editor into the current perspective double click on your target in the Project Explorer Note that target properties are also available in the Properties View when selecting a target These properties are organized by categories Categories are shown on different pages of the target editor One or more categories can be displayed on the same page when related For details on the individual editor pages refer to the following documents e Target Overview Page e Diagnostic Page e Simulation Settings Page e Software Page Target Overview Page The Overview page contains two main sections that define important target properties and allow common actions e General Information e Operations General Information section General Infor mation This section describes general information about this target Name MandaBox IP address 192 168 0 231 State Up This section describes general information about the edited targe
290. ists in the left file but since it is in the background color its difference bar can be followed to the right see 3 and notice that the right file does not contain the line see red circle Initially the compare editor might seem a bit daunting but when simply working down the left side and focusing on the items marked as gray and those items missing from the left side it turns out not to be as tricky as it first seems RTLAB UG 104 00 105 Understanding the comparison 106 RTLAB UG 104 00 Working with comparison Working with comparison Comparing file1 txt and file2 txt resulted in the following compare editor This section demonstrates how to use the compare editor to resolve the differences between the two files File Edit Simulation Tools Window Fir EP Compare filei txt file2 txt 52 ES Text Compare ES MyProject filet txt This is line 2 This is a much better line 3 This is line 4 This is line 4a and it is new This is line 5 There are two parts to the compare editor s local toolbar Move to the next or previous change using the right group of local toolbar buttons LD Le o lt e e Click the Select Next Change button Observe how it selects the next difference e Click Select Next Change button a second time to go to the next change e Click the Select Previous Change button To merge changes from the left file to the right file and vice versa use the left group of local
291. it set up you can still subsequently maximize the editor area but the un maximize will only restore the particular stack s that were sharing the presentation not the ones you ve explicitly minimized Normal Presentation RTLAB UG 104 00 Maximizing and minimizing elements of the workbench presentation File Edit Navigate Search Simulation Tools Window Help iH H B 4l0wnsi 4 amp AAA ES E Eton Gia wee This is sample text file There is not much else ve can really say about it other than it has five lines of text that are rather dull E de Targets de MyTarget202 B MyProject 8 Models SS File system B HS help HS models po Pg RR amp Python264 Y produits devirt lab bl Display X E Properties Compilation A Matlab View Progress ga Console o RSP Anan B MyProjectfle txt Editor Area Maximized MEN Edit Navigate Simulation Tools Window Help it 1 8 d0Pn21 BB 48 686 6 EX E Edition Bi filete 2 BS fiez 1 his is sample text file Fe There is not much else we can really say about it other than it has five lines of text that are rather dull RTLAB UG 104 00 91 92 Maximizing and minimizing elements of the workbench presentation RTLAB UG 104 00 Perspectives Perspectives A perspective defines the initial set and layout of views in the Workbench window One or more perspectives can exist in a single Workbe
292. itstreams 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 Performance Properties Performance Properties Set the performance properties of the hardware Enable cacheable DMA memory access Enable cacheable DMA memory access When this option is 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 This option is available on QNX6 only Simulation Tools Page The Simulation Tools Properties page contains three main sections that define common properties related to external simulation tools Matlab and Simulink properties Simulink SystemBuild Console and Real Time Workshop properties The default property values for a new model come from the RT LAB Preference pages If a property is changed from the RT LAB preference pages each new model created will inherit from these properties After that if you change a model property only the edited model will be affected Matlab and Simulink Properties 154 Matlab and Simulink Properties Set the Matlab and Simulink properties of the model Model fixed step size s 0 0010 Matlab MatrixX command before opening model Example myWar 1 Matlab
293. ive open you can switch between them by clicking the icons on the shortcut bar Related concepts Perspectives RTLAB UG 104 00 539 Switching between perspectives 540 RTLAB UG 104 00 Specifying the default perspective Specifying the default perspective The default perspective is indicated in the Select Perspective dialog accessible via the Window gt Open Perspective gt Other menu The pre defined default perspective is indicated by the word default in brackets following the perspective name for example Edition default To change the default perspective e Open the General gt Perspectives preference page e Select the perspective that you want to define as the default from the list of available perspectives and click Make Default The default indicator moves to the perspective that you selected e Click OK Related concepts Workbench Perspectives RTLAB UG 104 00 541 Specifying the default perspective 542 RTLAB UG 104 00 Opening perspectives Opening perspectives Perspectives provide combinations of views and editors that are suited to performing a particular set of tasks For example you would normally open the Debug perspective to debug a Python script To open a new perspective e Click the Open Perspective button on the shortcut bar on the left side of the Workbench window This provides the same function as the Window gt Open Perspective menu on the menu bar e To see a complete lis
294. ively click the Select Signals item from the Graph menu MA To add signals to a graph first select the data source from the Data Source List and then select the type of signal to be shown in the list By default signals sent to model s console are listed but it is also possible to display dynamic acquisition signals Also note that the list of dynamic signals available in ScopeView could be selected using RT LAB Probe Control Panel Click the signal s name to add it to the Selected Signals at the bottom of the form These signals are also automatically inserted into graphs of the current report page EC ScopeView Signals C Documents and Settings vincentl ScopeView templates Untitled File Edit View DataSource Graph Help a BATE XBAN sd Signals Data Source RTL Project rtdemo1 Model rtdemol AcqGr 1 Signal Type Acquisition1 signal signali Signal Selection Mode Graph Creation x Axis Y Axis Data Function O Single Multiple Normal Superimposed Grid Log Grid Log C Auto Load f None Add All i Add Selected m Selected Signals Signal Description rtdemoi_sm_computation_porti signali rtdemoi_sm_computation _port2 signal 1 3 _ rtdemot _sm_computation _port3 signali 4 When a large number of signals must be selected change the Signal Selection Mode option to Multiple to add multiple signals at the same time Also change the
295. ively the New RT LAB model wizard or the Add model wizard Creating a new project from a template Clicking on the lt Next gt button will display a list of available project templates Each template illustrates an RT LAB feature and provides at least one configured model Other files may be included such as help files python scripts test sequences C code PANNE AAA 82 New RT LAB Project o 1 0 63 RT LAB Project Create a new RT LAB project This project can be generated from a template Available Templates type filter text ss Api RTDemol d a gt Basic a Da _ The rtdemol model demonstrates la rtdemol Simulink rtdemol SystemBuild _ gt R itdemo2 What is a PID controller rtdemo3 4 Features PID stands for Proportional G 10 Integral Derivative This is a type of amp Simscape feedback controller whose output a a empty control variable CV is generally based on the error between some user defined set point SP and BS D lt Back Next Cancel Figure 69 New Project wizard selecting a template The left part of the dialog is a template explorer The right part of the dialog contains the description of the currently selected template Templates can also be filtered to quickly find all the templates associated to a particular feature 306 RTLAB UG 104 00 69 New RT LAB Project cE Fell xaj New RT LAB project wizard _ RT LAB Project Create a new RT LAB proj
296. k the Dynamic signals output e Close the OpComm Mask Parameters dialog e Make sure your model is properly compiled with RT LAB e Open the Probe Control Panel of RT LAB using the RT LAB main Toolbar e Click the tab at the top of the Probe Control Panel to select one of the acquisition groups e Click the Signals button to open the Dynamic Signal Panel dialog e Using the Current model systems and signals set tree browse signals select them and click the Add button The signal will be added to the Dynamic signal lists e The dynamic signal names are defined in the real time subsystem directly on the wire at the output of the block that calculates and outputs the value of the signal To change the name as mentioned above right click the signal in the real time subsystem and select Signal Properties and type a new Signal name Rebuild your model e Close the Dynamic Signal Panel and close the Probe Control Panel RTLAB UG 104 00 527 Using ScopeView Refer to the Acquiring and Viewing Data section of the User Guide for more details on how to add signals to the acquisition groups Selecting Signals Once the data source is selected and loaded the Signals form lets you choose signals to be acquired for each data source and select the signals that will appear on each graph It also lets you perform mathematical operations and signal processing To open the Signals form click the Select Signals button from the main toolbar Alternat
297. lay Properties Matlab Progress Console AE File Edit Simulation Tools Window Help Eau Display 23 I Properties Im Compilation Matlab View Progress E Console Bay eto et 1 No selection 0 items selected RTLAB UG 104 00 19 20 The Workbench RTLAB UG 104 00 Editors and Views Editors and Views Prior to commencing the RT LAB Workbench tutorials found in this section it is important to first be familiar with the various elements of the Workbench A Workbench consists of e perspectives e views e editors A perspective is a group of views and editors in the Workbench window One or more perspectives can exist in a single Workbench window Each perspective contains one or more views and editors Within a window each perspective may have a different set of views but all perspectives share the same set of editors A view is a visual component within the Workbench It is typically used to navigate a list or hierarchy of information such as the resources in the Workbench or display properties for the active editor Modifications made in a view are saved immediately An editor is also a visual component within the Workbench It is typically used to edit or browse a resource The visual presentation might be text or a diagram Typically editors are launched by clicking on a resource in a view Modifications made in an editor follow an open save close lifecycle model Some features ar
298. letely occupy the main presentation while still allowing access any open views in your perspective by using the icons in their Trim Stack the area around the edges of the window is called the trim The behavior for managing the editor maximization operate on the complete Editor Area rather than simply maximizing the particular Editor Stack This allows for compare workflows which require the ability to see both files in a split editor area at the same time Minimize Another way to optimize the use of the screen area is to directly minimize stacks that are of no current interest The default presentation minimizing a stack will cause it to be moved into the trim area at the edges of the workbench window creating a Trim Stack View Stacks get minimized into a trim representation that contains the icons for each view in the stack This view stack 514 Compilation 3 ET Properties Display 4 Matlab View Progress El Console gt El gt als ETA No selection becomes this Trim Stack when minimized RTLAB UG 104 00 89 90 Maximizing and minimizing elements of the workbench presentation s HET ME The minimize behavior for the Editor Area is somewhat different minimizing the Editor Area results in a trim stack containing only a placeholder icon representing the entire editor area rather than icons for each open editor since in most cases all the icons would be the same making them essentially
299. linked resources Not all versions of the workbench support linked resources and recognize them as such You may not want to use linked resources if you plan to share your workspace data with other users Disable this preference if they will not be able to work with linked resources The remainder of this page is for defining path variables that are used when creating linked resources Use the New button to define new variables the Edit button to change the value of an existing variable and the Remove button to get rid of an existing variable Note if you change a path variable that is currently in use you will need to perform a local refresh on those projects to discover what is different in the file system You can refresh a resource by opening the one of the navigation views context menu for that resource and selecting Refresh It is not recommended that you remove a path variable that is currently in use RTLAB UG 104 00 431 Linked Resources preference page 432 RTLAB UG 104 00 Local History preference page Local History preference page The following preferences can be changed on the General gt Workspace gt Local History page Days to keep files Indicates for how many days you want to maintain changes in the local history History state older than this value will be lost Maximum entries per File Indicates how many history states per file you want to maintain in the local history If you exceed this value you will lose old
300. lipse help system Browse topics in the Contents frame Gi on the left Click on a topic to have it displayed Use the Back and Forward buttons to navigate within the history of viewed topics Searching To quickly locate topics on a particular subject in the documentation enter a query in the Search field Use the Search frame EP to display the Search view You can narrow the scope of your search by selecting only the sections you are interested in Synchronizing Clicking the Show in Table of Contents button E will select that topic in the navigation tree The Link with Contents button gt keeps the navigation tree synchronized to the current topic Capabilities Context sensitive help If you are working through a task and encounter a part of the interface that you do not understand you can summon context sensitive help By default this will display the Help view and give you some specific information about the view editor dialog you are using and possibly some links to topics for further help Context sensitive help can be accessed by bringing focus to the interface part in question by clicking on it or using the Tab key and then pressing F1 Alternatively in dialogs you can achieve the same result by pressing the help button in the dialog s button bar Related concepts Help view 456 RTLAB UG 104 00 Tasks Contents Building models Executing models Acquiring and Viewing Data Moni
301. longer than the frame itself the portion of the calculation that is performed between dispatching the two frames is lost creating a discontinuity in the display as shown below Frame 1 Frame 2 Figure 9 Hole in Data Display It is possible to minimize this effect For a number of values per given signal an increase in the decimation factor from one acquisition per step to one acquisition for every two steps also increases the effective length of the frame diminishing the gap in values between the two data transmissions RTLAB UG 104 00 479 Understanding Data Reception Frame 1 Frame 2 Time required for display Figure 10 Increasing Effective Length of Frame Although the display is more representative of the real time calculation performed an increase in the decimation factor can cause problems with display resolution as shown here Frame 1 Frame 2 Figure 11 Display Resolution Error In RT LAB even with an command station crash a real time model running on the target nodes continues to run After rebooting the command station reconnect to the real time model and continue data acquisition Synchronous Acquisition Remember acquisition frames are sent when the system has time frames sent as TCP IP packets are sent while the model is waiting for a communication packet or for the synchronization pulse This results in your real time system not being disturbed by a TCP IP transmission Therefore the console display
302. losed and the selected cheat sheet is opened Hides Hides the cheat sheet Save Saves the completion status of the active cheat sheet and closes it Saves the completion status of the active cheat sheet and closes it Note that some cheat sheets can also be launched from the welcome page by first selecting Tutorials and then selecting one of the tutorials Starting the cheat sheet Each cheat sheet has a list of steps and it always begins with an Introduction step When you launch a fresh cheat sheet the Introduction step is expanded so that you can read a brief description of the cheat sheet To start working with the cheat sheet click Click to Begin in that step The next step is expanded and highlighted You should also see one or more actions buttons such as Click to Perform in the highlighted step You can now begin working through the tasks using the cheat sheet At any time the only highlighted step in the cheat sheet is the current step RTLAB UG 104 00 451 Restarting the cheat sheet Restarting the cheat sheet Any time after starting a cheat sheet you can restart from the first step by clicking Click to Restart in the Introduction step If you have already created some artifacts you will have to manually clean up the workspace before restarting the cheat sheet Progressing through the steps In the current step when you click Click to Perform a tool which can be a wizard will be launched and you will be requir
303. lues 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 Model When a project is selected in the Project Explorer view the properties view displays the project s properties ED Display E Properties 2 ln Compilation 4 Matlab View G Progress El Console Y 5 basic Advanced Ber Yalue General description Info derived false editable true last modified January 14 2010 10 55 34 4M linked false location C Opal rt RT LAB10 0_b5 workspace basic name basic path basic Here are the descriptions of the project 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 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 relative path of the project When a model is selected in the Project Explorer view the properties view displays
304. mbedding Simulation is running this will prevent 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 will then be executed on the Target and output will be displayed in the Target Console 186 RTLAB UG 104 00 Project Explorer 82 Choose a Python script Sa Python file O Select from workspace Qu Select from disk Select from target Log result to a file Please choose a python file Cancel Figure 22 Target Python Script Dialog e Flash bitstream Opens the Flash bitstream wizard dialog Command Opens a simple dialog to enter a command This command will then be executed on this Target and results will be displayed in the Target Console e Clean shared memory Cleans the shared memory on this Target e Clean core dumps Cleans the core dumps on this Target Tools e Get I O Infos Displays informations about this Target s I O cards in the Target Console e Diagnostic Displays a detailed diagnostic in the Target Console e 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 RT LAB pre
305. mber of different contexts Some examples are e In Dialogs and Windows e In Windows extends In Dialogs and Windows e In Dialogs extends In Dialogs and Windows RTLAB UG 104 00 425 Keys preference page e Editing Text extends In Windows e Debugging extends In Windows e In Console Much like configurations contexts can extend other contexts Note It is not recommended to promote a key binding to a context which it extends For example it is not recommended to move an Editing Text key binding to the In Dialogs and Windows context This may have unexpected results It is possible for some key bindings to work in dialogs Those key bindings are assigned to the In Dialogs and Windows context One example of such a key binding is the key binding for cut It is possible to change these key bindings For example it is possible to have Ctrl X as cut in dialogs but Ctrl W as cut in windows Customizing Key bindings With multi stroke key sequences schemes and contexts there are a lot of things to keep in mind when customizing key bindings To make things easier all key customization is done on the General gt Keys preference page In this example we want to bind CTRL 5 to the About command By default the keys preference page will show you all possible keybindings You can see the About command listed in the Help category You can bind the command by putting focus in the Binding text box and pressing CTRL and 5 like you would
306. me is done before executing model blocks It is generally Every step used by IO blocks Time to execute Post Execute callback This Post Execution computation time computation is done after executing model blocks It is Every step generally used by IO blocks Number of overruns An overrun occurs when the clock s interrupt is raised before the end of the previous Number of Overruns calculation step ep ioe is negative The following figure shows an example of the basic probes acquired by the monitoring over time It illustrates the data acquired for one time step of simulation for a model with one subsystem Here is a short description of the probes shown on this graph e The total step size shows the time to simulate one time step in real time it includes all other probes e The execution cycle tasks is the time spent by model to perform all model blocks calculations and the RT LAB services e The major and minor computations tasks is the time spent by the model to perform only all blocks calculations e The idle task is the time available that can be used to compute more calculation Pay attention The major and minor calculation tasks are concurent to the execution cycle Also note that small holes are visible between tasks These holes represent the time spent by other tasks not shown on this figure RTLAB UG 104 00 Events and Probes List One time step Ts Total Step Size Executi
307. me simulation mode Software synchronized u Real time communication link type LDP IP v Time Factor 1 0 vl Stop Time s Infinity v Pause Time s Infinity a Advanced Use restricted mode Restore Defaults Apply The value of these parameters are used when a new model is created If you change a property from Preference page each new model will inherit from Properties defined into Preference page but the existing models will stay unchanged Restricted clock time step us E The Restore Defaults button enables the user to restore the defaults value of the parameters Default target Platform Allows the user to choose the target platform on which to run the simulation QNX6 Redhat Redhawk Windows XP Vista 7 system default value QNX 6 x Real time simulation mode Enables the user to define how the model s simulation can be executed on a QNX6 RedHat or Windows XP Vista 7 system default value Software synchronized e 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 e 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 Please note that the Simulation with low priority mode is only available when working with a Windows target e Software Synchronized
308. me will be shown in ScopeView Signal Form See Selecting Signals section for more information e If signals that pass through the OpComm are buses change the signal names after each virtual block mux bus creator of real time subsystem to create complex name structure e Rebuild your model with RT LAB RTLAB UG 104 00 Using ScopeView The following figure shows a model that has one acquisition group that contains 4 signals One signal called MySignal passes through inport 1 of the OpComm block Three signals pass through the second inport of the OpComm block The signals bus name are respectively A D E B D E and C E EI untitled TAR File Edit view Simulation Format Tools Help File Edit View Simulation Format Tools Help Deus iE ao D H amp les ic foo Normal J SC_Console File Edit View Simulation Format Tools Help D SH Ba Constants 100 The second method called dynamic acquisition allows the user to access any model s signals without having to wire them from the real time subsystem blocks to the console OpComm block Here are the steps to add signals using dynamic acquisition e Add one or more OpComm block to your model s console Each console OpComm refers to one acquisition group Usually the same OpComm block is used for normal acquisition and dynamic acquisition e Open the OpComm Mask Parameters dialog Set the acquisition group and the number of inports as explained above e Chec
309. menu bar Expand RT LAB again and select Capabilities Unselect the Advanced capability and click OK RTLAB UG 104 00 Configuring perspectives Configuring perspectives In addition to configuring the layout of a perspective you can also control several other key aspects of a perspective These include e The New menu e The Window gt Open Perspective menu e The Window gt Show View menu e Action sets that show up on the toolbar Try customizing one of these items e In the shortcut bar click on the Edition perspective e Select Window gt Customize Perspective e Select the Commands tab e Uncheck the Old tools and click OK e Observe that the toolbar now exclude buttons for launching old RT LAB application e After experimenting with the other options on the Customize Perspective dialog choose Window gt Reset Perspective to return the perspective to its original state RTLAB UG 104 00 99 Configuring perspectives 100 RTLAB UG 104 00 Comparing Comparing The Workbench allows for the comparison of multiple resources and for the presentation of the results in a special compare editor Setup Before commencing with compare a few files must be created This will also be a good time to recap some of the basic features that have already been introduced e Start by selecting the file1 txt in the Project Explorer view Double click on it to open the text editor e In the editor for file1 txt type t
310. model is grouped into Console and computation subsystems special blocks called OpComm blocks must be inserted into the subsystems These are simple feed through blocks that intercept all incoming signals before sending them to computation blocks within a given subsystem OpComm blocks serve several purposes When a simulation model runs in the RT LAB environment all connections between the main subsystems SC_ SM_ or SS_ are replaced by hardware communication links For communication between real time target nodes SM_ and SS_ RT LAB uses a designated real time link For communication between the Console SC_ and the real time nodes SM_ or SS_ RT LAB uses TCP IP Because of these communication links between nodes the simulation may not run the same way in Simulink or SystemBuild as in RT LAB In RT LAB a computation subsystem waits for reception of all signals before it is able to start calculating In Simulink and SystemBuild on the other hand computations performed on a signal start as soon as the signal is available As pass through icons that wait for all inputs before making their outputs available OpComm blocks emulate the behavior of the system as it is run in RT LAB Keep this effect in mind when designing models If you receive a message indicating that the inserted OpComm blocks create an algebraic loop this means your model cannot be run in real time as a deadlock has been created To correct this problem include a state
311. mplifies the entry of parameters and guarantees complete and exact documentation of the system being modeled Once the model is validated you separates it into subsystems and insert appropriate communication blocks Each subsystem is executed by target nodes in RT LAB s distributed system Using I O Devices RT LAB supports the use of Input Output devices to enable the integration of external physical components into the system This arrangement is commonly known as a Hardware in the Loop HIL configuration or rapid control prototyping RCP whether the plant or controller is simulated respectively The optimized use of I O devices enables RT LAB to work as a programmable control system that presents a flexible real time user machine interface Interfaces for I O devices are configured through custom blocks that need only be added and connected to the graphic model s blocks RT LAB s automatic code generator will map the model s data onto the physical I O cards Running Simulations Once the original model is separated into subsystems associated with the various processors each portion of the model is automatically coded in C and built for execution by the target nodes Target nodes are commercial PCs equipped with PC compatible processors that operate under a Windows XP Vista 7 QNX or Red Hat Linux environment Executing and Manipulating Model Parameters When the C coding and compilation are complete RT LAB automatically dist
312. ms 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 Related concepts Views Perspectives Toolbars RTLAB UG 104 00 191 Related tasks Building models Opening views Moving and docking views Related reference Project Explorer 192 Compilation View RTLAB UG 104 00 Display View 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 E Console 51 Compilation EE Display matrixTest sm_master Model matrixtest 1 sm master compiled in RELEASE mode A 2 CPUs active on this Computer libOpal a Simulink R2010B v dev DEBUG MODE May 2 2011 15 24 10 core count Subsystem sm_master allocates 1 cores Subsystem ss_slave allocates 1 cores model matrixtest 1 sm master assigned to logical cpu 1 Monitoring is enabled RECV con
313. mulink models must be developed The first one hereafter called the FPGA model contains the XSG and RT XSG blocks required to build the bitstream to be downloaded in the FPGA chip of the reconfigurable 1 0 card The second model the CPU model runs on the target node and must contain one interface block the OpCtriReconfigurablelO block in order to manage communication between the CPU model and the reconfigurable I O card This block can be seen as a bridge between software and hardware It communicates and receives in real time the data samples to and from the OP5130 reconfigurable IO card through the Opal RT SignalWire communication link An example CPU model is presented in Figure 21 In this example the OpCtrl ReconfigurableIO block is set up with 16 IN OUT communication ports thus allowing transfer of 16 32 bit values of data to and from the OP5130 card at each calculation step The number of inports and outports of the OpCtrlReconfigurablelO block is configurable between 0 and 16 Note that the width of each inport and outport can also be increased up to 250 32 bit values if required by the application RTLAB UG 104 00 521 522 RT LAB Xilinx System Generator toolbox integration 1 0p5130xsg_basic SM_Master DEK File Edit View Simulation Format Tools Help Deus e om Meg HOT tregci01_ort om ow om ow Oe IDemo1 FPGA model ow from_camier_s square square_ont ow Signal Specifications ow FrotaelDO FP_DIO
314. n Configure Customization Filter Hidden Colurnns Visible Columns Filter ilter Table Default Es De El Current Table View Complex RT LABcomplex width 60 Name RT LABname width 100 show RTW RT LABrtw width 50 showsfalse Path RT LABpath width 350 showstr Value RT LABvalue width 75 shouvit Data Type RT LABdatatype width 60 Size RT LABsize width 80 show true Access RT LABaccess width 75 show am J 5 C E m J r Sorter lt xSorter gt lt id gt RT LABpath lt id gt lt xSorter gt Ex Filter Text Ex Column Filter Ex el gt Rename Column Save Customization Set as Default Delete a a Figure 48 Customize Table dialog Toolbar Command Name Description x Discard Discards current changes P Apply Applies current changes Y Auto apply Toggles auto apply mode a Select Working Sets Selects the working sets to be displayed in this view Ca New Working Set Saves current variables to a new working set LJ ry New View Opens a new Variables Table view View Menu Command Description Customize Table Opens the configuration dialog 232 RTLAB UG 104 00 Context Menu Command Show In Copy Remove Select All Refresh Related concepts Working Sets Views Perspectives Toolbars Related tasks Opening views Moving and docking views Related reference Variable Viewer Project Explorer Search View RTLAB UG 104 00 Variables Table Vie
315. n Settings Page Tools ES Display I O boards information E Display a complete diagnostic 9 Open a Telnet terminal I O boards information Displays information about Opal RT boards in the Target Console Complete diagnostic Displays advanced hardware and software configuration in the Target Console Telnet terminal Opens the Terminal View to open a Telnet connection to the target Simulation Settings Page This page contains properties that affect the RT LAB simulations run on this target Note these properties are not available for Windows targets Utilities section Utilities This section provides some utilities to configure the simulations v Enable multimodel support Date 10 09 11 15 32 Sync with host Multimodel support Allows several models to run on the target at the same time Remove embedded mode Removes any embedded simulation see Embedding Simulation from the target If a project is currently connected to this simulation the model will be reset first If not a dialog will be displayed to optionally reboot the target Date The current date and time of the target Sync with host Set the current date and time of the target to the host computer s ones Software Page This page allows you to install uninstall and configure softwares on the target Note this page is not available for Windows targets 160 RTLAB UG 104 00 Software Page RT LAB section RT LAB Versions See and
316. n open a new Target Console from the Console View Menu A dialog is displayed to select the Target to connect to this new Console Choose A Target TestMachine TestDriveMachine DeyMachine Toolbar The toolbar and the context menu provide some commands to control the Target Console Command Name Description Availability Terminate Closes the current Toolbar console RTLAB UG 104 00 223 Target Console Command Name Description Availability E Clear Console Clears the current Toolbar and Context console menu SE Scroll Lock Toggles the Scroll Lock Toolbar Pin Console Pins the current console Toolbar to remain on top of all other consoles in the current Console View g Display Selected Opens a listing of current Toolbar Console consoles and allows you to select which one you would like to see Open Console Opens a new console of Toolbar the selected type pa LS 224 RTLAB UG 104 00 Log Console Log Console The Log Console is shown in the Console View It displays internal debug messages and needs the Advanced Capabilities preference page to be used Here is what the Log Console looks like E console 3 RT Lab log Checking MetaController OK Checking RT Lab license OK Workspace created Project RT Demo opened A Figure 40 LogConsole Overview e FB Er iv The Log Console can be opened using the Open Console command of the Console View Toolbar
317. n script Do not use any spaces or special characters in the file name for example MyScript py Click Finish when you are done RTLAB UG 104 00 35 Using the New button e By default the Project Explorer view do not display generic files and folders of the file system Click the Filter Resources button of the Project Explorer toolbar to display the files and folders e You can easily turn it off by clicking the button again Now that we have created our resources the Project Explorer view shows our project the model the target and the Python script To the right of the Project Explorer view is the text editor open on the file we created MyScript py EIER DEN Edit Refactoring Navigate Simulation Tools Window Help Ae i R 2 lOonpn B 4 amp amp 86 RS Project Explorer 22 Aal MyModel mdl 5 MyScript py x BB 8 dy Targets de MyTarget202 ag MyProject Models a MyModel CS File system H E help gt models P MyScript py Python264 Y produits de writable 36 RTLAB UG 104 00 Preparing and building model Preparing and building model Now that there is a model in your project here s how to prepare and build it for real time simulation e Preparing the build configuration e Selecting the development node e Editing the model e Building the model e Assigning subsystems RTLAB UG 104 00 37 38 Preparing and building model RTLAB UG 104 00 Selecting the development node
318. n the libraries In Simulink environment libraries must be transferred to the model directory on the target prior to model compilation RT LAB takes care of transferring core libraries such as libOpalCore a and libOpalUtils a to the model directory during the build process The library libOpalAsyncApiCore a however is not systematically transferred by RT LAB since it is required only for linking Asynchronous Programs RT LAB models using Asynchronous Process controller blocks provided in the RT LAB I O library already take care of transferring all required libraries by the use of Matlab m file callbacks Users who have disabled the link of their controller blocks to their original RT LAB library blocks in their own models need to restore this link in order to retrieve the proper callbacks settings Users who have made their own Simulink mask above the s function sfun_gen_async_ctrl need to add the libOpalAsyncApiCore a library to the list of files to transfer to the target This will be explained in the next section Furthermore in order for the makefile to link with the libraries found in the model directory the model folder must be added to the library path by adding the option L to the link flags Configuring RT LAB for build of the asynchronous program After preparing both the Asynchronous Program source code and RT LAB model to ensure that the application is properly compiled follow these steps 1 In RT LAB open a Model Edit
319. nality is particularly useful when tuning parameters Description Filename File path and name including the param extension where the file will be stored Use the dropdown arrow to override a file from the history or the browse button to select a file from the file system Comment Comment stored with your parameters Created by File author Created on File creation date Model Information History and revision information of the model that was used to save the parameter file RTLAB UG 104 00 351 Save Parameters wizard Related references Project Explorer Load Parameters wizard 352 RTLAB UG 104 00 Dialogs Contents e Build Configurations e RT LAB Search e File Search e License Request Dialog RTLAB UG 104 00 Dialogs 353 Dialogs 354 RTLAB UG 104 00 Build Configurations Build Configurations The Build configurations dialog allows to setup the build configuration of your model and then start the build process To start the build using the Build configuration dialog select Simulation gt Build Configurations menu Here is what the dialog looks like Build Configurations Matlab Matlab R20098 7 9 Development Node on QNX 6 x redhat_i Redhat Build steps Separate model Generate code Clean target directory Transfer files to target Compile and link generated code Retrieve Files From target Select All Deselect All Matlab The
320. nc Handler Jitter synchronized mode Every step It is used to determine when the step will begin Synchronized 10s Time to acquire data from the IOs board at the beginning Every st p of the step Status Update Time to update internal status of the subsystem Every step Time to acquire model s data It does not take into Data Acquisition account the time to transfer the data to the Command Every step Station Only when signals Signals Change Time to update model s signals are received from the Console Time to receive and call the user callback function Only when a blob User Blobs es registered for a specific blob is received RTLAB UG 104 00 487 488 Events and Probes List nodes The Time is O if the model is not distributed EVENT PROBE NAME DESCRIPTION FREQUENCY Sende Time to send the internal status to other computation Every step node The Time is 0 if the model is not distributed Time to receive status and data from other computation Multi Receive Every step Handle target requests Time to handle feedback sent to the Host Command Station Only upon request Handle host requests Time to handle the commands received from the Host Command Station Only upon request Time to execute Pre Execute callback This computation It indicates the number of overruns recorded since the simulation began and only for clocked subsystems Pre Execution computation ti
321. nch window Perspectives can be opened in the same existing Workbench window Perspectives define visible action sets which can be changed to customize a perspective A perspective that is built in this manner can be saved creating a custom perspective that can be opened again later The Workbench window displays one or more perspectives RT LAB determines initially what default perspective is displayed in this example it is the RT LAB Edition perspective A perspective consists of views such as the Project Explorer as well as editors for working with resources More than one Workbench window can be open at any given time So far only the RT LAB Edition perspective shown below has been used in this tutorial This section will explore how to open and work with other perspectives A perspective provides a set of functionality aimed at accomplishing a specific type of task or working with a specific type of resource EER File Edit Mavigate Search Simulation Tools Window Help 4 0 gt Co gt Project Explorer 22 0 B filet txt 22 gt ES filez txt 5 BS NS This is sample text file 7 There is not much else we can really say about it other than it has five lines of text that are rather dull a de Targets ow MyTarget202 i g MyProject E Models ET File system B HH help HH models E Python264 Y produitsidevirt lab bul Display 3 E Properties 5 Compilation matlab View Progress E console lm
322. nd stop times shown are relative to the beginning of the current acquisition frame or based on the absolute time of the simulation 244 RTLAB UG 104 00 Monitoring View Monito ring Units Duration O Second s O millisecond ms Oj Lu Start times amp stop times Show relative time O Second s O millisecond ms 2 Microsecond us Monitoring Properties Dialog This dialog allows you to change the acquisition settings for the monitoring Monitoring Properties Sampling Number of samples by frame hoo DS Trigger No trigger ringer om overruns Overrun Number of visible steps before and after overruns o Number of samples by frame This setting allows you to change the number of consecutive steps samples by frame that are acquired by the monitoring This setting can be changed while the simulation is running RTLAB UG 104 00 245 Monitoring View Maximum number of samples This setting allows you to determine the maximum number of samples that could be set for one frame This setting is enabled when the model is not running and was property compiled Trigger The trigger settings are not yet available from this dialog Number of visible steps before and after overruns It determines the number of steps that are visible before and after a time step with overruns This setting is used when steps without overruns are hidden from the data area using the expand collapse button if the data area
323. ne 2 OO N Ep mwa This is line 4 104 RTLAB UG 104 00 Understanding the comparison Understanding the comparison Comparing file1 txt and file2 txt resulted in the following compare editor The left side shows the contents of file1 txt and the right side shows the contents of file2 txt The lines connecting the left and right panes indicate the differences between the files If more room is needed to look at the comparison the editor tab can be double clicked to maximize the editor File Edit Simulation Tools Window Help muse EP Compare filet txt ile2 txt 3 ES Text Compare 321 ES MyProject filet txt ES MyProject file2 txt This is line 2 mithis is line 1 This is much Better lime 3 is line 4 is line 4a and it is new is line 5 The numbered changes on the left side of the difference editor are as follows e Starting with the top line in the left pane the difference bar in the area of the blue circle indicates something is missing from the very top of the left file Follow the difference band see 1 to the right file It contains This is line 1 e The next line This is line 2 is white indicating it matches the right file e Moving onto the next line colored in the background color see that the left file and right file have different contents for this line see 2 e The next line This is line 4 is once again in white so it can be skipped e The next line ex
324. nection to host established SEND connection to host established A Unit delay is applied on status exchange Display of standard output will be disabled Monitoring start time 0 000 ms using CPU speed 2933 MHz SubSystem step size 0 001000 sec Status updated at every 1 local step Synchronized with software timer Real time SingleTasking mode Snapshot taken opmatrixtest_sm master 0 snap 0 PAUSE mode IO set to pause value Total of 0 Overrun detected Tue Jun 21 18 34 24 2011 ES Monitoring 1 RUN mode IO set to run value Synchronized step size 1000 us Tue Jun 21 18 34 26 2011 Figure 24 Display View The Display View has three important elements selected model subsystem names display output and toolbar The name of the selected model subsystem is showed at 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 m
325. nged The Restore Defaults button enables the user to restore the defaults value of the parameters EMTP Works EMTP RV Installation folder Path where the EMPT tool is installed RTLAB UG 104 00 389 EMTP preference page 390 RTLAB UG 104 00 Matlab preference page Matlab preference page Use the Window gt Preferences gt RT LAB gt Simulation Tools gt Matlab dialog page to set the matlab preferences Here is what the Matlab preference page looks like Matlab da y v Here are the Matlab and Simulink preferences Basic Current Matlab version Matlab R20114 7 12 w Advanced Matlab and Simulink target root directory Example fusr matlab v7 7 Automatic o En m RTW template make file TMF Automatic v el RTW target language compiler file TLC Automatic v m Restore Defaults Apply The value of these parameters are used when a new model is created If you change a property from Preference page each new model will inherit from Properties defined into Preference page but the existing models will stay unchanged The Restore Defaults button enables the user to restore the defaults value of the parameters Current Matlab version Matlab version used to open and compile Simulink mode Note this setting will be changed if the user opens the model by choosing Edit with and a new matlab version default value Matlab R2011B Matlab and Simuli
326. ngly by setting the correct value in the Simulink SystemBuild model and by recompiling it Stop Time s This value in seconds specifies when the model will stop If value is Infinity the model will execute forever You don t need to recompile the model to apply a new value Pause Time s This value in seconds specifies when the model will pause If value is Infinity the model will execute until a reset is done except if a stop time is specified Use restricted mode For advanced users only This setting can be used only when the model s current target platform is QNX 6 x When this platform is selected a given model can be loaded either in Free Clock mode or in Restricted Clock mode e In Free Clock mode the user can load one non Software Synchronized model on a given target node and is free to use any time step value within the boundaries of the QNX 6 x restrictions If the user tries to load another non Software Synchornized model on the same target node it will be stopped with a relevant error message e In Restricted Clock mode the user can load a series of non Software Synchronized models on a given node In this mode each model time step must be consistent i e a multiple of with a specific base Clock Period that should be specified by the user Each time an additional model is being loaded on this specific target its time step will be checked against the current base Clock Period to validate the
327. nk target root directory Path to be used instead of usr matlab to find the MATLAB include and source files RT LAB supports multiple versions of Matlab by keeping copies of previous versions in paths other than usr matlab Automatic setting means the target path is automatically set based on the MATLAB version used on the Command Station default value automatic RTW template make file TMF 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 default value automatic RTW target language compiler file TLC 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 default value automatic RTLAB UG 104 00 391 Matlab preference page 392 RTLAB UG 104 00 Matrixx preference page Matrixx preference page Use the Window gt Preferences gt RT LAB gt Simulation Tools gt Matrixx dialog page to set the matrixX preferences Here is what the Matrixx preference page looks like MatrixX er v Here are the MatrixX and SystemBuild preferences Basic Batch file bat used to start the Matrixx application _ 1 MatrixX root directory on POSIX targets Example fusr matrixx v62 2 Automatic v
328. nodes run their main calculations without having to wait for outputs from other nodes in the network This is accomplished by identifying calculations that can be run independent of inputs as state variables and passing input dependant variables through Delay blocks State variable A state can be defined as an output signal which is computed only from preceding inputs or outputs Example of blocks which introduce a state are the integrator and memory blocks A gain block does not produce a state because its output at step z depends on its input at the same step Distributed examples 464 RTLAB UG 104 00 Building a distributed Model for RT LAB Fully parallel execution Memory Integrator OpComm Some Computation OpComm Some Computation sm_subsystem ss_subsystem At each step RT LAB does the following 1 ss_subsystem sends to sm_subsystem 2 sm_subsystem sends to ss_subsystem 3 computation of both subsystems Serial execution worst case 29 r OpComm Some Computation EF OpComm Some Computation sm_subsystem ss_subsystem At each step RT LAB does the following 1 ss_subsystem sends to sm_subsystem 2 computation of sm_subsystem 3 sm_subsystem sends to ss_subsystem 4 computation of ss_subsystem Part parallel execution intermediate case OpComm Computation OpComm Some Computation sm_subsystem ss_subsystem At each step RT LAB does the following
329. ns of this font to display progress View Message Font defaults to properties file editor text font Used for messages in the view title bar if present To change these fonts e Open the General gt Appearance gt Colors and Fonts preference page e Select the font you want to change e Click Change e Use the dialog which opens to select a font e Click OK Note You can also click Use System Font to set the font to a reasonable value chosen by the operating system For example on Windows this will use the font selected in the Display Properties control panel Plug ins that use other fonts may also provide preference entries to allow them to be customized RTLAB UG 104 00 589 Changing font and colors In addition to the above some text is always displayed in the system font For example the navigator tree always does this To change the font used in these areas you can use the configuration tools provided by the operating system for example the Display Properties control panel on Windows Colors To set the colors used by the Workbench to display error text and hyperlink text e Open the General gt Appearance gt Colors and Fonts preference page e Select the color you want to change in the tree view and click the color bar on the right e Use the dialog which opens to select a color e Click OK Plug ins that use other colors may also provide preference entries to allow them to be customized For example the sea
330. nsaved changes If an attempt is made to close the editor or exit the Workbench with unsaved changes a prompt to save the editor s changes will appear EER File Edit Navigate Simulation Tools Window Help gt E a O0 gt 0 e B A D gt LS Project Explorer 52 OR filei txt 2 i This is a sample text file Jy Targets Project HE Models E tS File system ES filet txt name appears in the tab above 1 2 3 The name of the kile is filel txt and the 4 5 A indicates that the editor has unsaved changes ES Display 23 I Properties m Compilation A Matlab View Progress E Console O No selection Writable Insert When an editor is active the Workbench menu bar and toolbar contain operations applicable to the editor When a view becomes active the editor operations are disabled However certain operations may be appropriate in the context of a view and will remain enabled The editors can be stacked in the editor area and individual editors can be activated by clicking the tab for the editor Editors can also be tiled side by side in the editor area so their content can be viewed simultaneously In the figure below editors for JanesFile txt and JanesFile2 txt have been placed above the editor for JanesText txt Instructions will be given later in this tutorial explaining how to rearrange views and editors RTLAB UG 104 00 23 24 la E Targets File Edit Navigate Simulation Tools Window
331. nsion RTLAB UG 104 00 379 Files transfers preference page Do not display notifications at reset Prevents RT LAB from displaying notifications when files are retrieved after a model has been reset This is mostly useful when many files are retrieved since there would be one notification per file 380 RTLAB UG 104 00 Performance preference page Performance preference page Use the Window gt Preferences gt RT LAB gt Execution gt Performance dialog page to set the performance preferences Here is what the Performance preference page looks like Performance Am v Here are the performance preferences Overruns Enable detection of overruns Perform action after N overruns 110 g Action to perform on overruns Continue Number of steps without overruns 10 Restore Defaults Apply The value of these parameters are used when a new model is created If you change a property from Preference page each new model will inherit from Properties defined into Preference page but the existing models will stay unchanged The Restore Defaults button enables the user to restore the defaults value of the parameters Enable detection of 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 parameters is checked RT LAB detects overruns and performs the action specified in the Action to perform on overruns field Thi
332. nt Constraints on element names RTLAB UG 104 00 503 Configuring the RT LAB Orchestra communication layer The following constraints apply to domain and data item names e the names are case sensitive e leading and trailing spaces are stripped and the resulting stripped names are limited to 64 characters e the names have to consist of at least one non space character a e the names cannot contain a comma or a pound sign The RT LAB Orchestra CSV File 504 CSV stands for Comma Separated Values a file format that is compatible with MS Excel An Orchestra CSV file consists of a header followed by a body made up of rows of data The CSV header The header consists of 2 distinct and required elements namely a Domain Descriptor and a Column List The Domain Descriptor provides a description of a DDF domain in the format of a pair of attribute value pairs separated by namely following the format domain attributel valuel attribute2 value2 etc The table below shows the list of defined attributes and the corresponding valid values Attribute Value Description name any valid identifier The domain name connection local remote The connection type VMIPCI5565 64M The type of reflective memory cardName card used for a remote VMIPCI5565 128M connection The PCI index that corresponds to pcilndex any positive integer the communication card used for a remote connection
333. nt selection or for the next occurrence of the most recent expression found using the Find Replace action Find Previous This command allows you to search for the previous occurrence of the current selection or for the previous occurrence of the most recent expression found using the Find Replace action Incremental Find Next This command allows you to search for expressions in the active editor As you type the search expression it will incrementally jump to the next exact match in the active editor While in this mode the up and down cursor keys can be used to navigate between matches and the search can be cancelled by pressing left or right cursor keys the enter key or the escape key Incremental Find Previous This command allows you to search for expressions in the active editor As you type the search expression it will incrementally jump to the previous exact match in the active editor While in this mode the up and down cursor keys can be used to navigate between matches and the search can be cancelled by pressing left or right cursor keys the enter key or the escape key RTLAB UG 104 00 281 Edit menu Add Bookmark This command adds a bookmark in the active file on the line where the cursor is currently displayed Add Task This command adds a task in the active file on the line where the cursor is currently displayed Word Completion This action will attempt to complete the word currently being entered in the active
334. ntents e Basic Tutorial RTLAB UG 104 00 15 Getting Started 16 RTLAB UG 104 00 Basic Tutorial Basic Tutorial This tutorial provides a step by step walk through of the RT LAB Workbench RTLAB UG 104 00 17 18 Basic Tutorial RTLAB UG 104 00 The Workbench The Workbench When RT LAB is launched the first thing you see is a dialog that allows you to select where the workspace should be located The workspace is the directory where your work will be stored For now just click OK to pick the default location After the workspace location is chosen a single Workbench window is displayed A Workbench window offers one or more perspectives A perspective contains editors and views such as the Project Explorer Initially in the Workbench window that is opened the RT LAB Edition perspective is displayed with only the Welcome view visible Click the arrow labeled Workbench in the Welcome view to cause the other views in the perspective to become visible Note you can get the Welcome view back at any time by selecting Help gt Welcome A shortcut bar appears in the top right corner of the window This allows you to open new perspectives and switch between ones already open The name of the active perspective is shown in the title of the window and its item in the shortcut bar is highlighted You should be seeing the RT LAB Edition perspective The following views should be visible The Project Explorer Compilation Disp
335. nterpreter Python References You can find additional information on the official PyDev web site http pydev org 222 RTLAB UG 104 00 Target Console Target Console The Target Console is shown in the Console View It is a simple Shell interface that looks similar to a Terminal View E console 2 5 28 15 20 RT Lab target TestMachine BEE RT LAB TestMachine gt gt ps a PID TTY TIME CMD RT LAB TestMachine gt gt ifconfig etho Link encap Ethernet HWaddr 00 D0 68 09 12 62 inet addr 192 168 0 175 Bcast 192 168 0 255 Mask 255 255 255 0 inet6 addr fe80 2d0 68ff fe09 1a6a 64 Scope Link UP BROADCAST RUNNING MULTICAST MTU 1500 Metric 1 RX packets 10320305 errors 0 dropped 0 overruns 0 frame 0 TX packets 6311227 errors 0 dropped 0 overruns 0 carrier 0 collisions 0 txqueuelen 1000 RX bytes 962152167 917 5 MiB TX bytes 3491186374 3 2 GiB lo Link encap Local Loopback inet addr 127 0 0 1 Hask 255 0 0 0 inet6 addr 1 128 Scope Host UP LOOPBACK RUNNING MTU 16436 Metric 1 RX packets 96 errors 0 dropped 0 overruns 0 frame 0 TX packets 96 errors 0 dropped 0 overruns 0 carrier 0 collisions 0 txqueuelen 0 RX bytes 5456 5 3 KiB TX bytes 5456 5 3 KiB RT LAB TestMachine gt gt Figure 39 Target Console Overview The Target Console automatically opens when you execute a command or launch a Python script on a Target from its context Menu If the Advanced Capabilities preference page is enabled you ca
336. o be registered in RT LAB as the associated editor for a given file type Use the General gt Editors gt File Associations preference page to register editors Related concepts Workbench Editors RTLAB UG 104 00 135 External editors 136 RTLAB UG 104 00 Model Editor Model Editor RT LAB provides a simple form based multi page model editor that manages all model properties To open a user friendly model editor into the current perspective double click on your model in the Project Explorer Note that all model properties are also available in the Properties View when selecting a model An RT LAB model is characterized by a Simulink SystemBuild model and a set of properties These properties are not necessarily linked to a Simulink SystemBuild model Sometimes these properties are related to an RT LAB simulator These properties are named Model Properties and are defined for each new RT LAB model Each new model inherits its default property values from the RT LAB preferences defined in the Preference Pages of RT LAB These properties are individually editable for each RT LAB model through the Model Editor or Model Properties View You can configure several models at the same time by using the Model Properties View These properties are organized by categories Each category is shown on different page of the model editor One or more categories can be displayed on the same page when related For details on the individual e
337. o import Use this to restrict the import to only certain file types Select All Check off all files and folders for import Deselect All Uncheck all resources Folder The folder into which the resources will be imported Type the path or Browse to select a path in the Workbench The folder holding the selected resource Overwrite existing resources without warning Determines whether importing a resource should silently overwrite a resource which already exists in the Workbench If this option is off you will be prompted before a given resource is overwritten in which case you can either overwrite the resource skip it or cancel the import Off Create complete folder structure Create hierarchy folder structure in the Workbench to accommodate the resources being imported and all parent folders of those resources in the file system Create selected folders only Create hierarchy folder structure in the Workbench to accommodate the resources being imported Preferences Import preferences from the local file system From preference file The file from which to import preferences Select a previous file from the drop down combo or Browse to select the file in the file system Import All Import all of the preferences Choose specific preferences to import Choose from the preferences contained in the file like CVS connection preferences or JRE preferences Select All Check off all files and folders for import Deselect All
338. ocated in folder RT LAB common include_target Note that RT LAB provides two complete examples containing the models and their associated Asynchronous Program C code These examples are available as templates for RT LAB Projects for both Simulink and SystemBuild 514 RTLAB UG 104 00 Building the asynchronous application e IO _Generic_ async_ip is an example of UDP IP and TCP IP communication e IO _Generic_ async_serial is an example of serial communication See New RT LAB project wizard to learn about RT LAB templates The C code of these examples is commented step by step and indicates the sections where the user can insert his application specific code They can be used as templates for other applications Preparing the makefile In order to compile this source code into an executable program the user must also prepare its associated makefile It is assumed here that the reader is familiar with setting up C makefiles The above mentioned templates also provide the makefile associated with the C source code See for example async_serial_source AsyncSerial mk in the Async_serial example The libraries libOpalAsyncApiCore a libOpalCore a and libOpalUtils a contain all the definitions required to link C source code using the Asynchronous Process API functions so the LIBS definition should look like LIBS IOpalAsyncApiCore IOpalCore OpalUtils IOpalCore Note the repetition of lOpalCore in the list due to file dependencies i
339. odel Editor defines Add the following variables QNX 6 x target LD_LIBRARY_PATH LD_LIBRARY_PATH opt X11R6 lib usr X11R6 lib e DISPLAY 127 0 0 1 0 Red Hat target e DISPLAY 0 0 472 RTLAB UG 104 00 Debugging Environment Yariables Set the environment variables of your model Name Value Description add DISPLAY 127 0 0 1 0 a SA Last LD_LIBRARY_PATH LD_LIBRARY_PATH fopt x11R6flib fusr X11R6 lib 5 In Assignation Page from Model Editor check the subsystem s you want to debug check the Advanced field to add the Debug column Assignations Set the properties of the subsystems and assign them to physical nodes Subsystems Select subsystems to edit their properties Name Assigned node Platform XHP CPU Debug EE AENA CET CR D ss_slave q197 QNX 6 x C OFF Auto Dorr Debugging the model Debugging locally on target QNX 6 x To debug a model 1 Start Photon on the target if it is not already done and log as root 2 Load the model 3 Open the source file you want to debug and insert your breakpoint if any for instance DDD if you want to debug the mdiStart Simulink of Rtdemo1 model go to menu File gt Open source then select rtdemo1_1_sm_computation c and click on Open button The source file will open Look for the MdiStart function put the cursor on the first line and add a breakpoint click on the Break button on the toolbar A breakpoint should have been inserted
340. ollowing figures fy Project Explorer 53 Bb Bi de Targets wa localhost ge M201 Li RedHat231 Demo embedded Running simulations LS Demo gt rtdemol 2 sm_computation ie Demo Running Embedded on RedHat231 Figure 25 Embedded simulation in Project Explorer However the RT LAB user interface does not automatically detect that a simulation is running ona 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 e Select one or more targets from the Project Explorer view e 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 sta
341. om 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 See Figure 3 This element is only a graphical container and is not considered as a resource Actions that can be handled by this element are described in section named Model Folder below Before launching a simulation a Model needs to be built as described in Building models Once built a Model will contain a list of Subsystems and possibly one Console Subsystems The compilation process creates Subsystems based on the top level elements of your model file See Building models 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 RTLAB UG 104 00 Project Explorer 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 See Building models and Acquiring and Viewing Data for detailed information Targets An RT LAB Target represents a physical simula
342. om the Project Explorer view only actions performed on this project will be recorded On the Tools gt Python menu click Record item or simply click the Record item in the drop down menu of the Python toolbar button 2 o E q 4 9 Run Run Configurations Open Console Stop Recording The New Macro dialog box will appear RTLAB UG 104 00 491 Using Python Script and the Macro Recorder Use default location Location CRM ocr Write time Description This is a script used for e In the New Macro dialog type the script s file name where it will be stored By default the script will be located in the project s scripts folder but it is also possible to specify a different location such as a project s folder or anywhere on file system e Check uncheck the Write time setting to record the time elapsed between actions in the macro When checked the macro recorder will add a sleep command between all actions to simulate the time elapsed when recording e Type the description for your macro e Click Finish to start recording e Perform actions on your project such as changing parameters or configurations These actions will be recorded e On the Macro Recorder toolbar click the pause and resume buttons to activate and deactivate recording project actions Macro Recorder oe X Project rtdemoi e To stop the recording click one of the following item
343. ompiler and linker preferences Sources gt Includes Libraries Library Path Im Compiler Source Files Restore Defaults Apply The value of these parameters are used when a new model is created If you change a property from Preference page each new model will inherit from Properties defined into Preference page but the existing models will stay unchanged The Restore Defaults button enables the user to restore the defaults value of the parameters Sources Names of source files to be compiled in addition to the code generated by RTW AutoCode Used to incorporate user written code into the model executable e g file1 c file2 c file3 c Includes Target path s where user include files can be found Used to search for include files required to compile user written code when the include files do not reside in already searched paths 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 Library path Target path s where user libraries can be found Used to search for libraries other than the MATLAB MATRIXX and RT LAB libraries when incorporating user written code Compiler command User command to be called on the target during the compilation process RTLAB UG 104 00 371 Compiler and Linker preference page 372 RTLAB UG 104 00 Monitoring preference page Monitoring preference page Use the Window
344. on Cycle Major computation time Minor computation time Idle The following figure shows a similar example but now it also includes most advanced probes It illustrates the data acquired for one time step of simulation for a model with one subsystem Pay attention to the order the tasks are executed You can also see that most of the CPU time is now represented by one of the tasks there is no hole between tasks RTLAB UG 104 00 489 490 Events and Probes List a One time step Ts Sync Handler Jitter Total Step Size Execution Cycle Status Update Pre execution computation time Major computation time Data Acquisition Minor computation time Post execution computation time Handle target requests Handle host requests Continuous Sample Time and Major Minor Time Step Unlike the discrete sample time continuous sample times are divided into major time steps and minor time steps where the minor steps represent subdivisions of the major steps The discrete ODE solver you choose integrates all continuous states from the simulation start time to a given major or minor time step The solver determines the times of the minor steps and uses the results at the minor time steps to improve the accuracy of the results at the major time steps However you see the block output only at the major time steps The number of subdivisions performed by the discrete solver depends on the ODE solver For example
345. on of your script Remember that these scripts will be applied to every models they have to be modified with caution RTLAB UG 104 00 471 Debugging Debugging Installing debugger on a target QNX 6 x Refer to the RT LAB Installation Guide to install DDD packages Once the DDD debugger has been installed verify that it is running correctly 1 Start Photon on the target if it is not already done and log in as root 2 Open a terminal 3 Enter ddd command DDD should be displayed on the screen Red Hat The DDD debugger has been installed with the operating system No other installation is necessary Install the Nightstar Suite from Conccurent Computer Corporation if you want to debug your model using NightView Windows The Microsoft Visual Studio 6 debugger will be used to debug the model Since MS Visual studio is required in order to compile a model on Windows target no more steps are required to install the debugger Setting RT LAB configuration 1 Select the model you want to debug in your project 2 In Diagnostic Page from Model Editor check Use extended timeout and Compile Model in debug Uncheck the Enable Watchdog checkbox Debugging Properties Set the debugging properties of the model Enable extended timeout C Enable watchdog Watchdog timeout ms Compile model in debug 3 Build the model 4 Configure where to display the debugger in Environment Variables Page from M
346. on the host Port If Use default port is selected port 80 will be used to access remote content on the host To use any other port the Use port option must be selected and the correct port must be specified in the text field RTLAB UG 104 00 423 Help Content preference page 424 RTLAB UG 104 00 Keys preference page Keys preference page The function of the keyboard can be extensively customized in RT LAB using the General gt Keys preference page Within RT LAB key strokes and key sequences are assigned to invoke particular commands Key Strokes Key Sequences and Key Bindings A key stroke is the pressing of a key on the keyboard while optionally holding down one or more of these modifier keys Ctrl Alt or Shift For example holding down Ctrl then pressing A produces the key stroke CtrI A The pressing of the modifier keys themselves do not constitute key strokes A key sequence is one or more key strokes Traditionally Emacs assigned two or three key stroke key sequences to particular commands For example the normal key sequence assigned to Close All in emacs is Ctrl X Ctrl C To enter this key sequence one presses the key stroke Ctrl X followed by the key stroke Ctrl C While RT LAB supports key sequences of arbitrary lengths it is recommended that keyboard shortcuts be four key strokes in length or less A key binding is the assignment of a key sequence to a command Schemes A scheme is a set of bin
347. on the serial link and are placed in the shared memory at specific locations determined by the developer of the Asynchronous Program Asynchronous receive blocks placed in the RT LAB model periodically access the shared memory and return the data present in the shared memory via the outports of these blocks The data can then be used within the RT LAB model for further processing In a similar way data can be transferred from the RT LAB model to the shared memory by the use of Asynchronous Send blocks These data can then be retrieved by the Asynchronous process in the shared memory and transmitted to the serial link Building the asynchronous application Preparing the RT LAB model Asynchronous Processes are supported both in the Simulink and Systembuild environments However in the following sections examples are based on the Simulink implementation Systembuild users can refer to example models such as those for TCP IP and Serial communication which are provided both for Simulink and Systembuild The blockset of dedicated Simulink blocks can be found in the Simulink library browser in the section RT LAB gt Communication gt Asynchronous as presented in Figure 16 below 512 RTLAB UG 104 00 Building the asynchronous application 3 Simulink Library Browser File Edit View Help D amp x OpAsyncGenCtil This icon is used to define somes settings for the executable see last parameter All Asynchronous Send and Receive icon
348. onitor the simulation No information is provided for this subsystem by the Display View For more information please see Using the Console The Display View is useful only after the model has been built For more details on compilation information please see Compilation View By default the Display View is included in the Edition perspective To add it to the current perspective click Window gt Show view gt Other gt RT LAB gt Display RTLAB UG 104 00 193 Display View 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 that 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 e Files transferred to the target nodes e Name of the executable e Number of active CPUs on the computer e Library used by RT LAB e RT LAB version and build tag e Monitoring state e Connection state with the host e CPU speed of the target nodes e Subsystem step size e Real Time simulation mode e Snapshot status Executing a model When executing a model the simulation starts on the target nodes For each subsystem
349. onment consisting of in its basic form an Editor Area containing one or more stacks showing the open editors surrounded by one or more View Stacks each containing one or more views These various parts compete for valuable screen real estate and correctly managing the amount of screen given to each can greatly enhance your productivity within the IDE The two most common mechanisms for managing this issue are minimize i e make me use as little space as possible and maximize i e give me as much space as you can The RT LAB presentation provides a variety of ways to access these operations e Using the minimize and maximize buttons provided on a stack s border e Selecting the Minimize or Maximize item on the context right click menu for a stack e Double clicking on a stack e Using Ctrl M this is a key binding for a command that will toggle the currently active part between its maximized and its restored i e normal states Maximize It is desirable at times to focus your attention on one particular part to the exclusion of the others The most popular candidate for this is of course maximizing the editor area in order to make as much of the display available for editing as possible but there are workflows where it would make sense to focus on a view as well The default presentation implements the maximize behavior by minimizing all stacks except the one being maximized This allows the maximized stack to comp
350. ons v Display notifications Do not display notifications at reset Restore Defaults Apply The value of these parameters are used when a new model is created If you change a property from Preference page each new model will inherit from Properties defined into Preference page but the existing models will stay unchanged The Restore Defaults button enables the user to restore the defaults value of the parameters File retrieval root directory Directory where the files retrieved by RT LAB after the model execution will be copied Enable automatic file retrieval 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 default value true Enable file retrieval during simulation If this option is enabled RT LAB retrieves the files generated by the model simulation as soon as they are created on the target If this option is disabled RT LAB will retrieve those files after the model resets Build intermediate tree on file retrieval Specifies if intermediate folders are generated or not in the retrieve directory default value true Display notifications Displays a popup notification each time a file has been retrieved New file available Click here to open this file with Matlab myfile_1 mat a Clicking on the notification opens the file with an appropriate editor or with Matlab depending on the file exte
351. ons have been defined in the view ES New Terminal Connection in Current View Creates a new terminal connection in the current view New Terminal View Creates a new terminal view that will be stacked in the tabbed notebook at the rightmost position Remove Terminal Removes the currently selected Terminal Connection from the view Only available when multiple connections have been defined in the view 250 RTLAB UG 104 00 Terminal View 514 Compilation ED Display Sh matlab View aa QNX201 2 m elnet 192 168 0 201 23 CONNECTED y Ea E E E login root Tue Jan 19 06 34 53 2010 on dev ttyp4 Last login Tue Jan 19 06 33 37 2010 on dev ttyp4 edit the file profile if you vant to change your environment To start the Photon windowing environment type ph Figure 58 Command Input Field Contextual Menu To open the contextual menu right click on the output of the Terminal View ard Compilation Display 4 Matlab View elnet 192 168 0 201 23 CONNECTED y fa D X E gt X p4 on dev ttyp4 edit the fi o change your environment To start th See nment type ph Select All ds Toggle Command Input Field Figure 59 Contextual Menu MENU ITEM DESCRIPTION Copy Allows to copy selected text from the view Paste Allows to paste text into the view Clear Terminal Clears the text in the terminal view Select All Selects all the text in the terminal view Toggle Command Input Enables disables the
352. onsole Figure 36 Python menu or the corresponding menu Tools gt Python gt Open Console A dialog is displayed that allows you to choose among available console types Unable to create Python console Unable to create console For Jython interpreter not configured Iron Python interpreter not configured Unable to create console for Iro Figure 37 Python Console dialog Repeat these operations to open several Consoles in the same View These Consoles may be of different types Use the toolbar to switch between opened Consoles RTLAB UG 104 00 219 Interactive Python Console Once started the Interactive Python Console is able to launch Python scripts and to execute Python commands This is particularly useful when working with RT Lab projects since RT Lab provides a complete Python module This module named RtlabApi allows you to control any part of a simulator from configuration to execution All available functions are described in the Python API Reference Guide In order to use this module it is necessary to import it with the following command gt gt gt import Rtlabipi However by default when opening an Interactive Python Console some modules are automatically imported including the RT Lab API The RT Lab API is also given the alias r Use the PyDev preference page to edit these initial commands see Configuration Using the RT Lab API through the Interactive Python Console is a good way
353. or and go to the Files Page This page allows the user to specify what files will be uploaded to the target and what files will be retrieved from the target RTLAB UG 104 00 515 516 Building the asynchronous application gt AsyncIP_sl mdl 23 0 Files Properties Files Properties Set the file properties of your model Enable file retrieval on model reset 4 Build intermediate tree on file retrieval File retrieval root directory Ed Name Mode Step Subsystems h ll V synciP_source syncIPUtils h ascii Before compilation All a dd synclP_sourcel syncIP mk ascii Before compilation All AsyncIP binary After compilation all ic ade AsyncIP_sourcelAsyncIP c ascii Before compilation All Delete Al Overview Development Execution Variables Files Assignation Diagnostic Hardware Simulation Tools Figure 18 Specifying file tranfer at compilation time File names may be full qualified i e path filename or may be relative to the model folder As explained in the previous section the library libOpalAsyncApiCore a may need to be added to this list if it is not added to the build process in a Matlab callback of the controller block The path to this library is replace RTLAB ROOT by the actual path to the RT LAB root folder RTLAB_ROOT common lib qnx6 libOpalAsyncApiCore a when compiling for QNX6 targets or RTLAB_ROOT common lib redhawk libOpalAsyncApiCore a for Red Hat targets Thi
354. or example its target has crashed you can right click on this project and select Clean Project infos as shown below RTLAB UG 104 00 175 Project Explorer Ja Targets LI RT Demo Active amp not responding New gt Add gt Copy 3 Delete Ka Import 14 Export Open Project 36 Clean Project infos Simulation gt Team gt Compare With gt Restore from Local History Colorer HTMLGenerator gt Pydev gt Properties Alt Enter This will reset the state of unreachable models and will allow the project to be opened again 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 vop Top Level Elements Select Working Set Deselect Working Set Edit Active Working Set Show Decorations Model platform lt Package Presentation Assignations lt Re Problem i Customize View eine Y Problem messages Link with Editor T Others a y Figure 11 View menu Show Decorations Model platform 176 RTLAB UG 104 00 Adds an overlay icon to Models to show their current platform rtdemol rtdemo2 rtdemo
355. or literals 1 Search In Any Element Scope Workspace O working set Limit To v oO Case sensitive Regular expression riable All Occurrences 2 Customize Figure 103 RT LAB Search Tab The RT LAB searching support allows you to quickly find signals parameters and more RT LAB objects Containing text In this field type the expression for which you wish to search using the wildcard characters listed below the field This field is initialized based on the current selection Depending on what is searched the search string should describe the element e Name the object name Examples Signall Error rtdemo e Path the object path Examples rtdemo2 sm_controller Actuator response time DelayTime rtdemo2 sm_controller Sum3 port1 rtdemo2 sm_controller Integrator1 InitialCondition e Alias the object alias Examples sensor humidity level e Unit the unit of a signal or a parameter Examples N RTLAB UG 104 00 359 RT LAB Search km L e Description the object description Examples Project X motor machine e Any Element Any element between name path alias unit and description From the drop down menu you can choose to repeat or modify a recent search Select the Case sensitive field to force a case aware search Case sensitive is enabled when a custom search string is entered Select Regular Expression to use the text search patterns
356. or was the last active editor If there is an active view it will be the editor that the active view is currently working with e Drag and dock the editor somewhere else in the editor area noting the behavior that results from docking on each kind of drop cursor Continue to experiment with docking and resizing editors and views until the Workbench has been arranged to satisfaction The figure below illustrates the layout if one editor is dragged and dropped below another File Edit Navigate Search Simulation Tools Window Help i pr E a N X 2 IX lg Project Explorer 22 GE filer txt ES B file2 txt S3 E E gt ISA 1 This is sample text file 1 This is sample text file There is not much else There is not much else ve can really say about it ve can really say about it than it has five lines of than it has five lines of text that are rather dull text that are rather dull Targets ow MyTarget202 e MyProject E Models tS File system B filet txt H E help lt gt lt gt gt models E Python264 Y produitsidevirt labibu Display 3 E Properties lab Compilation A matlab View Progress E console O Be Sy ren No selection writable Insert RTLAB UG 104 00 87 88 Tiling editors RTLAB UG 104 00 Maximizing and minimizing elements of the workbench presentation Maximizing and minimizing elements of the workbench presentation RT LAB presentation provides a rich envir
357. ormed when the snapshot was taken Initialize and register your structure in the mdlInitializeCondition function Initialize your data LocalData data Data LocalData malloc sizeof LocalData Register your data pointer to RT LAB OpalSnapshotRegister void data sizeof LocalData ssGetPath S First argument void pointer to the memory block to copy Second argument size in bytes of the memory block to copy Third argument path of the S function available from the ssGetPath macro Free your data structure in mdiTerminate function if data NULL free data Before compiling your s function as a shared library mexw32 file add the model_main h include path to your compilation command Example cc I lt RT LAB directory gt common include_ target RTLAB UG 104 00 Working with perspectives Working with perspectives Perspectives define the initial set and layout of views in the Workbench window They provide a set of functionality aimed at accomplishing a specific type of task or working with specific types of resources See the Related tasks links for more details Related concepts Perspectives Views Fast views Detached views RTLAB UG 104 00 537 Working with perspectives 538 RTLAB UG 104 00 Switching between perspectives Switching between perspectives Open perspectives are represented by icons on the perspective bar When you have more than one perspect
358. oses all other projects that are not related to this project RT LAB Project Active Here are the 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 infos Available when the project is in Active amp 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 will allow the project to be opened again Simulation Provides access to simulation commands such as Load Execute Reset See Simulation menu These commands will be 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 informations about this RT LAB project Project Here are the 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 infos Available when the project is in Active amp 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 will allow the project to be opened again Model Folder 184 Here are the menu entries for Model Folder resources New RTLAB UG 104 00 Project Explorer Opens the New RT LA
359. ou to reset the model e Otherwise if no project is connected to this embedded simulation it will prompt you to reboot the target Alternatively embedded simulations can be disabled using the Telnet Terminal View and shell commands e Select the target that display embedded simulation in the Project Explorer view e Click the item Tools gt Telnet to open the Telnet Terminal View e Login as root user and enter the following command gt gt rm f usr opalrt local OpalStartup Installing Embedded Target Previous versions of RT LAB 8 4 x and lower require the installation of a special archive file named rt lab_e tgz on the target to support embedded simulations This step is now automatically performed during the general target installation of RT LAB so no extra step is required Moreover the embedded mode is now available for both QNX and RedHat platforms Known Limitations Embedded simulation has the following limitations e Only one model per project can be embedded on a target e Only one model per target can run in embedded mode e Embedded simulation is limited to models that have only one real time subsystem SM Master This means that models that contain multiple subsystems could not be embedded on a target e Users that did not start an embedded simulation need to share or have a copy of the original project to connect to the embedded simulation e Embedded mode is not supported on RT LAB 10 0 and 10 1
360. p size of the model every 1 000 000 steps with a precision of 1 us Value 100 prints the model s step size every 10 000 steps with a precision of 100 us and so on Warning This option may disturb the real time simulation performances Debugging Properties Debugging Properties Set the debugging properties of the model C Enable extended timeout Enable watchdog Watchdog timeout ms 5000 C Compile model in debug Enable extended timeout All timeouts are extended when this option is enabled It is typically used when debugging the model Enable watchdog Enables or disables the Watchdog functionality The Watchdog ensures that all nodes are running normally There are as many watchdogs as there as computation subsystems in the model At regular user defined time intervals the watchdog verifies that the model is still running and that processes are still active If an error occurs the watchdog stops the simulation This option is not available on Windows target Enables or disables the Watchdog functionality The Watchdog ensures that all nodes are running normally There are as many watchdogs as there as computation subsystems in the model At regular user defined time intervals the watchdog verifies that the model is still running and that processes are still active If an error occurs the watchdog stops the simulation This option is not available on Windows target Watchdog timeout ms The regular user defined t
361. p space in your Workbench window To create a fast view e Click the title bar of the view that you want Hold the mouse button down e Drag the view to the Fast View bar and release the mouse button By default the shortcut bar is located in the lower left corner of the window Alternatively you can click on the button located on the left side of the Fast View bar which will present you with a selection of views Choosing one of these views will add it to the Fast View bar immediately The icon for the view that you dragged now appears on the shortcut bar You can look at the view by clicking its icon on the shortcut bar As soon as you click somewhere else outside the view it is hidden again To restore the view to its original location and remove it from the Fast View bar toggle the fast view item in the view button s context menu You can also create and restore fast views by selecting Fast View from the context menu that opens when you click the icon at the left side of the view s title bar Related concepts Views Fast views Perspectives RTLAB UG 104 00 563 Creating fast views 564 RTLAB UG 104 00 Working with fast views Working with fast views If you have converted the Project Explorer to a fast view it will appear in the shortcut bar as shown below Project Explorer To work with a fast view proceed as follows e In the shortcut bar click on the Project Explorer fast view button e Observe the Project
362. play the output of the selected variable New 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 Auto Apply Apply changes immediately 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 Apply Changes Provides edition for provisory changes to the selected variable of the Variable Viewer When in non auto apply modes changes are not taken into account Values are displayed with a star above The changes made can be accepted or rejected Discard Changes When in non auto apply mode changes are not taken into account immediately Edited changes can be discarded with the discard button Moving and docking views Related reference Project Explorer RTLAB UG 104 00 201 Variable Viewer 202 RTLAB UG 104 00 Properties View Properties View The properties view displays property names and values for a selected item from the Project Exporer The available properties are different depending 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 va
363. pplicable to built in perspectives that have been overwritten using Window gt Save Perspective As Delete Deletes the selected perspective This option is only applicable to user defined perspectives built in perspectives can not be deleted RTLAB UG 104 00 435 Perspectives preference page 436 RTLAB UG 104 00 Quick Diff preference page Quick Diff preference page The following preferences can be changed on the General gt Editors gt Text Editors gt Quick Diff preference page Enable quick diff This option will enable or disable the quick diff option Show differences in overview ruler This option will show differences in the overview ruler Colors Changes This option controls the color of changes Colors Additions This option controls the color of additions Colors Deletions This option controls the color of deletions Use this reference source This option sets which reference to use as the base for generating quick diff comparisons Options are e Version on Disk Current file is compared against the last saved version on disk RTLAB UG 104 00 437 Quick Diff preference page 438 RTLAB UG 104 00 Search preference page Search preference page The General gt Search preference page allows you to set preferences for searches Reuse editors to show matches This option allows you to keep using the same editor for search results to reduce the number of open editors Bring Search view to front
364. quisition parameters This function enables each user to select just the acquisition group s for which they would like to control parameters users who subsequently connect to the same model can select among the remaining acquisition groups Modifications Apply Used to validate modifications to panel parameters Modifications Apply to all Applies modifications to all acquisition groups Modifications Cancel Enables you to cancel the modifications to panel parameters Default Sets all acquisition control parameters to their default values RTLAB UG 104 00 237 Probe Control Panel Note Please note that the Number of Samples per Signal and Duration are set by default to values that allow simulations at 200 ms or 5Hz More information Opens the group infos panel where you can find additional information on about the acquisition group Signals Opens the dynamic signals panel to enable you to add signals to an acquisition group Close Closes the ProbeControl panel If one of the parameters on the panel is modified without being validated with the Apply button closing the panel does not validate the modification made to that parameter Group Control panel For a model with more than one acquisition group the GroupControl Panel is displayed when the ProbeControl panel is opened To open the probeControl panel select the model and assure you that it is built Then open the panel from the Tools gt Probe Control menu The
365. r The toolbar in the Search View contains the following buttons ICON DESCRIPTION Y Show Next Match This command highlights the next match of the search expression in the search view Show Previous Match This command highlights the previous match of the search expression in the search view x Remove Selected Matches Removes all highlighted matches from the search results He Remove All Matches Removes all search results from the search view Collapse all Collapses every tree item in the search view gt Run the Current Search Again This command runs the current search again so that removed search results reappear or changes are reflected Cancel Current Search Cancels the current search Ep Show Previous Searches This command allows you to browse previously conducted searches and repeat a previous search You can select a previous search from the drop down menu or clear the search history e Pin the Search view Pinning the search view means that subsequent searches will show their results in another search view and that the pinned view remains unchanged Related concepts Views Perspectives Toolbars Related tasks Debugging Opening views Moving and docking views Related reference RT LAB Search File Search RTLAB UG 104 00 261 Search View 262 RTLAB UG 104 00 Bookmarks view The Bookmarks view displays user defined bookmarks To add the Bookmarks view to the current perspective click Window gt Sho
366. r SystemBuild s It is expected that you have a clear understanding of Simulink s or SystemBuild s operation particularly regarding model definition and the model s various simulation parameters If you intend to create your own blocks to interact with RT LAB you should know how to create Simulink or SystemBuild icons S functions and UCBs for both the command station and target environments Warning SystemBuild models must be saved in ASCII mode 1 4 Organization of this Guide There are several guides offered in the list of RT LAB documentation e Installation Guide e API reference Guide e User Guide This document is the user guide The topics covered are e Introduction on page 9 Provides an introduction to simulation and the principles behind RT LAB e Getting Started on page 15 Presents tutorials on the RT LAB workbench and RT LAB simulator e Concepts on page 117 Provides a complete description of all concepts of RT LAB as views or editors related to the workbench and the simulator e Tasks on page 457 Describes how to realize tasks as building or executing a model using the RT LAB workbench 1 5 Conventions Opal RT guides use the following conventions Table 1 General and Typographical Conventions THIS CONVENTION INDICATES Bold User interface elements text that must be typed exactly as shown Note Emphasizes or supplements parts of the text You can disregard the information in
367. r a new model come from the RT LAB Preference pages If a property is changed from the RT LAB preference pages each new model created will inherit from these properties After that if you change a model property only the edited model will be affected Monitoring Properties 152 Monitoring Properties Set the monitoring properties of the model v Enable monitoring Display Monitoring Never v Target display information Moderate Advanced Message precision factors us 0 Enable monitoring Enables or disables the monitoring during the execution of the model Display Monitoring Specifies when Monitoring results is to be displayed in the Display View NEVER AT_PAUSE AT_RESET or BOTH Target display information Represents the amount of information that is displayed in the display window during load and execution Setting the value from MINIMAL to EXHAUSTIVE allows the user to RTLAB UG 104 00 Hardware Page retrieve more information about communication and I Os initialization for example This can be used to debug unexpected model behaviors Note Please note that Exhaustive mode must only be used used for debug purposes as it can influence the real time performances Message precision factor us 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 Value 1 prints the ste
368. r interacting with these Opal RT boards during the real time simulation RT LAB examples models for real time simulations integrating Opal RT boards supported by RT XSG can be found under the lt RT LAB_ROOT gt Examples IO Opal RT folder These examples are thus CPU models i e models that run on the CPU of the target machine to which the board is connected The structure of these models is described in the following sections The OP5130 XSG subdirectory for example contains one basic example model that performs data exchange with an OP5130 board programmed with a bitstream generated with RT XSG The generated bitstream is provided with this example model and is loaded into the FPGA of the OP5130 at model load time However if the user wants to modify the logic implemented in this bitstream he must use the RT XSG product edit the basic Simulink XSG example model for this board provided in the RT XSG folder regenerate the bitstream and then copy it to the RT LAB example model folder Requirements The section in Chapter 3 gives the compatibility matrix of RT LAB and RT XSG products Preparing CPU models It is assumed that the reader is familiar with the Xilinx System Generator as presented in Xilinx SysGen user guide In the following the discussion focuses on the use of the Opal RT OP5130 board although the process of preparing models for other supported boards will be similar When designing and XSG based RT LAB application two Si
369. r views in a tabbed notebook Complation 2 A S B e toy 0 To activate a view that is part of a tabbed notebook simply click its tab ED Display El E ES e E Views have two menus The first which is accessed by right clicking on the view s tab allows the view to be manipulated in much the same manner as the menu associated with the Workbench window lord Compi me Display a amp ES Ea Ey Y a Fast View Detached Size Minimize Maximize Close The second menu called the view pull down menu is accessed by clicking the down arrow The view pull down menu typically contains operations that apply to the entire contents of the view but not to a specific item shown in the view Operations for sorting and filtering are commonly found in the view pull down RTLAB UG 104 00 25 26 Views nd Compilation 22 Display Ba amp A a Word wrap v Auto scrolling A view can be displayed by selecting it from the Window gt Show View menu A perspective determines which views may be required and displays these on the Show View sub menu Additional views are available by choosing Other at the bottom of the Show View sub menu This is just one of the many features that provide for the creation of a custom work environment File Edit Simulation Tools BUT Tr En N E Gh E 3 e Open Perspective Fa rie er i conpaten Eb Customize Perspective E Console E de Targets Save P
370. ration This script is called on the target during the compilation before compiling the model This script is called on the command station at the end of the compilation This script is called on the command station during the execution before loading the model This script is called on the target during the execution before executing the model This script is called on the target during the execution after resetting the model This script is called on the command station during the execution after resetting the model host_preseparate py host_postgenerate py target_precompile py host_postcompile py host_preload py target_preload py target_postreset py host_postreset py This script could be used to do some analysis after the model execution Using local user scripts In order to execute a local user script only for this model just create the corresponding file to the step you want to customize in the model s directory on the command station The file will be automatically transferred on target if required and executed Many user scripts for different steps could be created In order to disable a script rename the file to a different name Using global user scripts In order to share a script among models on the command station or target s the same python scripts are located under RTLAB_ROOT common python rtlab global Modify these files in order to create a global executi
371. rch Previous Match ee j expression in the search view RTLAB UG 104 00 Copy Remove Selected Matches Remove All Matches Assign Working Set Search Again Properties Copies the text of the selected match to the clipboard Removes all highlighted matches from the search results Removes all search results from the search view This command is used to assign the selected object to an existing or a new Working Set This command reruns the current search again so that removed search results reappear or changes are reflected Opens the Property View for the selected object 259 Search View File Search results Text searches will only search for expressions in file specified in the File Search dialog This example shows results for the search it The title of the Search view shows that four matches were found Search 3 m So x BE ACA it 4 matches in workspace Ext s MyProject E ES file2 txt 2 matches 3 we can really say about it other gt 4 than it has five lines of E file1 txt 2 matches gt 3 we can really say about it other gt 4 than it has five lines of Figure 65 File Search result Within the Search view two files are shown and within each file there were 4 matches found e Click the Show Next Match button to navigate to the first match of the search expression it Notice that the file file1 txt is automatically selected and opened in the editor area Cl
372. rching support provides a preference for controlling the color used to display potential matches see the Foreground color for potential matches item on the General gt Search preference page In general the Workbench uses the colors that are chosen by the operating system To change these colors you can use the configuration tools provided by the system for example the Display Properties control panel on Windows 590 RTLAB UG 104 00 Changing the placement of the tabs Changing the placement of the tabs You can change the placement of the tabs The tabs for stacked views or editors can appear at the top or bottom of the area which contains them e Open the General gt Appearance preference page e Select from the choices displayed in the Editor tab positions group or View tab positions group to control whether you want the tabs at the top or the bottom e Click Apply or OK e The tabs will immediately move to their new locations Related concepts Views Editors RTLAB UG 104 00 591 Changing the placement of the tabs 592 RTLAB UG 104 00 Legal Some content of the present documentation is part of the official Eclipse documentation This content is distributed under the Eclipse Public License available at http www eclipse org legal epl v10 html All other content that is related to RT LAB or to other OPAL RT Software is distributed under OPAL RT copyright 2007 Opal RT Technologies Inc All rights reserved for
373. re are workflows where it would make sense to focus on a view as well The default presentation implements the maximize behavior by minimizing all stacks except the one being maximized This allows the maximized stack to completely occupy the main presentation while still allowing access any open views in your perspective by using the icons in their Trim Stack the area around the edges of the window is called the trim The behavior for managing the editor maximization operate on the complete Editor Area rather than simply maximizing the particular Editor Stack This allows for compare workflows which require the ability to see both files in a split editor area at the same time Minimize Another way to optimize the use of the screen area is to directly minimize stacks that are of no current interest The default presentation minimizing a stack will cause it to be moved into the trim area at the edges of the workbench window creating a Trim Stack View Stacks get minimized into a trim representation that contains the icons for each view in the stack This view stack 514 Compilation 3 ET Properties Display 4 Matlab View Progress El Console gt El gt als ETA No selection becomes this Trim Stack when minimized RTLAB UG 104 00 575 576 Maximizing and minimizing elements of the workbench presentation s HET ME The minimize behavior for the Editor Area is somewhat different minimizin
374. re saved in MATFILE version 4 using the name supplied in the FileName field Before write to file is enabled for the first time the FileName and Variable Name fields are empty The FileName and Variable Name fields may contain valid names even if the group is not set to write to file This is because this panel uses the filename set for the group from the ProbeControl panel Disabling the write to file option from the ProbeControl panel does not clear these fields As more than one subsystem may be running on the same target node RT LAB adds the group number the subsystem name and the subsystem id to the filename specified by the user on the Probe Control panel This is a simple way to avoid file name collisions on target FileName Name of the file in which acquisition signals are to be saved when the Write to file option is checked Variable Name Name of the variable to be associated with the signals saved in FileName Repetitive sampling Enables you to choose repetitive automated sampling or non repetitive manual control sampling If you choose non repetitive the Re arm button enables you to manually re arm data acquisition Rearming delay This is the acquisition delay between the end of one frame and the beginning of the next This parameter is used only for repetitive sampling RTLAB UG 104 00 236 Probe Control Panel Decimation factor Lets you skip acquisition during some calculation steps When this parameter is set
375. rectories Create hierarchy folder structure in the file system only for selected folders Preferences 336 Export preferences to the local file system Export All Export all of the preferences in this session Choose specific preferences to export Select preferences from this session to export like CVS repository preferences Select All Select all of the available preferences Deselect All Clear all of the available preferences To preference file A file on the file system to store the preferences Type the file select a previous export file from the drop down list or Browse to select a file Overwrite existing files without warning Overwrite a pre existing file RTLAB UG 104 00 Flash bitstream wizard Flash bitstream wizard The Select a bitstream wizard allows to flash an I O board with any compatible bitstream This wizard is available from the Target context menu Execute gt Flash bitstream this menu is not available for Windows Targets Here is what the wizard looks like Selecta bitstream Select board type lt Select a type gt Force flash operation Bitstream file select from workspace O Select from disk O Select from target Log result to a file Please choose a bitstream file Figure 92 Flash bitstream wizard overview Follow these steps to flash a board e Select the board type For example OP5142 or TestDrive SP
376. rforms 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 Number of steps without overruns Prevents RT LAB to detect overruns during the first steps of simulation Environment Variables Page This page gives a list of environment variables defined for the edited model User environment variables are used to enable some settings for the simulation without having to recompile the model Most of these settings are used to debug models or as workarounds for specific target situations The default property values for a new model come from the RT LAB Preference pages If a property is changed from the RT LAB preference pages each new model created will inherit from these properties After that if you change a model property only the edited model will be affected 144 RTLAB UG 104 00 Environment Variables Page Environment Yariables Set the environment variables of your model Name Value Description ARTEMIS VERSION v5 1 2 Name Name of the user variable Value Value of the user variable Description Description of the user variable Add a new user variable Environment Variable Properties Name MyUserYariable Value 1 Description To add a new user variable 1 Click on the Add button 2 Fill the Name
377. ributes its computation among the target nodes and provides an interface so you can execute the simulation and manipulate the model s parameters The result is high performance simulation that can run in parallel and in real time RTLAB UG 104 00 1 6 6 Using the Console as a Graphic Interface You can interact with RT LAB during a simulation by using the console a command terminal operating on the command station Communication between the console and the target nodes is performed through a TCP IP connection This enables you to save any signal from the model for viewing or for offline analysis It is also possible to use the console to modify the model s parameters while the simulation is running 1 6 7 Working with RT LAB RT LAB software runs on a hardware configuration consisting of the following components e Command station e Compilation node e Target nodes e I O boards RT LAB software is configured on a Windows XP Vista 7 or Red Hat linux computer called the command station The Command Station is a PC workstation that serves as your interface The Command Station enables you to e edit and modify models e see model data e run the original model under its simulation software Simulink SystemBuild etc e distribute code e control the simulator s Go Stop sequences Simulations can be run entirely on the command station computer but they are typically run on one or more target nodes For real time simulation the
378. roject 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 An RT LAB project can contain any of the resources described below Models Models are the main components of a 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 e The model file which is developed with external tools such as Matlab Simulink MatrixX SystemBuild or EMTP RT It is stored on the file system e The Model object or simply Model which is an interface to the model file in the RT LAB simulator It 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 the Project Explorer as shown in Figure 20 Adding this file to an RT LAB project will create a new Model object which will allow 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 fr
379. rol once again Trig signal name Sets the name of the signal to be triggered Trig by value Specifies the value that must be reached by the trigger signal to trigger acquisition Trig by signal Specifies a triggering signal instead of a constant value Offset If this parameter is a positive value it is used to set the number of steps cycles to wait before starting the acquisition system once the trigger condition is met The default value is 0 which means start as soon as the trigger condition is met The trigger offset can also be a negative value n In this Case the n samples which correspond to the simulation results of the n steps before the trigger condition happened will be acquired up to the number of samples per signals The range value for the offset is FrameSize FrameSize See Number of samples per signal and Duration definitions hereafter for the definition of the frame length Condition Condition to be satisfied so that the acquisition system is triggered The different types of condition are e Rising or falling edge e Rising edge the threshold is crossed on a positive slope that is from below e Falling edge the threshold is crossed on a negative slope that is from above e Trigger signal gt trigger level e Trigger signal lt trigger level Write to file Saves acquisition group signals on the target node s hard drive rather than sending them to the Windows NT Console on the host computer Signals a
380. rror between some user defined set point SP and some measured process variable PV Each element of the PID controller refers to a particular action taken on the error Proportional Error multiplied by a gain Kp This is an adjustable amplifier In many systems Kp is responsible for process stability too low and the PV can drift away too high and the PV can oscillate Integral The integral of error multiplied by a gain Ki In many systems Ki is responsible for driving error to zero but to set Ki too This section describes general information about the edited model Name is the name of the edited model Path is the path where the model is located on the file system State is the current state of your model See OP_MODEL_ STATE Description is the description of the model Note If the model is not loadable an error is displayed in the State field State Not loadable lt Not compiled for Redhat gt Figure 1 State not loadable Preparing and compiling Preparing and Compiling To prepare and compile the model gt Edit the diagram of the model E Setthe development properties lard Compile the model m Consult result in the Compilation View Bk Check errors in the Problem View Assign targets to subsystems This section provides some shortcuts relative to the preparation and to the compilation of the edited model Edit the diagram model Opens the model with the current Matlab version Set development prop
381. rspective bar Specify whether labels should be shown in the perspective bar as well as icons Enabled Show traditional style tabs Specify whether traditional square tabs should be used in place of the curved tabs Disabled Enable animations Enable disable the feature where views animate to their location when closed or opened Enabled RTLAB UG 104 00 407 Appearance preference page 408 RTLAB UG 104 00 Colors and Fonts preference page Colors and Fonts preference page Many of the fonts and colors and used by RT LAB components can be set using the General gt Appearance gt Colors and Fonts preference page A tree is used to navigate among and show a short preview of the various colors and fonts The current face but not size of any font is previewed in its label Colors are previewed in the icon associated with its label Additionally some categories Workbench in particular provide a more detailed preview of their contributions This preview is shown below the description area if available Font settings can be changed either by selecting the font from the list and clicking Use System Font to choose the Operating System font setting or by clicking Change to open up a font selection dialog Reset can be used to return to the default value Color settings can be changed by clicking color to the right of the tree area when a color is selected Reset can be used to return to the default value The Colors and Fonts text field c
382. rted 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 e Open the Model Editor and select the Assignation Page 532 RTLAB UG 104 00 Embedding Simulation e Click the Clear embedded button from the Target Utilities section e 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 e Select the target that runs the embedded simulation in the Project Explorer view e Right click on the target and select Execute gt Remove embedded mode e Ifa project is currently opened and connected to this embedded simulation the user interface will prompt y
383. s A simple Simulink model with 2 subsystems Use this template to generate a simple Simulink model containing 2 subsystems Figure 72 New Model wizard selecting a template The left part of the dialog is a template explorer The right part of the dialog contains the description of the currently selected template Click on the lt Finish gt button to create a new model from the selected template This model will be automatically added to the project specified on the main page Note that modifying the newly created model will not affect the template itself 310 RTLAB UG 104 00 Import wizard Import wizard This wizard helps you import resources into the Workbench When the Import wizard first comes up you must choose what type of import to do To assist in locating a particular wizard the text field can be used to show only the wizards that match the entered text Archive File If you choose this option you will import files from an archive file Archive File The file from which to import Type in the full path or Browse to select the path on the file system Filter Types Dialog to select which file types to import Use this to restrict the import to only certain file types Select All Check off all resources for import Deselect All Uncheck all resources Folder The folder into which the resources will be imported Type the path or Browse to select a path in the Workbench The folder holding the sel
384. s this new structure should have no impact on the use of RT Lab Only users who have created their own libraries from S Function will need to build their libraries with a new compilation flag Changes Resulting from the Replacement of SimStruct with the rtModel The implications resulting from the use of this new structure will apply only to users of Simulink S Function Using Simulink Sfunction consists of three parts e User of Sfunction built with RT LAB model No modification required e User of external Sfunction included in external library these users need to compile their library with a new compilation flag In order to compile the Sfunction source code for Rtmodel support the user must also prepare its associated makefile It is assumed here that the reader is familiar with setting up C makefiles A new compilation flag USE_RTMODEL should be added to support rtmodel data structure RTLAB UG 104 00 519 Changes Resulting from the Replacement of SimStruct with the rtModel 520 RTLAB UG 104 00 RT LAB Xilinx System Generator toolbox integration RT LAB Xilinx System Generator toolbox integration Starting with RT LAB v8 3 the integration between the Xilinx System generator toolbox and RT LAB requires the use of the new Opal RT RT XSG product RT XSG provides all files required for preparing Simulink models that can be built into FPGA bitstreams for the Opal RT products RT LAB only contains the files and drivers needed fo
385. s action e Click and drag the view s title bar outside the Workbench window Notice that it becomes a Detached window hosted in its own shell e Drag the Project Explorer view over the Compilation view A stack cursor will be displayed If the mouse button is released the Project Explorer will be stacked with the Compilation view into a tabbed notebook Please note that you must grab the view tab NOT the window title This is used only for repositoning the window containing the detached view e Finally drag the view to its original location RTLAB UG 104 00 83 84 Rearranging views RTLAB UG 104 00 Rearranging tabbed views Rearranging tabbed views In addition to dragging and dropping views on the Workbench the order of views can also be rearranged within a tabbed notebook e Choose Window gt Reset Perspective to reset the RT LAB Edition perspective back to its original layout e Click on the Compilation View title bar and drag it on top of the Project Explorer view The Compilation View will now be stacked on top of the Project Explorer view e Click the tab of the Project Explorer view and drag it to the right of the Compilation View tab Project Expl 52 lor Compilation e Once the cursor is to the right of the Compilation tab and the cursor is a stack cursor release the mouse button Observe the Project Explorer tab is now to the right of the Compilation View tab 516 Compilation Proje
386. s and editors 79 Drop EUFSOFS iii io 2 ip ete eas a Ua cg MEE a a 81 Rearranging views 83 Rearranging tabbed views 85 DIO EOS ti a in PE a 87 Maximizing and minimizing elements of the workbench presentation89 Perspectives A A a a dol 93 New perspectives 95 Saving perspectives 97 Configuring perspectives 99 Welcome COMPARING those hia ear eu Ware ee ve le 101 Simple compare 24 444 4 ua ve ste in ee nas 103 Understanding the comparison 105 Working with comparison 107 Local history ste s N e th tt wee Hele Pa AN Le tet a 109 Responsive UT 111 Exiting the Workbench 113 se ira fat dd AE DADA Be hte rue er en RAR A a tite 115 CHAPTER 3 CONCEPTS Workbench ser rannig anra E da RA AA A A A ee ae te A A a a a tee 119 REesQUICES rie tee says a A ra 121 Resource hierarchies 4 44 4444444 123 linkedr sources gai 22 2 2 22h aan 125 Working Sets 14 22 deg time aaa nine a ea en me ee 127 Focal ISO i 2 Pascoe a A a bk she 129 Perspectives coria ada ones a Sine ALS ares ets di dou la ded a 131 EIC Ss see a aun ee dre tes Da nie Dia Dies ose 133 External editors aeaa ct Renee Sade 135 Model Editor us aug gg te 4 0 eS
387. s are stored and displayed in the Workbench in hierarchies Described below are the terms used when referring to resources that are stored and displayed in a hierarchical structure e Root The top level of the Workbench contents in the file system e Parent resource Any resource that contains another resource Only projects and folders can be parent resources e Child resource Any resource that is contained within another resource Only files and folders can be child resources Resource hierarchies are displayed in the Project Explorer view which is one of the default views in the RT LAB Edition perspective Related concepts Resources Project Explorer view RTLAB UG 104 00 123 Resource hierarchies 124 RTLAB UG 104 00 Linked resources Linked resources Linked resources are files and folders that are stored in locations in the file system outside of the project s location These special resources can be used to add files and folders to your project that for some reason must be stored in a certain place outside of your project You can even use linked resources to overlap other resources in the workspace so resources from one project can appear in another project If you do want to have overlapping resources in your workspace do so with caution Keep in mind that this means changing a resource in one place will cause simultaneous changes in the duplicate resource Deleting one duplicate resource will delete both Deletin
388. s library must be transferred in binary mode During model initialization the OpAsyncGenCtrl block will attempt to launch the Asynchronous Program For this reason the executable file of the Asynchronous Program must be found in the model directory If the execution node is different from the compilation node the executable file of the Asynchronous Program which was created in the model directory during compilation needs to be transferred back to the host computer This is done by adding this file to the list of files to be retrieved from the target after compilation This executable file must be transferred in binary mode 2 On the Development page under the Compiler option tab specify the following command in the Compiler command text box as shown in Figure 19 The compilation command is make f usr opalrt common bin opalmodelmk for QNX targets or usr bin make f usr opalrt common bin opalmodelmk for Red Hat targets RTLAB UG 104 00 Running the Asynchronous program Development settings Compiler and linker settings Customize the compiler and linker settings Target platform QNX 6 x v B Sources Includes Libraries Library Path 514 Compiler Compiler Compiler command e g makefile make f jusr opalrt common bin opalmodelmk Compiler options e g O3 Linker Linker options e g IMyLibrary Overview Development Execution Variables
389. s located on the host target Info size size in bytes of the model s 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 208 RTLAB UG 104 00 Properties View O Properties 53 1 items selected Advanced Property Value REC A name sm_computation 2 Assignation cpu Auto target m207 xhp mode false Here are the descriptions of the real time 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 QNX 6 and Red Hat Linux Assignation XHP mode If checked the subsystem will be executed in eXtreme High Performance XHP mode available only on QNX 6 and RedHat Linux Console subsystem When a console subsystem is selected in the Project Explorer view the properties view displays the console s properties Display J Properties 3 ard Compilation N Matlab View 1 items selected Advanced Property Yalue 1 General name sc_user_interface Here are the descriptions of the console properties General name Name of the console subsystem Target When a target is selected in the Project Explorer view the proper
390. s option is not available on Windows target Diagnostic monitoring enable monitoring Enables or disables the monitoring during the execution of the model Diagnostic monitoring message precision factor For advanced user only Defines the precision of the timer reporting the time required to perform one calculation step in microseconds The default value is O no printout Value 1 prints the step size of the model every 1 000 000 steps with a precision of 1 us Value 100 prints the model s step size every 10 000 steps with a precision of 100 us and so on Warning This option may disturb the real time simulation performances Diagnostic monitoring target display information Represents the amount of information that is 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 behaviors Note Please note that Exhaustive mode must only be used used for debug purposes as it can influence the real time performances Re 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
391. s property has no effect in simulation mode default value true Perform 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 default value 10 Action to perform on overruns Type of action to perform when overruns are detected default value Continue Here are the available types e Continue No action is perform Number of overruns will simply be displayed during the next pause reset of model e Reset A reset of the model is performed when the number of overruns reaches the value of the Perform action after N overruns field e Pause A pause of the model is executed when the number of overruns reaches the value of the Perform action after N overruns field Number of step without overruns Prevents RT LAB to detect overruns during the first steps of simulation default value 10 RTLAB UG 104 00 381 Performance preference page 382 RTLAB UG 104 00 Real time preference page Real time preference page Use the Window gt Preferences gt RT LAB gt Execution gt Real Time dialog page to set the real time preferences Here is what the Real Time preference page looks like Real Time ar v Here are the real time preferences Basic Default target platform Windows XP Vista _ Mi Real ti
392. s rtdemo2 v Acq Groups AcqGr 1 v Select the RT LAB tab from the dialog and then choose the project and model from which the data should be acquired Note that this model must be compiled correctly to be available in the list of models and running on the target to perform acquisition operation Also select one of the model s acquisition groups and click the Load button All signals from this acquisition group will be available in the Signal Form of ScopeView Adding Signals to the Acquisition Group 526 There are two methods to add signals to an acquisition group The usual method is based on the model s console e First add one or more OpComm block to your model s console Each console OpComm refers to one acquisition group e Open the OpComm Mask Parameters dialog e Change the Acquisiton group number This number represents the acquisition group ID All signals of this group will share the same acquisition parameters e Change the Number of inports of the block Each inport will receive one or more signals from the real time subsystem and each signal that passes through this block will be available in ScopeView e Close the OpComm Mask Parameters dialog e Wire signals from your real time subsystem to your console s OpComm blocks e To change the signal name that will be used by the acquisition right click the signal s source in the real time subsystem and select Signal Properties and type a new Signal name This na
393. s using the same Controller ID refer to this icon All parameters in this icon mask are available in the asynchronous executable by using the OpalGetAsyncCtrlParameters function BM Simulink H BA Artemis WW Control System Toolbox Y DINAMO Ser DpAsyncRecv RM RT EVENTS Bal RT LAB Op syncSend Communication 2H Asynchronous OHCI 2H SharedMemory gt DataLogging 2 Miscellaneous Monitoring H Orchestra H El RT LAB FPGA RT LAB I O RTE Drive BH Real Time Workshop E Signal Processing Blockset BA SimPowerSystems M Simulink Control Design BA Simulink Extras E Stateflow BH System Identification Toolbox WE Xilinx Blockset Xilinx Reference Blockset Xilinx XtremeDSP Kit Ml xPc OPAL RT 1 0 Ready Figure 16 RT LAB Asynchronous Program library in Simulink browser This library consists in three blocks OpAsyncGenCtrl OpAsyncRecv and OpAsyncSend We will describe their main functionalities here Their full description can be found in the Block library section of the RT LAB documentation e OpAsyncGenCtrl In order to interface the RT LAB model with an Asynchronous Program running on the target computer at least one OpAsyncGenCtrl block must be placed in the model The OpAsyncGenCtrl block is used to define the configuration settings of the Asynchronous Program created by the user This block controls the launch of one specific instance of the Asynchronous Program to b
394. s very resource demanding the command station may probably not be able to receive and display all of the data so there is a need to be selective with respect to incoming data Often data is read only every 2 3 or even 5 calculation steps this lightens the load imposed on the Console To accelerate the transmission process target nodes send batches of data to the network rather than sending one batch per data item The target node contains a buffer where it gathers data from many signals for transmission to the Console The target node dispatches its data only when this buffer reaches the level specified in the Probe Control panel A frame is composed of all of the data that represents a specific signal inside the buffer For example if you have three signals and want the data transmitted at every 5000th value the buffer contains 15 000 samples or three frames of 5000 values each Because the command station takes a certain amount of time to receive and display the acquired values and because the real time model is calculated in continuous mode it is possible that the next data frame received may not immediately follow the currently displayed frame in other words there may be holes in the data display The following figures illustrate this point 478 RTLAB UG 104 00 Understanding Data Reception Frame 1 Frame 2 Time required for display Figure 8 Expected Signal in Data Display As the time required to display Frame 1 is
395. se with same unchanged model path Unchecking the Show all resolved button will filter all items that are solved When all structural differences are solved click the Next button to view compare and edit the values loaded from the file Viewing Comparing and Editing Values The last wizard page allows you to view compare and edit value loaded from the file gt Load Parameters File Load Parameters File This page lets you view compare and edit the parameter values that will be sent and applied to model currently selected in the Project Explorer ts Yalue differences Parameter List Current value New value Elrtdemo1 sm_computation Actuator response ti 6 redemo1 sm_computation Sensor response tim 5 0e 3 3 4e 3 BJ redemo1 sm_computation Gain Kp Gain 20 0 24 0 Gp Select all saved values lt P Select saved value Select all current values gt Select current value The Value Differences list shows the parameter values that will be sent and applied to the model currently selected in the Project Explorer 348 RTLAB UG 104 00 Load Parameters wizard The first column shows the path of parameters in the model diagram The second column shows the current values of these parameters in the current running model The last column shows the new values that will be set This list allows you to compare the values and quickly see what will change when the file is loaded If modifications are required you can also edit the
396. sheet by clicking the close icon in the cheat sheet s toolbar The active cheat sheet saves its completion status when it is closed so that you can continue where you left off at a later time 452 RTLAB UG 104 00 MetaController MetaController The MetaController is a server required by RT LAB to interact with the RT LAB simulator This application is started when the operating system starts and runs in the background The MetaController also helps you to launch all applications related to RT LAB that interact with the simulator Note that the MetaController could be also automatically launched when the RT LAB user interface is started Icon system tray On Windows command station the MetaController is shown in the system tray located in the Windows Taskbar usually at the bottom right corner next to the clock See the following figure The system tray icon provides various useful features such as starting the RT LAB user interface When you click on it with your right mouse button a popup menu will appear with the available features RT LAB MonitoringViewer ParameterControl ProbeControl Dinamo ScopeView Display Controller s Enable Controller s Log Help Exit Sy 9 20 AM Figure 107 MetaController icon system tray Windows only Menus Here are descriptions of the MetaController menus e RT LAB Start the RT LAB Workbench Double clicking on the icon in the system tray will also start the RT LAB user int
397. sk and it lists the sequence of steps required to help you achieve that goal As you progress from one step to the next the cheat sheet will automatically launch the required tools for you If there is a manual step in the process the step will tell you to perform the task and click a button in the cheat sheet to move on to the next step Also relevant help information to guide you through a task is retrieved in a single click so that lengthy documentation searches will no longer be required Launching a cheat sheet To launch a cheat sheet from the Workbench e Select Help gt Cheat Sheets from the menu bar e The available cheat sheets are listed select one and click OK Alternatively if you know the location of a cheat sheet content file on your file system or on the web you can enter its path The cheat sheet opens as a view At any time only one cheat sheet is open and active When you launch a cheat sheet any opened cheat sheet is closed before the new one is opened The completion status of closed cheat sheet is saved The cheat sheet has a toolbar at the top right edge These icons appear in the toolbar ICON DESCRIPTION Collapses all Collapses all the expanded steps except the current step or expands steps to the last expanded state Click to toggle between these two states Select Allows you to select and open another cheat sheet The completion status of the active cheat sheet is saved Then the active cheat sheet is c
398. space you can select settings than will be transferred to the new workspace RT LAB supplies transfers for e Workspace Layout Opened views thier size and selected perspectives e Working Sets The user defined working sets RTLAB UG 104 00 583 Workspace Switching 584 RTLAB UG 104 00 Rearranging the main toolbar Rearranging the main toolbar You can rearrange sections of the main toolbar Toolbar sections are divided by a thin vertical line e Make sure the toolbar is unlocked The toolbar is unlocked if it has thick vertical bars next to the thin vertical toolbar dividers If it is locked unlock the toolbar by right clicking the toolbar and selecting the Lock the Toolbars menu item e Grab the section of the toolbar you want to rearrange by moving the mouse over the thick vertical line on the left side of the desired segment The mouse cursor changes its shape to indicate that you can click to move the toolbar section e Click and hold the left mouse button to grab the toolbar section e Move the section left and right or up and down Release the mouse button to place it in the new location e To prevent accidental changes to the toolbar lock it again by right clicking the toolbar and selecting the Lock the Toolbars menu item Related concepts Toolbars RTLAB UG 104 00 585 Rearranging the main toolbar 586 RTLAB UG 104 00 Changing the key bindings Changing the key bindings The function of the keyboard can
399. spectives and buttons may appear or disappear when Capabilities preference page are enabled or disabled Toolbar icons are grayed when the corresponding commands are disallowed Commands are enabled according to e the active part of the RT LAB Workbench it means the Editor or the View that has the focus e the element that is selected in this active part e the state of this element for example a running Model cannot be loaded The following table contains a short description for each toolbar button ICON DESCRIPTION ry New Opens various wizards for resource creation g Save Saves the resource currently opened in the active editor Build Build compile a Model or manages build configurations 5 Assign Opens the Assignation page of a Model editor Q Load Loads a Model ap Execute Starts the execution of a Model 00 Pause Pause the execution of a Model Reset Stops the execution of a Model Snapshot Takes and restores a model snapshot and load and save parameters See Taking a Snapshot Load Parameters wizard and Save Parameters wizard for more help di Matlab Opens Matlab Specify the version to override the default version lo ScopeView Launches the ScopeView application to acquire and display signals from real time simulation See Using ScopeView for more information RTLAB UG 104 00 301 302 ICON L E Y gt Main Toolbar DESCRIPTION Probe Control Opens the Probe Control Panel Python Run a
400. st in the Workbench The navigation views provide a hierarchical view of resources and allows you to open them for editing Other tools may display and handle these resources differently There are three basic types of resources that exist in the Workbench e Files Comparable to files as you see them in the file system e Folders Comparable to directories on a file system In the Workbench folders are contained in projects or other folders Folders can contain files and other folders e Projects Contain folders and files Projects are used for sharing and resource organization Like folders projects map to directories in the file system When you create a project you specify a location for it in the file system A project is either open or closed When a project is closed it cannot be changed in the Workbench The resources of a closed project will not appear in the Workbench but the resources still reside on the local file system Closed projects require less memory When a project is open the structure of the project can be changed and you will see the contents Folders and files can be linked to locations in the file system outside of the project s location These special folders and files are called linked resources Related concepts Workbench Project Explorer View Resource hierarchies Linked resources RTLAB UG 104 00 121 Resources 122 RTLAB UG 104 00 Resource hierarchies Resource hierarchies Resource
401. st sm_master Constant Value porti MyProject matrixTest sm_master Constant port1 Figure 46 Unavailable variables This happens for example when the project is closed when the model is removed from the project or when the model has been recompiled and the variable does not exist anymore Then you can either remove the variables from the working set or fix the problem If a variable becomes available again the Variable Table will automatically be updated Editing values When a model is running the values of the variables are automatically updated every few seconds You can also change the value of editable variables such as parameters 230 RTLAB UG 104 00 By default the Variables Table View is in Auto apply mode This means that as soon as you change a value and hit Enter the value is sent to the model If you want to send several values at the same time so that all the variables are updated during the same calculation step toggle the Y Auto apply button Then if you modify a value and hit Enter the value will be displayed with an asterisk indicating a non applied change The new value will not be sent to the model untill you press the Apply button or you toggle the Apply button again If you press the Discard button all pending changes will be cancelled F Variables Table 23 Demo Name BJ X0 b Value signall E Value signall Path Value MyProj
402. stance Close Matlab and View This command closes the instance of Matlab and the Matlab View Related concepts Views Perspectives Toolbars Related tasks Opening views Moving and docking views Related reference RTLAB UG 104 00 213 214 Matlab View RTLAB UG 104 00 Console View Console View The Console View is a generic view that may contain different Console types A Console basically displays formatted text Some Consoles enable user input for example the Interactive Python Console By default the RT Lab Workbench includes three different Consoles e An Interactive Python Console for Python development dev Console 2 gt gt gt import sys os import os sys path append os environ RTLAB ROOT common bin Python 2 6 4 r264 75708 Oct 26 2009 08 23 19 MSC v 1500 32 bit Intel RT LAB v dev gt gt gt Figure 32 Interactive Python Console overview e A Target Console that displays output from target nodes when executing remote commands SRE mM D r 6 RT LABGTestMachine gt gt ps a PID TTY TIME CMD RT LAB TestMachine gt gt ifconfig eth Link encap Ethernet HWaddr 00 D0 68 09 12 62 inet addr 192 168 0 175 Bcast 192 168 0 255 Mask 255 255 255 0 inet6 addr fe80 2d0 68ff fe09 1a6a 64 Scope Link UP BROADCAST RUNNING MULTICAST MTU 1500 Metric i RX packets 10320305 errors 0 dropped 0 overruns 0 frame 0 TX packets 6311227 errors 0 dropped 0 overruns 0 carrier 0 collisions
403. such as PC 104 or any embedded computer As 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 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 Here are the steps to create an embedded simulation e Select the project s model you want to embed from the Project Explorer view e 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 e Open the Model Editor and select the Assignation Page e 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 Target utilities Clean a target or embed a subsystem Clean target Set as embe
404. t Name is the name of the target When you modify this name you have the option to share this name with other users 8 Changing name Do you want to share this name with other users If you answer Yes the name will be saved on the target itself and other users will see it when this target is detected by their RT LAB For more information see Naming Targets IP address is the IP address mapped to this target Change it to map the target to another machine or to change the IP address of the target RTLAB UG 104 00 157 Target Overview Page 82 Changing address Es Do you want to change the IP address of this target Click No to map this target to another machine State is the current state of the target Up or Down Operations section Note Most of these operations are not available for Windows targets 158 Operations Shutdown or Reboot this target Execute a Python script on this target ES Flash an YO board with a bitstream E Execute a custom command Clean the shared memories Clean the core dumps This section provides some shortcuts relative to the manipulaion of the edited target These operations are also available from the Target context menu of the Project Explorer Shutdown Shuts down the target A confirmation dialog is displayed first Reboot Reboots the target A dialog is displayed first to select the Operating System to be started Python script
405. t in the trim See Maximizing and minimizing elements of the workbench presentation for details 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 which 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 Related concepts Workbench Toolbars RTLAB UG 104 00 165 Fast views 166 RTLAB UG 104 00 Detached views 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
406. t module gt pydevd py 953 1 Scripti py time module lt module time built in gt 108 a I E Scripti py 22 men import time a import Rtlab pi E Console 23 Scripti py He 1 10 Running script rtdemot Scripti py BEE 1 Stack view You can see the variables in previous stacks by clicking on the stack you want to view 2 Variables view Allows you to see the globals and locals for the selected stack 3 Breakpoints view Selecting this tab allows you to see the breakpoints available and enable disable any breakpoint 4 Editor Shows the code and highlights the line that is about to be executed 5 Console Shows the output of the Python script macro Now the basic things you can do in the debugger have some keybindings e Step in F5 e Step over F6 e Step out F7 e Resume F8 RTLAB UG 104 00 495 Using Python Script and the Macro Recorder 496 RTLAB UG 104 00 Using RT LAB Blocks Using RT LAB Blocks RT LAB comes with a library of blocks that can be added to your model These blocks enable you to access various types of I O modules and other functions I O and synchronization module blocks serve to control external equipment generic RT LAB blocks provide other network communication and timing functions This chapter discusses the need use and parameters of the 1 0 blocks synchronization blocks and other generic blocks that can be used wi
407. t of perspectives select Other from the drop down menu e Select the perspective that you want to open When the perspective opens the title bar of the window it is in changes to display the name of the perspective In addition an icon is added to the shortcut bar allowing you to quickly switch back to that perspective from other perspectives in the same window By default a perspective will open in the same window If you would rather it opened in a new window change the setting in the General gt Perspectives preference page Related concepts Perspectives RTLAB UG 104 00 543 Opening perspectives 544 RTLAB UG 104 00 Changing where perspectives open Changing where perspectives open You can change the default behavior for how perspectives are opened in the Workbench e Open the General gt Perspectives preference page e Select either In the same window or In a new window from the Open a new perspective group e Click OK Related concepts Perspectives RTLAB UG 104 00 545 Changing where perspectives open 546 RTLAB UG 104 00 Configuring perspectives Configuring perspectives In addition to configuring the layout of your perspective you can also control several other key aspects of a perspective These include e The options available on the File gt New submenu e The options available on the Window gt Open Perspective submenu e The options available on the Window gt Show View submenu e
408. ta throughput with very low latency increased failover performance and fault tolerance are needed For now support for this communication type is only available on Red Hat INFINIBAND This link requires INFINIBAND board on target This link should be used when a large bandwidth is required between nodes It is only available on Red Hat Linux target Two computation nodes could RTLAB UG 104 00 469 Executing steps communicate by connecting the peer to peer the two INFINIBAND board When there are more than two computation nodes in a distributed simulation an INFINIBAND switch is required to connect all the targets together Executing steps Compilation Execution 470 Select your target platform Start the compilation This an automated process so no user interaction is needed Here is the list of the steps that are done when compiling a model 1 Separation it is where the original model is separated into as many separate models as there are top level subsystems 1 Code generation for each computation subsystem SM and SS Real Time Workshop or Autocode is called to generate the C code for RT LAB using a set of specific templates specific to the target OS 1 Transfer to RTOS the newly generated C files are transferred to one of the computation nodes called the development or compilation node via the FTP protocol 1 Compilation for each computation subsystem SM and SS the compiler will compile and link the
409. te Delete Rename F2 2 Refresh FS Install gt Execute Tools 2 EB Get 1 0 infos Set as development node Diagnostic Graa Properties Alt Enter ESG Figure 55 Open Terminal view RTLAB UG 104 00 247 Terminal View Verify the terminal settings and then click OK The view title settings can be changed if more than one terminal have to be opened at the same time Terminal Settings View Settings View Title tQNx201 Connection Type Telnet Settings Host 192 168 0 201 Port telnet Timeout sec 10 Figure 56 Terminal Settings Then verify the connection status at the top left of the terminal view It should be updated to CONNECTED Ex Telnet 192 168 0 201 23 CONNECTED Login to remote target To login to a remote target you need to enter the login name and the password By default the user name for a QNX target is root and there is no password The user name for a Red Hat target is root and the password is redhat The user name for a RedHawk target is root and the password is redhawk Display or Compilation AE tRedhawk178 22 Telnet 192 168 0 178 23 CONNECTED mi Ev RedHawk Linux release 4 2 Hanoi Kernel 2 6 15 8 RedHawk 4 2 trace on an i656 login root Password Figure 57 Login with Terminal view What does the Terminal View offer The Terminal View gives the opportunity to communicate with targets to e Watch the runn
410. tem to the computation subsystem SM_ or SS_ e Acquisition signals signals sent from the computation subsystem to the console Dynamic signals list List of dynamic signals added to the current acquisition group Add Adds the selected dynamic signal in the tree to the current acquisition group Signal value Get Gets the value of the selected signal in the tree Signal value Set Sets the value of a control signal Max number of dynamic signals Maximum number of signals that could be added to the acquisition group while the simulation is running Remove Removes a signal from the dynamic signals list Remove All Removes all the signals from the dynamic signals list Save Saves the current list Load Loads a saved list Signal Selection panel The Signal Selection panel is the graphical interface to select signals while setting dynamic triggering The dynamic signals are the signals available inside the model A signal is the port s outputs of a block Signal Selection 0H sm_controller E Actuator response time Ol OpComm a 2220pComm1 E Gain a Sum3 a Gain Kp E poti E Sum ss_plant 4 Integrator3 BB nom Cancel Figure 53 Signal Selection panel 240 RTLAB UG 104 00 Monitoring View Monitoring View The Monitoring view displays CPU usage for each task probe executed during real time simulation It displays the duration of each probe and can display its start and stop time It detects overruns and
411. th RT LAB RT LAB block libraries can be found in the Simulink or SystemBuild library browser Generic blocks RT LAB comes with many blocks providing generic functionalities like data logging monitoring communication with external composants These blocks need to be inserted in the RT LAB subsystems SM SS or SC Some blocks work offline others work only when in real time simulation Refer to the online documentation in order to get a detailed description for each block Adding Blocks to Model To add blocks to your model and set their parameters 1 Open the browser and click on the RT LAB block that corresponds to the desired function 2 Drag and drop the RT LAB block into your simulation model 3 Double click the RT LAB block to change its parameters This opens a parameter control box I O blocks 1 0 cards enable you to control external equipment These cards may be digital to analog D A converters analog to digital A D converters input output I O binary ports and quadrature decoders among others Synchronization cards synchronize computation and communication between nodes RT LAB comes with a library of blocks that provide access to different types of I O card The library of modules are sorted by vendor name product name then block name The RT LAB 1 0 library can be found next to the RT LAB library in the Simulink or SystemBuild library browser Each block refers to a function provided by the I O board For e
412. th search result items Drag and drop items Drag and drop features in the editor are enabled for the model and the subsystem objects If the search found a model or subsystem select it drag it to the editor and drop it The model will opens in the editor Double click on items Double clicking on a model or a subsystem opens the editor View Edit variable from the contextual menu This option helps to see the value of the selected items by opening the Variable Viewer 58 Variable viewer 2 m 57 Els re signali 1x1 Double 57 matches in workspace 1 E 12 MyProject 1 2 0071e 12 S Models a rtdemo2 gt sc_user_interface 2 2 sm_controller 8 JU Actuator response time ET DelayTime 2 InitialOutput IT Gaint TJ Gain kd Figure 62 Variable Viewer Assign Working Set from the contextual menu e This command is used to assign the selected object to an existing or a new Working Set The next figure shows the Variables Table the plant_response signal that have been added to the Working Set 1 AS Search ariables Table 3 r3 LT orking Set WorkingSet1 Value Units Min Max T plant response rtdemo2jss_plant Integrator2 porti 2 4491e 12 Infinity Infinity ul gt Em Search C CIRE 1 Loaded 1 Shown 0 Selected Figure 63 Variable Table 258 RTLAB UG 104 00 Search View Contextual Menu for RT LAB Search To open the contextual menu right click on one of the matches
413. the Other submenu you can open any view The views are sorted into categories in the Show View dialog RTLAB UG 104 00 293 294 Customize Perspective Z Show View type filter text En EE E j Help j Pydev RT LAB lard Compilation Display Sh matlab view H Team EC Terminal 3 Terminal Other I Status e gt Eclipse Colorer oe e e a Use F2 to display the description For a selected view Each perspective includes a predefined set of actions that are accessible from the menu bar and Workbench toolbar _ gt Shortcuts Commands Customize Perspective Edition Window menu Select the shortcuts that you want to see added as cascade items to the Following submenus The selections made will only affect the current perspective Edition Submenus Shortcuts New Shortcut Categories Shortcut P RT LAB Model Description C General C Pydev RT LAB L RT LAB Project E RT LAB Target gt Save Perspective As RTLAB UG 104 00 Window menu This command allows you to save the current perspective creating your own custom perspective You can open more perspectives of this type using the Window gt Open Perspective gt Other menu item once you have saved a perspective Save Perspective As Enter or select a name to save the current perspective as Name Edition Existing Perspectives De
414. the host computer during compilation Remember that the executable must be transferred in binary mode The model is then ready to be loaded by clicking the Load button of the RT LAB Main Toolbar As mentioned above the sfun_gen_async_ctrl s function used by the OpGenAsyncCtrl block or the replacement controller block developed for the specific application will attempt to launch the Asynchronous Program during initialization of the model Note that because the Asynchronous Program is asynchronous to the model its own initialization phase may span longer than the model initialization Messages prepared by the Asynchronous Program are displayed in the Display View together with messages from the model Executing the model During model execution data are exchanged with the Asynchronous program via the shared memory The Data Ready of the OpGenAsyncSend block specify when to initiate a data transfer towards the Asynchronous Program The OpGenAsyncRecv blocks return data placed by the Asynchronous program in the shared memory The developer of the Asynchronous Program specifies how these data are handled by the Asynchronous Program Resetting the model 518 During model reset RT LAB attempts to close the shared memory opened during model initialization In order to be able to do so the model will first wait for the Asynchronous Program to exit The Asynchronous Program is notified that the user has requested a Reset by checking the MODEL_STATE
415. the matching parameter of the current model Ignoring a parameter 1 Select a parameter from the Structural Differences list 2 Ifthe parameter s status is estimated or solved click the Delete button to remove its estimation Note that you could also right click on the hightligthed parameter in the Current Parameter list at the bottom right of the wizard page to remove its estimation The matching item will be cleared and the status will become unresolved 3 Click the Accept button or check the box at the begining of the line to force RT LAB to ignore the parameter The value loaded from the file will not be applied to any parameter of the current model Restoring parameter RTLAB UG 104 00 347 Load Parameters wizard 1 Select any parameter from the Structural Differences list 2 Click the Restore button to restore the default saved status and estimation of the current parameter 3 The parameter status will be restored to unresolved or estimated This page also allows you to change the status and estimation of many parameters at the same time by clicking one of the following buttons accept all delete all restore all The behaviour expected is described above This page also allows you to filter items shown in the Structural Differences list By default only non existing parameters are shown However clicking the show all button at the top right of the page allows you to view all parameters stored in the file even tho
416. the model s properties These properties are grouped into six major categories e Execution RTLAB UG 104 00 203 Display e Sim ulation tools e Diagnostic e Development e Hardware e Info 1 items selected Advanced 204 Property 1 Execution E E il amp 2 E amp amp m m m Tera JE A 6 environment variables files performance real time pause time real time communication link real time simulation mode stop time target platform time factor use restricted mode use restricted mode at Simulation tools Console Matlab and Matrixx RTW Diagnostic debugging monitoring Development Compiler Linker Hardware Monitoring Performance Info derived editable last modified linked location name path size m Compilation N Matlab View Progress E Console Value Infinity UDP IP Software synchronized Infinity Windows XP Vista 1 0 false 1 false true false C Opal rt RT L4B10 0_b5 Examples Basic rtdemo2 Simulink rtdemo2 mdl rtdemo2 mdl C Opal rt RT L4B10 0_b5 Examples Basic rtdemo2 Simulink rtdemo2 mdl 32205 bytes Here are the descriptions of the model properties Execution environnement variables variables list of environment variables User environment variables are used to enable some settings for the target simulation without having Properties View to rebuilt the model Most of these settings are used for debug
417. tically If this option is turned on then the Workbench will perform an automatic build whenever a modified resource is saved Save automatically before build If this option is selected when a manual build is performed the Workbench will automatically save all resources that have been modified since the last build was performed Workspace save interval in minutes This number indicates how often the state of the workspace is automatically saved to disk Refresh automatically If this option is turned on then the workspace resources will be synchronized with their corresponding resources in the file system automatically Note This can potentially be a lengthy operation depending on the number of resources you have in your workspace Open referenced projects when a project is opened If this option is enabled opening a project will also open and closed projects it references Select prompt if you wish to be asked first Text file encoding Use this option to specify the encoding to use when saving text files in editors Text File line delimiter Use this option to specify the line delimiter to use for new text files Note This will generally not effect the file line delimiter for existing files RTLAB UG 104 00 449 Workspace preference page 450 RTLAB UG 104 00 Cheat Sheets Cheat Sheets RT LAB provides cheat sheets to guide you through some of its application processes Each cheat sheet is designed to help you complete some ta
418. ties view displays the target s properties such as the IP address the detected operating system and the number of CPUs RTLAB UG 104 00 209 Properties View Property Value E 1 Overview IP address 192 168 0 139 name redhat_i7 2 Operating System detected platform Redhat version 2 6 29 6 opalrt 2 3 Hardware architecture i686 CPU speed MHz 3200 disk space MO 124597 number of CPUs 8 Here are the descriptions of the target properties IP address IP address of the target name User name set at the target creation detected platform Operating system detected Windows XP Vista or Redhat or QNX version Version of the operating system detected architecture Architecture type of the target for instance x86pc or x86 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 210 The properties view provides a contextual menu when right clicking on properties The following figures shows the contextual menu Property Value El 1 Execution environment variables E files performance action after N overruns E action on overruns Copy Reset detect overruns EX Restore Default Value Aue number of steps without oy 10 The available menu items are Copy This command is used to copy the Property and the current value of the selected item The user can then paste the selection in external application R
419. to a number n a sample is acquired at every n th calculation step Number of samples per signal Defines the frame length of the signals for a group according to the number of samples for each signal These signals are received and saved in a buffer ready for transmission to the Console via the Ethernet link or other communication devices For example if n is the number of samples per signal of a group with m signals the buffer s size value of m x n and the signal frame have a length value of n corresponding to n cycles calculation steps up to the maximum number of samples In other words this guarantees that there is no data loss for n simulation steps The default value max 1 200 model timestep decimation 1000 Max number of samples per signal Defines the maximum number of samples that can be acquired for a specified acquisition group of the current model Setting this value prior to simulation ensures that no dynamic memory allocation a process that can degrade real time performance and stability takes place during simulation This maximum is the total number for all the signals in the group For example when acquiring 4 signals for an acquisition group you can specify a number of samples per signal up to the number set here Duration Defines the length of time in milliseconds during which acquisition of signals is performed this parameter provides another possibility for defining the frame length and is linked to th
420. to test some commands that would be later integrated to a Python script and thus create a full automated sequence Here is an example of what the Interactive Python Console can do Display Properties 51 Compilation Sh matlab view E Console 53 AENA Eo Pydev Console 7 gt gt gt import sys os import os sys path append os environ RTLAB_ROOT cormoi 4 Python 2 6 4 r264 75708 Oct 26 2009 08 23 19 MSC v 1500 32 bit Intel RT LAB v dev gt gt gt r OpenProject rtdemol 144396663052566528L gt gt gt r GetSystemControl gt gt gt r Load OP_INSTANCE_ID 150 gt gt gt r Executel gt gt gt for i in rangeil 5 r GetSignalsByName rtdemol sm computation port2 D N 93 501870535812742 93 501868540208093 93 501866546732472 93 501864555383619 gt gt gt Toolbar 220 M lt gt The toolbar and the context menu provide some commands to control the Interactive Python Console Command Name Description Availability Terminate Closes the current Toolbar console y Save Saves current content to Toolbar a file ES Clear Console Clears the current Toolbar and Context console menu Pin Console Pins the current console Toolbar to remain on top of all other consoles in the current Console View RTLAB UG 104 00 Command Name E Display Selected Console ES Open Console Shortcuts Interactive Python Console Description Availability Opens a listing of current Toolb
421. tor designed to execute Models They are identified by a name and are associated to an IP address Target icons indicate the platform and the state of the Targets They also allow identification of the different development nodes used for compilation To manage the Development Nodes use the RT LAB preference page preference page or the context menu of a Target ICON MEANING a The Target is down or not accessible a The Target is up and runs Windows a The Target is up and runs QNX The Target is up and runs RedHat of The Target is up runs QNX and is the development node for the QNX platform af The Target is up runs RedHat and is the development node for the RedHat platform a The Target is up runs RedHat and is the development node for several platforms Note that there is no Development Node for Windows since the local machine will always be used for compilation Current platform and Development platform do not need to match because some Targets support multi boot For instance if a multi boot Target is configured to run both QNX and RedHat and is used as the Development Node for QNX when it is running RedHat it remains the Development Node for QNX In this case compilation for QNX will not be available This Target would have the following icon ae As a consequence multi boot Targets may be used as Development Nodes for several platforms Other resources The Project Explorer can be used to manipulate other resourc
422. toring Models Using RT LAB Blocks Using ScopeView RT LAB Connectivity Embedding Simulation Taking a Snapshot Working with perspectives Working with views and editors Customizing the Workbench RTLAB UG 104 00 457 Tasks 458 RTLAB UG 104 00 Building models Building models This chapter describes the basics of RT LAB provides an overview of the simulation process from designing and validating the model to using block diagrams and 1 0 devices to running the simulation and using the Console as a graphic interface Building a simple model for RT LAB Naming convention In RT LAB all top level subsystems must be named with a prefix identifying their function The prefixes are e SC_ console subsystem The Console subsystem is the subsystem operating on the command station that enables you to interact with the system It contains all the Simulink SystemBuild blocks related to acquiring and viewing data scope manual switch To Workspace type blocks etc The blocks you need whether it is during or after the execution of the real time model must be included in the Console subsystem The console runs asynchronously from the other subsystems Note that there can only be one Console per model LES p Scope XY Graph Display Manual Switch Figure 1 Simulink Blocks for Console Subsystem e SM_ master subsystem There is always one and only one master subsystem inside a model It contains the computational elements of t
423. tors gt Annotations preference page Show in Text as This option controls whether the selected annotation type is shown in the text The corresponding text will be underlined with squiggles or highlighted Show in Overview ruler This option controls whether the overview ruler on the right side of the text editor is shown Show in Vertical ruler This option controls whether the selected annotation type is shown in the vertical ruler Color This option controls the color for the selected annotation type RTLAB UG 104 00 403 Annotations preference page 404 RTLAB UG 104 00 Capabilities preference page Capabilities preference page The capabilities preference page allows you to enable or disable various product components of RT LAB such as Operator or Developer environments By default no capabilities are active and only the basic functionalities of RT LAB are active Note Some capability selections have dependencies on other capabilities disabling a required capability while leaving dependant capabilities enabled will only result in them becoming re enabled RT LAB This capability enables all features related to RT LAB Do not disable this capability RT LAB Operator This capability enables all features that allow user to manage consoles and make some changes to the parameters and aliases of the models It enables all components making data acquisition and monitoring and also basic operations on the simulator as loading exe
424. ts that run an embedded simulation and projects that are connected to an embedded simulation are identified by having a short description such as Embedded on targetName appended to their name OS Project Explorer 3 E Bb Mo de Targets wa localhost ae M201 La RedHat231 Demo embedded Running simulations t Demo gt redemol 2H sm_computation E Demo Running Embedded on RedHat231 Figure 95 Embedded Simulation The next sections show how to connect an existing RT LAB project to an embedded simulation By default the Project Explorer view is included in the Edition Perspective To add it to the current Perspective click Window gt Show view gt Other gt General gt Project Explorer Connecting a Project to an Embedded Simulation To connect a project to an embedded simulation right click on the Running Simulation and select Connect Project Explorer 3 E Bb gt Win a Je Targets val localhost ge M201 4 a RedHat231 Demo embedded a E Running simulations 4 23 Demo a i Delete Delete Rename F2 Ly Demo Refresh F5 Connect Properties Alt Enter Figure 96 Embedded simulation menu This operation has opened the Embedded Simulation dialog RTLAB UG 104 00 341 342 Connect to Embedded Simulation Wizard r E Embedded simulation ee Embedded simulation Reconnect a project to an embedded simulation Select a project to be reconnected to Demo on target Re
425. ulation Syntactically valid XML elements that are not explicitly required to configure RT LAB Orchestra are ignored Also note that all XML tags and attributes in a DDF are in lower case Domain elements The next level down from the top element contains a list of lt domain gt elements An RT LAB Orchestra domain is a container for named data items exchanged between co simulation components also referred to in this context as domain participants A domain is defined by the name attribute of its element A domain name has to be unique inside the root element A lt domain gt element contains several Quality Of Services QoS attributes that define the connection policies followed by domain participants RTLAB UG 104 00 Configuring the RT LAB Orchestra communication layer e Synchronicity this parameter determines whether domain participants exchange simulation data synchronously or asynchronously In the DDF this attribute is controlled by the lt synchronous gt element e Writer Access Exclusivity this parameter determines whether several publishers can write to the same domain Any number of domain participants can subscribe to a given domain at the same time In the DDF this attribute is controlled by the lt multiplePublishAllowed gt element e Writer Access Priority this parameter determines whether an external component needs to seed the data exchange within a given domain by publishing to that domain first before the RT
426. ult location by browsing the destination folder The location is the folder where the model s file will be added RTLAB UG 104 00 RT LAB Model Import existing RT LAB model from the local file system Existing RT LAB model import wizard Model File CART LABIbuidireleaselwin321ExamplesiBasicirtdemoz Simulinkirtdemoz mal FE Simulink gt rtdemoz mdl Select All Select RT LAB files Deselect All Project rtdemo Use default location f Options Cl Overwrite existing resources without warning O Create complete folder structure Create selected folders only Import model dialog options Figure 91 Import model dialog Option Overwrite existing resources without warning is use to force the selected files to be import in the project folder Files will not be import if they are already exists in the RT LAB project folder If we check this option the existing files in the project folders will be overwritten with the new one Option Create complete folder structure is use to create the source folder structure to the destination folder of the project In this example the created destination structure is models rtdemo2 RT LAB build release win32 Examples Basic rtdemo2 Simulink rtdemo2 mdl Option Create selected folders only is use to create only the selected folder to the destination folder of the project In this example the created destination structure is models rtdemo2 rtdemo2 mdl Related concepts
427. useless The editor area E filet txt Zo E filez txt becomes this Trim Stack when minimized g 7 A If your particular workflow is such that you need to have more than one element i e having the Editor Area and a View Stack in the presentation at the same time you can still gain additional screen space by minimizing the stacks that aren t of current interest This will remove them from the main presentation and place them on the outer edge of the workbench window as Trim Stacks allowing more space for the remaining stacks in the presentation Note There are two ways to end up with a stack in the trim e Directly minimizing the stack e As the result of another stack being maximized Depending on how the Trim Stack was created its behavior is different when un maximizing only those trim stacks that were created during the initial maximize will be restored to the main presentation while stacks that were independently minimized stay that way Tip This difference is important in that it allows you fine grained control over the presentation While using maximize is a one click operation it s an all or nothing paradigm i e no other stack is allowed to share the presentation with a maximized stack While adequate for most tasks you may find yourself wanting to have the presentation show more than stack In these scenarios don t maximize minimize all the other stacks except the ones you want in the presentaton Once you have
428. utside the Workbench Tip If you work with external editors regularly you may want to enable auto refresh This can be done by opening the General gt Workspace preference page and checking the Refresh automatically option When this option is enabled any external changes will be automatically discovered by the Workbench Depending on the platform this may not happen immediately Related concepts Editors External editors Project Explorer view RTLAB UG 104 00 571 Editing files outside the Workbench 572 RTLAB UG 104 00 Tiling editors Tiling editors The Workbench allows you to have multiple files open in multiple editors Unlike views editors cannot be dragged outside the Workbench to create new windows However you can tile editor sessions within the editor area in order to view source files side by side e With two or more files open in the editor area select one of the editor tabs e Holding down the left mouse button drag that editor over the left right top or bottom border of the editor area Notice that the mouse pointer changes to a drop cursor that indicates where the editor session will be moved when you release the mouse button e Optional Drag the borders of the editor area or each editor to resize as desired This is a similar operation to moving and docking views inside the Workbench except that all editor sessions must be contained within the editor area Related concepts Editors RTLAB UG 1
429. values of the third column before applying changes If desired this page also allows you to show all parameters loaded from the file that have the same values as the current model parameter values To perform this click the Show all button at the top right of the page When you are satisfied with the new values click finish to apply these values to the current model Related reference Project Explorer Save Parameters wizard RTLAB UG 104 00 349 Load Parameters wizard 350 RTLAB UG 104 00 Save Parameters wizard Save Parameters wizard This wizard helps you to save the parameter values of model currently selected in the Project Explorer Here is what this wizard looks like Save Parameters File Save Parameters File Save parameter values to the local file system File name C tempiparam_set_3 param v Comment This is a comment Created by VincentL Created on Tue Dec 21 11 43 26 2010 Model Information Current Model Model file name vincentL test_workspace_network rtdemot rtdemot llp Created by Paul Baracos Created an Wed Nov 21 11 28 32 2001 Last saved by QuentinDerouault Last saved on Fri Nov 20 17 14 27 2009 Model Revision 1 108 Figure 101 Save parameters dialog RT LAB will use the current running model and save all current model values in the specified file This file may be used later to roll back the parameters This functio
430. variable See the full discussion in section Maximizing Parallel Communication OpComm blocks provide information to RT LAB concerning the type and size of the signals being sent from one subsystem to another OpComm blocks inserted into the Console subsystem enable you to select the data acquisition group you want to use to acquire data from the model and to specify acquisition parameters RTLAB UG 104 00 461 Building a distributed Model for RT LAB Acquisition parameters are described in the following sections specific to Simulink or SystemBuild respectively RT LAB uses OpComm blocks to enable and to save communication setup information This includes both communication between the command station and computation nodes and communication between computation nodes in a distributed simulation scenario All inputs to top level subsystems must first go through an OpComm block before they can be used reference plant_response control_signal OpComm Figure 3 0pComm block OpComm placement rules In the computation subsystems SM or SS e One OpComm receives real time synchronized signals from other computation subsystems e One OpComm receives signals asynchronously from the console subsystem In the console subsystem SC subsystem e One or more OpComm blocks may be inserted to receive signals from the computation nodes Multiple OpComm blocks define unique acquisition groups with their own data acquisition
431. variable Upon detecting a Reset or an Error state the Asynchronous Program should exit properly If it fails to do so for example because it is too busy processing data from an external device at that time RT LAB model may fail to close the shared memory and will display a message to warn the user about this The user may then need to kill the Asynchronous Program manually on the target computer before the next load of the model It is the responsibility of the Asynchronous Program developer to ensure that Reset or Error states are handled properly by the Asynchronous Program RTLAB UG 104 00 RT LAB User SFunction RT LAB User SFunction Introduction Prior to Release 13 of Real Time Workshop the RT LAB targets used the SimStruct data structure to capture and store model wide information Since the SimStruct was also used by noninlined S functions it suffered from the drawback that some of its fields remained unused when it was used to capture root model wide information To avoid this drawback Version 5 0 of RTW introduces a special data structure called the rtModel to capture root model data RT LAB now supports the data structure rtModel Support for this structure will help make RT LAB compatible with new MatLab toolboxes such as Simscape toolbox with SimDriveline SimHydraulics SimMechanics and will give access in the future release of RT Lab to new RTW functionality such as support of Model Reference Block etc For most user
432. ven if you set the project s location to C Y or to other sensible 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 e 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 will make a copy of the files to the RT LAB workspace e To avoid conflicts between files do not put several model files into the same folder e 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 RTLAB UG 104 00 Project Explorer 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 e For the same reasons unused projects should be closed to improve
433. view e Select the model MyModel in the Project Explorer view e Under the model MyModel the list of MyModel subsystems appears E EL MyProject EH Models EREM Model sc_user_interface 2H sm_computation e To open the Simulink Console use one of the following methods e Select and double click on the subsystem corresponding to the console subsystem For your model double click on sc_user_interface subsystem or e Before the model loading step double click on the model to open its editor select the Simulation tools page and check Handle Console automatically The Simulnik Console should be open RTLAB UG 104 00 57 58 Using the Console mymode 2 sc_user_interface dur DINPHat User interface display acquisition signals and set control signals one adjust reference control_signal Time offset 0 e To start the Simulink Console press Start Simulation in MatLab You can interact with the model through the Simulink Console by changing Adjust reference and observe effect your change in the Simulink scope RTLAB UG 104 00 Resetting the model When you finish the simulation of your model here how to reset your model with RT LAB e Activate the Project Explorer view Select the model MyModel in the Project Explorer view e To start the reset process use one of the following methods e From the menu bar select Simulation gt Reset e From the the view s popup menu choose Simulation gt
434. w S Link Editor Figure 16 Top Level Element menu If Working Sets is selected the selected Working sets appear in the Project Explorer as containers E gt Demos E QuickDemo 0 5 RT Demo E gt Testing E E WindFarm Figure 17 Working Set display If Projects is selected only projects that are part of the currently selected Working sets will appear in the Project Explorer Other projects will be hidden Clicking Deselect Working Set makes all existing projects appear in the Project Explorer again RTLAB UG 104 00 179 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 vop Top Level Elements gt Select Working Set Customize View amp Link Editor Figure 18 Customize View menu The following dialog is displayed Available Customizations gt gt Filters fe Content Select the filters to apply matching items will be hidden enter name of Filter Pydev custom specified Filters C Pydev non Pydev Projects MNAT LAB Internal resources generated by RT LAB O RT LAB Non RT LAB Project RT LAB Project top level resources RT LAB Resources RT LAB Target RT LAB Hides internal RT LAB resources such as Im and lp files gen
435. w Description Displays the selected variable in another view Copies the selected lines to the clipboard Removes the selected variables from the current Working Sets Selects all the variables currently displayed in the view Updates the table content 233 Variables Table View 234 RTLAB UG 104 00 Probe Control Panel The Probe Control panel enables you to specify the acquisition parameters for each acquisition group The signals from a given group share the same characteristics such as e size of the data frames being sent expressed either as a number of samples per signal or in units of time e decimation factor e sampling mode repetitive or not and re arming delay e blocking mode in case acquisition or transmission is interrupted e a write to file option that enables simulation data to be saved as a mat file on the target nodes The Probe Control Panel can be launch using the Tools gt Probe Control menu or using the toolbar button Note that the panel is only available when a model is selected in the Project Explorer view gt Probe Control rtdemo3 mdl Model selection ttdemo3 mdl A Disconnect Basic step size 1 000 milliseconds Group 1 Sampling z Data acquisition triggering Pause F Trig signal name Offset steps Cr Modifications Condition N NG E y I Write to file File Name Variable Name IV Repetitive sampling Re arming delay 0 000 milliseconds Default
436. w View gt Other gt General gt Bookmarks The Description column contains a description of the bookmark You can edit the description by selecting Properties from the context menu The Resource and Path columns provide the name and location of the resource associated with each bookmark The Location column indicates the line number of the bookmark within its associated resource Toolbar The toolbar of the Bookmarks view includes the following buttons Delete Delete the selected bookmark Go to Open the bookmark s resource and navigate to the bookmarked region Menus Click the icon at the left end of the view s title bar to open a menu of items generic to all views Click the black upside down triangle icon to open a menu of items specific to the Bookmarks view Right click inside the view to open a context menu Creating a bookmark within a file The Workbench allows you to create bookmarks in files that you edit so that you can quickly reopen those files from the Bookmarks view With the file open in an editor right click in the gray border at the left of the editor area next to the line of code or text that you want to bookmark Select Add Bookmark from the pop up menu Notice that an icon for the bookmark now appears in the left border of the editor area A line is also added to the Bookmarks view You can reopen the file for editing at any time by double clicking the bookmark in the Bookmarks view RTLAB U
437. w to get the monitoring information e Click Window gt Show View gt Other menu Wow HE New Editor gt 2 514 Compilation Customize Perspective E Console Save Perspective As Display Reset Perspective Sh Matlab view Close Perspective Progress Close All Perspectives RB Project Explorer Navigation gt Properties Preferences Other Alt Shift e and then select the RT LAB gt Monitoring view RTLAB UG 104 00 485 Using the OpMonitor Block Show View type filter text gt General gt Debug 5 Help Pydev RT LAB ad Compilation Display N Matlab View ES ES Variable Viewer ES Variables Table H E Team gt Terminal gt Other Use F2 to display the description for a selected view e Click the Get Probes button in the view s toolbar to retrieve monitoring information Refer to Monitoring View for more information Using the OpMonitor Block The OpMonitor block provides monitoring and probe information inside the Simulink SystemBuild model as outputs of the block Most common probes could be outputed from the blocks The model can use these values to adjust itself by enabling or disabling subsystems or to log the information to a data logging file etc When the block is inserted into the model the monitoring will be enabled the next time the model is compiled and then loaded In this case you do not need to enable the monitoring f
438. 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 Related concepts Workbench RTLAB UG 104 00 167 Detached views 168 RTLAB UG 104 00 Project Explorer Project Explorer This view provides a hierarchical view of the resources in the Workbench Here is what the Project Explorer looks like Project Explorer 3 B PSS zn E Je Targets A DevMachine El down wa localhost LA TestDriveMachine 2 TestMachine E 2 RT Demo 8 Models rtdemoi rtdemo2 gt sc_user_interface gt sm_master PH ss_slavel PH ss_slave2 EJEM E Figure 3 Project Explorer overview Concepts 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 simulation This makes the Project Explorer a good starting point for any simulation project Resources Basically 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 To learn more about these resources
439. working sets you want to merge see below then create a new working set Duplicates will automatically be removed To select which working sets should be shown in a Variable Table click on the Select Working Sets button to open the following dialog RTLAB UG 104 00 227 Variables Table View gt wy Select Working Sets ls Fee Select working sets Window Working Sets No Working Sets W 3 Demo Edit Remowe SelectAll DeselectAll O Figure 42 Select Working Sets dialog This dialog allows you to create edit and delete variables working sets Note that variables working sets are common to the entire workbench which allows them to be used in the Project Explorer like other types of Working Sets Project Explorer 23 E Bla 70 a gt Demo E Value signall Figure 43 Using variables working sets in the Project Explorer Editing Working Sets In the Select Working Sets dialog clicking on the Edit button opens a new dialog that can be used to choose the variables that will be part of the selected working set 228 RTLAB UG 104 00 Variables Table View a amp Edit Working Set Variables Working Set Enter a working set name and selectthe working set elements Working set name Demo Working set content 4 BE MyProject a E E Models 4 M matrixTest EE Matlab Variables E sm_master 2 ss_slave
440. xplorer view select help as the destination e From the folder s context menu select Paste or Ctrl V As an alternative to copying files using the copy operation it is also possible to copy files by holding down the Ctrl key while dragging a file from one folder to another folder Once the file has been copied it can be renamed RTLAB UG 104 00 73 74 Copying RTLAB UG 104 00 Renaming Renaming Now that file1 txt has been copied from MyProject folder to Help folder it is ready to be renamed as something else e In the Project Explorer view select file1 txt in help folder e From the file s context menu select Rename e The navigation view overlays the file s name with a text field Type in file2 txt and press Enter z Rename resource New name file2 txt e To halt the renaming of a resource Escape can be pressed to dismiss the text field Copy and rename works on folders as well e In the Project Explorer view select the folder Help e From the folder s context menu choose Rename e Once again the navigation view overlays the folder name with an entry field to allow the typing in of a new name Change the folder name to be HelpFolder e Rename the folder back to its original name Help RTLAB UG 104 00 75 76 Renaming RTLAB UG 104 00 Searching Searching RT LAB objects text strings and files can be searched within the Workbench Search dialogs can be opened by selecting the search m
441. y acquisition groups you want to set Acquisition groups allow you to define different priorities and acquisition parameters to different groups of signals rtdemo2 sc_user_interface O x 7 Function Block Parameters OpComm RT LAB OpComm mask link Communication block To be used in subsystems receiving signals from other subsystems all inports must go through this communication block before being connected Parameters Number of inports 2 Acquistion group number 1 SubSystem sample time 0 Enable synchronization Enable interpolation Threshold time between host and target sec 1 0 O Missed data signal C Simulation offset signal C Simulation time signal z C Samples second signal plant response O Dynamic signals output e E p control signal Opcommt Cx Cee Figure 6 SC subsystem and associated OpComm block Since the SC console subsystem run asynchronously from the main computation SM and SS following limitations applies e The console subsystem cannot contain computation on which the real time model relies e Only signals from the same acquisition group OpComm can be compared with each other Signals from different OpComm blocks are not synchronized together Maximizing Parallel Communication To maximize parallel communication output data must be exchanged between your network s nodes in the most efficient way possible The order in which data is sent can be prioritized so that
442. y check the Case sensitive box to search for lowercase it e The types of files to include in the search can be specified in the File name patterns field Click Choose to open the Select Types dialog This dialog provides a quick way to select from a list of registered extensions e For the moment the search will be confined to txt files Ensure txt is checked and click OK e In the Scope field specify the files and folders to include in the search The choices are Workspace the currently selected resources in the Workbench or Working set which is a named customized group of files and folders Leave Workspace as the scope e Click Search At this point the Search view will be made visible and it will begin to display the results of the search The stop button in the Search view can be clicked to cancel the search while it is in progress The results of the search are displayed in the Search View Related concepts Views Working Sets Toolbars RTLAB UG 104 00 357 File Search Related tasks Opening views Moving and docking views Related reference Search View 358 RTLAB UG 104 00 RT LAB Search RT LAB Search This RT LAB Search dialog allows you to search for RT LAB elements To show the tab click Search gt RT LAB Search The results of this search are displayed in the Search View Search 87 RT LAB Search EP File Search Containing text any string any character escape f
443. y the model after 2 seconds of simulation e Start time 1 second e Time length 3 seconds e Sampling rate 1000 samples by second Trigger Start time Time length 0 1 2 3 4 3000 samples 5 6 Time s Acquisition 1 Open ScopeView without RT LAB ScopeView could be executed without running RT LAB The next steps explain how to run ScopeView from the file system The ScopeView executable is available under the installation folder of RT LAB RT LAB ScopeView The RT LAB default installation folder is C OPAL RT RT LABXX X where XX X is the version of RT LAB It could vary based on the installation path To get the path of RT LAB consult the environment variable RTLAB_ROOT or type set RTLAB_ROOT from the windows command line cmd exe To open ScopeView from the file system 1 Open Windows Explorer Win E 2 Go to the RT LAB installation folder type RTLAB_ROOT into address bar 3 Change directory to ScopeView 4 Double click on ScopeView exe Hint A shortcut of ScopeView could be create and copy on the windows desktop 530 RTLAB UG 104 00 Embedding Simulation Embedding Simulation Introduction An embedded simulation is a simulation that always 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
444. yer There are 2 ways to create a new domain e right click the Orchestra root element in the Explorer View this causes a pop up menu to appear Left click the Add Domain of the pop up menu this causes a new domain element to be added to the Explorer View e select the Domain gt Add New Domain item on the toolbar menu When created a domain is automatically assigned the name new Domain where represents a positive integer that increments sequentially You can then choose to rename the domain A newly created domain contains empty Publish and Subscribe sets Renaming a domain To rename a domain select the domain in the Explorer View then double click or press the F2 key The Domain name becomes editable enter the new Domain name and press the Enter key If the domain name is not unique an error message is displayed and the domain name is reverted to its previous value Note that all leading and trailing spaces are stripped from the domain name Opening an existing DDF Select the File gt Open item on the toolbar menu this causes a dialog window to appear Select the DDF you want to open and click the Open button on the dialog panel The DDF is parsed checked for correct syntax and its content is displayed in the Explorer View The title bar of the DDF Configurator displays the name of the file that you just opened If the DDF could not be processed successfully an error message is displayed and the opening
Download Pdf Manuals
Related Search
Related Contents
PT6A-66 S/N:PCE-RK0121 FINAL ACCEPTANCE TEST RECORD OPERATORTS MANUAL - Troy-Bilt GAMESS-UK USER'S GUIDE and REFERENCE MANUAL Version DVD Super MULTIドライブ(DVD±R 2層書込)取扱説明書 Durable SUPERCLEAN 50 pack Manual de instruções GEX Philips AVENT SCF753 Audiovox AA-930 User's Manual Copyright © All rights reserved.
Failed to retrieve file