Documentation Home Page ◇ TestDrive Home Page
Pour la documentation en FRANÇAIS, utilisez l'outil de traduction de votre navigateur Chrome, Edge ou Safari. Voir un exemple.
OpVirtualScope’s 32-trace TestDrive GUI
- 1.1 File Management
- 1.2 File Management GUI
- 1.3 Enable Data Logging checkbox and Save Current Data button
- 1.4 File progress
- 1.5 Base File Name
- 1.6 Max File Size (MB)
- 1.7 Max File Index and Reset button
- 1.8 Auto Increment
- 1.9 Current File Index
- 1.10 File folder
- 1.11 List of files on Target with the Delete, Download, and Abort buttons
- 1.12 List of files on Host with the Delete and Display buttons and the Rename method
- 2 Acquisition Settings
- 2.1 Enabled Channels
- 2.2 Trigger Mode
- 2.3 Operator and Time
- 2.4 First and Second Triggers
- 2.5 Arm Trigger
- 2.6 Force Trigger
- 2.7 PreTrigger
- 3 Scope
- 4 Display
- 4.1 Arm
- 4.2 Auto Rearm
- 4.3 Mode
- 4.4 Lossless Mode
- 4.5 Persistent
- 4.6 Synchro
- 4.7 Y-Autoscale
- 4.8 Show Mark
- 4.9 Active Channels
- 4.10 Performance
- 4.11 X Scale
- 4.12 Display trigger
- 4.13 External Display Trigger
- 4.14 Window offset
- 4.15 Find trigger
OpVirtualScope’s 32-trace TestDrive GUI
This is a 32-trace TestDrive panel. It works similarly to an oscilloscope. It offers the ability to manipulate data from fault triggers, to define the fault triggers themselves, and to visualize the ongoing acquisition or review saved data. In the following sections, we will discuss these abilities and their controls on the GUI.
File Management
File Management GUI
This panel is used to manage triggered data. Each time a fault trigger occurs, all buffer data can be saved into a MAT file. The default format used is V4.
The file type is not easily accessible in the model. It is highly recommended to leave the default format.
This file format can be easily opened with MATLAB. Take note that if the data type is changed to U32 or I8 in the Simulink model you may not be able to open them with MATLAB because it does not support these file types.
Enable Data Logging checkbox and Save Current Data button
If Enable Data Logging is checked, the data will be saved automatically in a MAT file each time a trigger occurs.
If Enable Data Logging is unchecked, no data will be saved automatically. Data can still be saved by manually pressing the Save Current Data button after a fault trigger.
File progress
This indicator shows the MAT file write operation’s progress on the target.
Base File Name
The basename for MAT files saved on the target. The name will be applied as follows:
basename_XX.mat, where XX is the Current File Index.
Max File Size (MB)
A size limit, in megabytes, can be given to the generated file when saving. This size limit cuts the length of the time frame of the scope window that is saved. For example, the length selected is one second but the file size is limited, the resulting saved file might be of 0.5 seconds. It is most useful with long-duration simulations.
Max File Index and Reset button
This index sets the maximum number of files that will be written with the current base file name. Once this maximum is reached, no data logging is performed, not even if the Save Current Data button is clicked.
Use the Reset button to restart data logging, or simply to reset the index before the allowable maximum has been reached. If the base name has not been changed prior to a reset or the files not downloaded to the host computer, the existing files with the same name will be overwritten.
Auto Increment
Once checked, the file index will be incremented after each save. Left unchecked, the file with the current index number will be overwritten each time a save occurs.
Current File Index
It indicates the index of the last file written. A value of -1 in this field means that no file has been written yet or that the file index has just been reset.
File folder
It is the folder on the host computer in which to download the saved MAT files resident on the target. By default, the File Folder is the one containing the current model.
List of files on Target with the Delete, Download, and Abort buttons
This list shows all the saved MAT files that are on the target, for the current simulation. From here files can be deleted or downloaded by selecting the desired file(s) and pressing Delete or Download. There is a confirmation message before deleting any file to validate the user’s choice. There is also a confirmation message if a file might be overwritten by a download. If for any reason a download is too long, the Abort button may be used to cancel the process.
The list can be forced to refresh itself, when the focus is set to it, by hitting the F5 key.
Note: All MAT files generated by the scope on the target during a simulation are deleted the next time the model is loaded.
List of files on Host with the Delete and Display buttons and the Rename method
This list shows all the downloaded MAT files that are in the current folder on the host, for the current simulation. From here files can be deleted or displayed in the scope by selecting the desired file(s) and pressing Delete or by selecting a single file and pressing Display. There is a confirmation message before deleting any file to validate the user’s choice. When viewing a file, the scope will be set to File Mode and the Display button will be renamed Close. Click it to close the currently displayed file and to free memory.
To rename a saved file, click an already selected file in the list box.
The list can be forced to refresh itself, when the focus is set to it, by hitting the F5 key.
Acquisition Settings
The acquisition settings panel lets the user select which channels should be enabled and define the fault trigger parameters. Trigger detection is done by the model and is used to detect problems during the simulation. Each time the “Scope” Simulink block receives a trigger signal, it displays triggered data in the scope (except if the Auto Rearm option is checked) and saves it to a MAT file if Data logging is enabled.
Enabled Channels
Disable channels to reduce the target CPU consumption and the size of the MAT files. The MAT file size is affected because only enabled channels are stored. Any disabled channels will be set to zero if they are displayed in the scope (see Active Channels).
Trigger Mode
Edge: This trigger mode refers to the Edge Type X set to Rising or Falling to detect the In this mode, the Second Trigger settings are ignored.
Threshold: This trigger mode uses the Operator and Time fields to restrict the time range in which the edge condition and value of a signal can cause a fault to be triggered. In this mode, both the First and Second triggers are always
Operator and Time
The period in seconds (Time) used with the Operator to restrict when the two trigger conditions will be monitored. No trigger will occur outside of this time range. Both settings are only used in Threshold trigger mode.
First and Second Triggers
Trig Chan X: Sets the channel to apply the trigger detection
Edge Type X: Sets the edge type that the trigger should look for:
RISING: The trigger will be activated on the rising edge of the plot.
FALLING: The trigger will be activated on the falling edge of the
EITHER: The trigger will be activated on either a rising or falling edge of the
Trig Level X: Sets the value of the
Arm Trigger
Once you have set the trigger conditions, use this switch to enable trigger detection in the model. The left position is OFF and the right position is ON.
Force Trigger
It makes a trigger occur even if conditions have not been met. Most useful when you are in Acquisition mode and you see something happening that you want to analyze later.
PreTrigger
Sets the percentage of buffer you want to keep in memory (and file) before trigger when a trigger occurs.
Scope
The scope is a standard LabVIEW Waveform Graph. In such, it has the Cursor, Zoom Palette, and Hand Tool icons that can be seen on the top left corner of the scope the Plot Legend on the top, the user- definable Y-scale (Amplitude) minimum and maximum on the left, and the X-axis (Time) with its scrollbar on the bottom.
The LabVIEW Cursor is not used in this GUI, but it can be easily implemented through LabVIEW by modifying the GUI by adding the Cursor Legend.
The Zoom Palette gives the user many means to zoom on certain areas of the Waveform Graph. It is to be known that the Y-Autoscale affects the zoom settings on the scope by changing them to best fit the view to the wave being displayed.
The Hand Tool provides the user with the ability to move the Waveform graph around. The Plot Legend can be used to define all the graph’s properties.
The Y-axis can be manually set by double-clicking the topmost and the bottom end values. You can enter specific values this way.
The X-axis represents the time. You can change the scale with the X Scale selector. The X-axis scrollbar can only be used in Trigger and File mode when zoomed. This way the user may scroll through the buffered or saved data. One cannot scroll outside the buffered or saved data.
Display
Arm
Start the acquisition and display the currently acquired data in the scope.
Disarm to pause display and trigger detection.
When a fault trigger occurs, the trigger is automatically disarmed, and triggered data is displayed in the
ON when set in the right position and OFF when set in the left position.
Auto Rearm
When a fault trigger occurs, the trigger is automatically rearmed.
With this option enabled, the scope is constantly updated with the latest acquired
Use this option with the Enable Data Logging and Auto-Increment options to log data each time a fault trigger occurs (long-duration simulations).
Mode
There are 4 different modes:
(Hourglass) | Inactive | Trigger has not been armed |
---|---|---|
(Scope) | Acquisition | The scope is displaying currently acquired |
(Camera) | Trigger | A fault trigger occurred, and the scope is displaying triggered data (Trigger is disarmed). |
(Sheet of paper) | File | The scope is displaying the content of a MAT file you saved previously. |
Lossless Mode
OFF: A simple decimation is applied to acquire In this mode, you see 1 data of N, and the value of N depends on several parameters like the scope width and duration. This mode uses fewer CPU resources than the ‘lossless’ one, but you miss a large amount of data.
ON: A more complex decimation algorithm is applied to acquired data. This mode takes more CPU resources than the ‘simple’ one, but the scope displays the same plot as if all data were
Persistent
The scope displays data progressively, from left to right. When the right border is reached, new data is displayed from the left again. The persistent option makes new data overwrite old data; otherwise, the scope is cleared between frames.
To clarify the distinction between old and new data, enable the Show Mark option
Synchro
This option makes acquired frames fit exactly in the full scope width: new data will not overwrite old data before a complete frame has been displayed (see Persistent).
This option is most useful when the scope is displaying very short frames (< 200 ms).
Y-Autoscale
ON: The Y-Autoscale LabVIEW function is applied to the scope
OFF: Previously defined Y scale is used
Show Mark
In acquisition mode, a vertical line indicates the separation between old and new data in the scope (see Persistent).
In file and trigger mode, one or two vertical lines (see Trigger Mode) are displayed to show the trigger(s).
In all modes, if no data can be acquired (for example, no active channel is selected), a horizontal line is
Note: These lines are red by default. You can change this by changing the first plot’s properties in the plot legend.
Active Channels
Select the traces you want to be displayed in the scope. Make sure these traces are enabled (see Enabled Channels). If not, they will be set to zero. Hovering the mouse pointer over a channel will activate a pop-up of that channel’s number
Performance
FPS Limit: Frames per second You can limit the refresh rate of the scope to diminish CPU consumption.
FPS: Average number of frames displayed per The maximum value is the FPS limit you set.
% CPU: Percentage of the target’s CPU This functionality is not related to the Virtual Scope and is implemented in the GUI.
X Scale
Sets the window duration, e., the duration of data that is displayed in the scope.
Display trigger
Type: You can set a ‘display trigger’. It is only used for positioning the data within the scope with respect to a reference point, the time where the trigger occurs. There are five different triggers:
NONE: Data is displayed continuously.
RISING: The reference point will be a rising edge at the set value.
FALLING: The reference point will be a falling edge at the set
EITHER: The reference point will be a crossing of the set value.
EXTERN: Based on an external See ‘External Display Trigger’.
Value: Sets the value of the
Channel: Sets the channel to apply the trigger detection
External Display Trigger
You can use your own trigger detection for the Display Trigger. This input is very similar to the first element of the Fault Trigger input: negative values are ignored; positive values are interpreted as the index of trigger in the data input vector.
Window offset
Sets the offset of the display. You can use the ‘Window offset’ numeric control or the scrollbar below the scope.
Combined with the X- and Y-scale, it allows you to see any part of data stored in memory or in a
Note: For now, this function is disabled in acquisition mode.
Find trigger
In Trigger and File Modes it is used to center the trigger on This button automatically sets the adapted Window offset.
OPAL-RT TECHNOLOGIES, Inc. | 1751, rue Richardson, bureau 1060 | Montréal, Québec Canada H3K 1G6 | opal-rt.com | +1 514-935-2323
Follow OPAL-RT: LinkedIn | Facebook | YouTube | X/Twitter