Veristand - 8 29 2023
Veristand - 8 29 2023
Veristand - 8 29 2023
2023-08-29
VeriStand
Contents
What Is VeriStand and Who Is It For?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
VeriStand New Features and Changes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Activating Your VeriStand Software. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Activation FAQ. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
VeriStand Licensing Options. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Activating Software. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Deactivating Software. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Configuring the System. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
VeriStand Environment. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Components of a VeriStand Project. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
APIs in VeriStand. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Keyboard Shortcuts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
VeriStand Directories and Aliases. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
VeriStand File Extensions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
NI Hardware Support. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Creating a New Project. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Configuring a Project File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Creating a VI Source Distribution. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Adding Custom Files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Connecting Multiple Hosts to the Same Target. . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Integrating and Executing Models. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Models FAQs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
Using Models from C and C++. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Using Models from Simulink. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
Using Models from LabVIEW VIs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
FMI Support. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
Controlling and Monitoring Model Execution. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Common Issues with Models in VeriStand. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
Configuring a System Definition File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
Creating a New System Definition File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
Adding and Activating a System Definition File. . . . . . . . . . . . . . . . . . . . . . . . . . . 107
Versioning a System Definition File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
Connecting to a Target System Definition. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
2 ni.com
VeriStand
© National Instruments 3
VeriStand
4 ni.com
VeriStand
© National Instruments 5
VeriStand
6 ni.com
VeriStand
Key Features
The features that set VeriStand apart.
© National Instruments 7
VeriStand
Optional Extensions System Definition API Use the System Definition API
to automate the configuration
Execution API of a VeriStand system.
8 ni.com
VeriStand
© National Instruments 9
VeriStand
Related tasks:
■
Running VeriStand Operations Using the Command Line
Related information:
■ Getting Started With VeriStand
The Signal From Task (Sample Complete) default option sends a tick to the PCL each
time the Master DAQ device finishes acquiring an AI channel sample. This setting
is beneficial for multiplexed DAQ modules with many channels. The setting has no
impact on simultaneous sampled module behavior.
10 ni.com
VeriStand
© National Instruments 11
VeriStand
Note The HDL Coder Support Package for NI FPGA Hardware and IP to
FPGA Conversion Utility only support LabVIEW 32-bit.
■ PXIe R-series Kintex-7 modules ─ Use the support package to remain within
HDL Coder while generating a bitfile from a Simulink model for compatible NI
FPGA hardware.
12 ni.com
VeriStand
■ Simscape models.
Related information:
■
VeriStand Model Generation Support
Windows 11 Support
VeriStand now supports Microsoft Windows 11. For more information about NI
support for Windows 11, refer to NI Product Compatibility for Microsoft Windows 11.
© National Instruments 13
VeriStand
opening LabVIEW. For more information on the utility, refer to the supplemental
documentation.
Related concepts:
■
How VeriStand Imports Models from the Model Generation Support MATLAB
Add-on
Related information:
■NI Product Compatibility for Microsoft Windows 11
■External Mode Simulations for Parameter Tuning, Signal Monitoring, and
Code Execution Profiling
■VeriStand Model Generation Support
■
FPGA Add-on Custom Device
■HDL Coder Support Package for NI FPGA Hardware
■HDL Coder Support Package for NI FPGA Hardware
■
VeriStand AIM MIL-STD-1553 Custom Device
14 ni.com
VeriStand
Virtual buses are user interface aids that do not generate code. Non-virtual buses
group elements in memory and can generate code.
Bus element support in .vsmodel inports, outports, and parameters is limited to the
following data types:
■ Scalar
■ Vector
■ Numerical two-dimensional matrix
■ Boolean two-dimensional matrix
■ Scalar non-virtual bus
To access this support, generate models with version 1.1 of the VeriStand Model
Generation Support add-on.
© National Instruments 15
VeriStand
Related information:
■
VeriStand Model Generation Support
■
VeriStand Custom Device Wizard
■ VeriStand Custom Device Handbook
■ VeriStand Open Source Add-Ons
VeriStand Editor
■ Add, delete, and configure alarms.
■ Use the Target Log Viewer to troubleshoot unexpected engine and custom
device behavior.
■ View and adjust the target rate of a timing source from the VeriStand Editor
configuration pane by clicking Document.
Supported Environments
VeriStand now supports the following LabVIEW environments.
■ LabVIEW 64-bit
■ LabVIEW RT 2021
16 ni.com
VeriStand
Custom Devices
Build better custom devices with the following resources.
Related concepts:
■ How VeriStand Imports Models from the Model Generation Support MATLAB
Add-on
Related tasks:
■ Adding and Configuring Alarms
■
Viewing Real-Time Target Logs
Related information:
■ Custom Device Handbook
© National Instruments 17
VeriStand
VeriStand Editor
Set the default appearance of channels on the screen. Click File » Preferences and
select Screen to set the channel label location and cluster arrangement.
Related information:
■ FPGA Add-on Custom Device
■ Routing and Faulting Custom Device
18 ni.com
VeriStand
VeriStand Editor
■ Modify non-active mapping diagrams while a system definition is deployed.
Editing in other tabs will not disturb the deployed system.
■ Create duplicates of a system definition file. Use copies of a system
definition to easily deploy and test modifications without losing the original
file.
■ Monitor array-type channels while the project is running.
■ Use C# to customize and extend the VeriStand Editor. You can access
examples of implemented C# code from the VeriStand Editor Plug-in
Examples repository on GitHub.
© National Instruments 19
VeriStand
Related tasks:
■
Versioning a System Definition File
■ Running VeriStand Operations Using the Command Line
Related reference:
■ Array Controls
Related information:
■ VeriStand Editor Plug-in Examples
■ VeriStand FPGA Add-on Custom Device
■
VeriStand Telemerty Custom Device
20 ni.com
VeriStand
Related tasks:
■ Running the VeriStand Gateway Silently
■ Adding an Alarm
■ Adding and Configuring a Procedure
Related reference:
■ ASAM XIL Port Configuration Tag Reference
■ Real-Time Sequence Call Step
Related information:
■ VeriStand Instrument Add-on Custom Device
© National Instruments 21
VeriStand
VeriStand Editor
■ On the Mapping Diagram, use the Focus command (<Ctrl+,>) to emphasize
all mappings and nodes connected to a selected item. Using Focus will
highlight all directly connected components while fading the rest of the
system.
Note You can interact with faded items while using Focus.
■ In the System Definition pane, right-click an item and select Locate in
System Explorer to navigate to the place in System Explorer where that item
is configured.
22 ni.com
VeriStand
and writing waveforms with FPGA DMA channels. You can access this custom device
from the VeriStand FPGA Add-on Custom Device repository on GitHub.
Related concepts:
■
Supported Syntax in Model Parameter Files
Related information:
■ FPGA Add-on Custom Device
■ VeriStand Instrument Add-on Custom Device
VeriStand Editor
■ Manage aliases and user channels without using System Explorer.
■ Use the Model Signal Viewer to check signal values while a project is
running.
■ Receive warnings when a disk model is out of sync with the loaded system
definition model.
FlexRay
Enable the FlexRay Allow Passive to Active property to permit the transition from
the normal-passive to the normal-active state.
© National Instruments 23
VeriStand
CAN
Create channels to view timing information for individual CAN multiplexer modes
independent of the overall frame.
Related tasks:
■
Creating an Alias
■ Adding a User Channel
■
Viewing Model Values in the VeriStand Editor
Mapping Diagram
The following tasks can be completed on the Mapping Diagram.
■ Manage Calculated Channels — You can now create, modify, and delete
calculated channels from the Mapping Diagram.
■ View unmapped channels and mappings — Use the Mapping Diagram Table
View to see unmapped channels and mappings in the system definition. You
can filter the table by selecting a node or wire.
24 ni.com
VeriStand
CAN FD Scripting
The VeriStand .NET API now supports scripting CAN ports with CAN FD baud rates
and custom bitfields.
Related tasks:
■
Adding a Calculated Channel
Related information:
■ VeriStand Embedded Data Logger Custom Device
■ VeriStand Routing and Faulting Custom Device
Mapping Diagram
The following tasks can be completed on the Mapping Diagram.
■ Add and configure simulation models on the diagram from the palette.
© National Instruments 25
VeriStand
■ Evaluate items, such as channels and mappings, that have been added
or removed on the Mapping Diagram. These items are highlighted after
completing actions such as swapping a model or altering the system
definition.
The Routing and Faulting Custom Device also supports SLSC Switch hardware and
additional hardware. The SLSC Switch Custom Device is a VeriStand add-on that
supports SLSC routing modules. The following modules are supported:
■ SLSC-12251
■ SLSC-12252
■ SET-2010
SLSC Switch routing modules can be found in System Explorer under Targets »
Controller » Hardware » SLSC » SLSC Chassis » Modules » Slot (n).
Related tasks:
■ Using Models from Simulink
26 ni.com
VeriStand
■ Map channels and aliases — Use wires to connect and disconnect mappings.
■ Specify a target — Select a target and use the Document pane to designate
the name, operating system, and IP address.
■ Remove a model or calculated channel — Click and delete a model or
calculated channel to remove it from the system definition.
■ Customize terminal placement — Right-click a node and hover over
Terminal Placement to choose the side of the node that inputs and outputs
appear.
■ Change a channel's name — Right-click a channel and select Rename
Channel.
■ Reorder channels — Click, hold, and drag the left corner of a channel to
rearrange the list. You can also click a channel and use the Search dialog box
to select another channel to switch them.
Related tasks:
■ Mapping Channels and Aliases
■
Specifying a Target
© National Instruments 27
VeriStand
VeriStand Editor
You can now use the VeriStand Editor to control aspects of your project. The
UI Manager and Project Explorer windows from previous releases of VeriStand
have been combined into one editor. Many of the features of the Project Explorer
window can now be accessed through Project Files in the Navigation pane of
the VeriStand Editor. The VeriStand Editor also contains the Mapping Diagram to
help visualize channel mappings.
Note You can access the interface from previous versions of VeriStand by
launching the VeriStand Project Explorer from the x86\NI\VeriStand 2019
directory.
Mapping Diagram
You can now visualize software mappable points within a VeriStand project with the
Mapping Diagram. This graphical diagram allows you to see all VeriStand channels
and the mappings between them.
Groups of mappings between two nodes are automatically bundled into a single
wire by default to reduce clutter. If a wire represents multiple mappings, you can
select the bundle to see more information in the Configuration pane.
28 ni.com
VeriStand
CAN FD Support
VeriStand 2019 supports XNET implementation for the Controller Area Network
Flexible Data-Rate (CAN FD) protocol. With a XNET implementation, you can now use
databases that support CAN FD and CAN FD with Baud Rate Switching I/O modes.
© National Instruments 29
VeriStand
This implementation also allows calculating and using custom baud rates for a CAN
interface. For more information on CAN FD, see Understanding CAN with Flexible
Data-Rate (CAN FD).
FMI Support
VeriStand now has limited support for the Functional Mockup Interface (FMI) API
standard on Windows and PXI LinuxRT. Use the FMI standard to create tool agnostic,
portable solutions between modeling and simulation environments. VeriStand
enables the configuration and execution of FMI 2.0 CoSimulation models on host
and National Instruments Real-Time Linux64 systems.
Note This support requires the Functional Mockup Units (FMUs) to have
the proper executable binaries available.
30 ni.com
VeriStand
After installing VeriStand, you must use a license to activate the software. For more
information on installing your version of VeriStand, refer to the release notes.
1. Activation FAQ
Refer to these common VeriStand activation questions.
2. VeriStand Licensing Options
NI offers a variety of licenses for the different ways you can use VeriStand in
development and deployment applications.
3. Activating Software
Activate software products using NI License Manager.
4. Deactivating Software
Use License Manager to deactivate a software license on a computer or virtual
machine.
Activation FAQ
Refer to these common VeriStand activation questions.
What Is Activation?
Activation is the process of obtaining an activation code to enable your software to
run on your computer. An activation code is an alphanumeric string that verifies the
software, version, and computer ID to enable features on your computer. Activation
codes are unique and are valid on only one computer.
© National Instruments 31
VeriStand
32 ni.com
VeriStand
Deactivating a Product
To deactivate a product, open NI License Manager and navigate to the Local
Licenses view. Select the product to be deactivated and click Deactivate. If the
product was in evaluation mode before activation, the properties of the evaluation
mode may not be restored.
If you cannot access NI License Manager on the host computer, contact NI to
deactivate the product.
Licensing Options
Use the following descriptions to determine the VeriStand licensing option that fits
your needs.
© National Instruments 33
VeriStand
License Description
Evaluation Mode Software runs as a Full Development system for
7 days. The evaluation period can be extended
to 45 days. You can activate a VeriStand license
at any point during or after the evaluation
period.
Full Development Enables full VeriStand functionality.
PC Development Enables you to run simulations on a desktop PC.
Operator Enables you to configure a project file by
determining the preconfigured system
definition file that runs on the target and
defining the test environment that an operator
interacts with.
Note The Evaluation Package includes the same features as the Full
Development license.
34 ni.com
VeriStand
Related information:
■ License Setup and Activation
■ What Is VeriStand?
Activating Software
Activate software products using NI License Manager.
Before you begin, purchase a license for NI software and create a user account on
ni.com.
© National Instruments 35
VeriStand
If you are transferring software to another endpoint, review the NI Software License
Agreement for information regarding transfer and seat limitations.
36 ni.com
VeriStand
Note
Your code is sent
to your email
inbox after you
submit the
Activation Code
Generation form.
© National Instruments 37
VeriStand
38 ni.com
VeriStand
1. VeriStand Environment
The VeriStand environment is configuration-based, consisting of several
dialog boxes and windows that allow you to modify various components of a
project.
2. Creating a New Project
Create a new project in VeriStand to develop, prototype, and test control
systems using hardware I/O and simulation models.
3. Configuring a Project File
Configure a VeriStand project to complete tasks such as adding Tools menu
items, services, alarm responses, and custom files.
4. Integrating and Executing Models
Use models to mathematically represent real-world systems in your VeriStand
project.
5. Configuring a System Definition File
Modify a system definition file to complete tasks such as configuring the
VeriStand engine, adding models, and creating aliases.
VeriStand Environment
The VeriStand environment is configuration-based, consisting of several dialog
boxes and windows that allow you to modify various components of a project.
The following table describes the windows that make up the VeriStand
environment.
© National Instruments 39
VeriStand
40 ni.com
VeriStand
© National Instruments 41
VeriStand
Some components operate internally in the system when you run a project. Other
components are user-visible features you create and configure in the VeriStand
environment.
Note The host computer and deployment target can be the same
desktop PC. In this situation, you deploy a system definition file to host
desktop PC like you would deploy the file to a remote target.
Related concepts:
■ Host Computer
■ Deployment Target
■ Development Computer
Host Computer
A host computer hosts the screen files that serve as the user interface for operators
and runs the VeriStand Gateway.
42 ni.com
VeriStand
Internal Feature
VeriStand Gateway—Creates a TCP/IP communication channel that facilitates
communication with the VeriStand Engine over the network. The VeriStand Gateway
receives channel values from the VeriStand Engine and stores them in a table. You
can view these values using the Channel Data Viewer tab in VeriStand Editor or the
Channel Data Viewer workspace tool. If you run a project on a desktop PC, the
VeriStand Gateway initiates the VeriStand Engine.
If you run a project on an real-time target, the VeriStand Gateway synchronizes with
the system definition file that is running on the RT target. If the system definition file
currently running on the VeriStand Engine does not match the system definition
that the VeriStand Gateway expects, then the VeriStand Gateway does not
synchronize with the system definition file running on the RT target.
Interactive Features
The following are features that you can modify.
■ Project File—The .nivsprj file that defines high-level settings, such as:
■ The screen and system definition files to run
■ Available users and their permissions for the project
■ The list of tools you can launch from the Tools Launcher
■ Which services run when you deploy a project to the target
■ The IP address of the VeriStand Gateway
■ Stimulus profiles and real-time sequences
■ Screen File—The .nivsscr or .nivsscreen files that define the configuration
and settings for the screens and display items you view in the VeriStand Editor
or Workspace, respectively
■ Stimulus profile—A test executive that can call real-time sequences, open
and close VeriStand projects, and perform data-logging and pass/fail analysis.
It also connects real-time sequences to system definition files to bind channel
data within the system definition file to variables in the real-time sequence.
© National Instruments 43
VeriStand
Stimulus profiles execute on the host computer. You create and run a stimulus
profile using the Stimulus Profile Editor.
■ National Instruments Driver Software—You need the appropriate driver
software to communicate with hardware installed on a target. For a list of the
required driver software, see the VeriStand Readme located at <Program
Files>\National Instruments\NI VeriStand\readme\readme.html. If you
installed VeriStand to a different location, locate the readme directory in the
install location you specified.
Development Computer
The development computer is the computer that contains the VeriStand software.
The computer on which you develop a NI VeriStand project might be different from
the host computer in the system. To extend the functionality of VeriStand, you might
also use the following NI products on the development computer:
■ LabVIEW Development System—If you want to create custom devices,
workspace controls/indicators, timing devices, and/or Tools menu utilities,
you need the LabVIEW Development System.
■ LabVIEW Real-Time Module—You need this module to use RT functions in
custom device VIs.
■ LabVIEW FPGA Module—If you add a National Instruments FPGA target to a
project, it must have an associated FPGA bitfile. VeriStand provides FPGA
bitfiles for certain FPGA devices. If you want to customize these FPGA bitfiles
or create a custom FPGA bitfile for another FPGA target, you need the FPGA
Module.
Deployment Target
The deployment target in an VeriStand system is a desktop PC or RT target on which
you run the system definition file and VeriStand Engine.
Internal Feature
The following is a feature that you cannot directly modify.
■ VeriStand Engine—The non-visible execution mechanism that controls the
timing of the entire system and the communication between the target and
the host computer. The VeriStand Engine consists of multiple timed loops that
use RT FIFOs to transfer data between the loops.
44 ni.com
VeriStand
Interactive Features
The following are features that you can modify.
■ System Definition File—The .nivssdf file you configure in the System
Explorer window. A system definition file contains the configuration settings
of the VeriStand Engine, including:
■ The rate at which the system runs.
■ DAQ devices, NI-XNET devices, FPGA targets, or reflective memory devices
and the task and channel configurations for each.
■ Simulation models to execute, and the rate at which they execute.
■ The list of active alarms. You can use alarms to trigger actions on the
target, such as procedures, or to display dialog boxes that alert the user of
an event.
■ The list of procedures that can execute on the target. A procedure is a
script of commands that define a set of actions in the VeriStand Engine.
■ The system mappings that determine how channels are connected.
■ The list of channels for data objects in the system. The following table
displays common channel types.
© National Instruments 45
VeriStand
of the modeled item. Models contain inputs and outputs, called inports and
outports, that communicate with other parts of the control system. Build
models using several different modeling environments, and then integrate the
model into a system definition file.
VeriStand Engine
The VeriStand Engine is the execution mechanism that controls the timing of the
entire system and the communication between the target and the host computer.
The VeriStand Engine executes hardware I/O, runs models, procedures, alarms, and
tests, and computes values in the channel table based on the results of model
execution and hardware I/O. This engine runs on either a desktop PC in simulation
mode or as an embedded application on a RT system.
The VeriStand Engine consists of multiple timed loops that use real-time (RT) FIFOs
to transfer data between the loops. Each loop performs designated tasks and has an
assigned priority. Although you cannot change the priority or primary tasks of the
engine loops, you can customize loop operations, such as the execution rate. The
system definition file contains the configuration settings for the VeriStand Engine.
Note The VeriStand Engine determines which system definition file to run
by communicating over the network with the VeriStand Gateway.
46 ni.com
VeriStand
The following table displays the priority and default execution rate for the loops of
the VeriStand Engine.
© National Instruments 47
VeriStand
48 ni.com
VeriStand
Note For
more
information
on the PCL,
see Primary
Control
Loop
Execution
Steps
© National Instruments 49
VeriStand
Note A
Model
Execution
Loop
handles
high-speed,
dynamic
data
associated
with model
inports and
outports,
while a
Model
Interface
Loop reads
and applies
the lower-
speed,
asynchrono
us updates
to model
parameter
values.
50 ni.com
VeriStand
© National Instruments 51
VeriStand
52 ni.com
VeriStand
Related concepts:
■ Primary Control Loop Execution Steps
Related tasks:
■ Configuring the VeriStand Engine
Primary Control Loop Execution Steps
The Primary Control Loop (PCL) controls the timing of the VeriStand Engine by
performing several execution steps.
The PCL can run in Parallel mode or Low Latency mode. The difference between
the modes is the timing of model-related steps:
© National Instruments 53
VeriStand
■ In Parallel mode, the PCL initiates execution of models and continues to its
next iteration without waiting for models to finish executing. This causes a
one-cycle delay between when a model executes and when the data it
produces is available to the system
■ In Low Latency mode, the PCL waits for the Model Execution Loop(s) to
finish writing data to models before it reads and publishes model values to
the system. This occurs during every iteration of the system. When the model
completes execution, the PCL provides data from the model to other loops
during the same iteration that the model generated the data.
You can use System Explorer to set the execution mode of the PCL.
The following table compares the execution steps of Parallel and Low Latency
Modes.
Note The VeriStand Engine in both modes executes inline custom devices
in the order defined in the system definition file.
54 ni.com
VeriStand
© National Instruments 55
VeriStand
Related concepts:
■ VeriStand Engine
Related tasks:
■
Configuring the VeriStand Engine
APIs in VeriStand
VeriStand provides a variety of Application Program Interfaces (APIs) to
programmatically create, deploy and interact with system definitions.
These APIs are made available by C# assemblies installed to the Global Assembly
Cache (GAC). You can access the GAC from any .NET-compatible programming
language or environment, such as LabVIEW, Python, and NI TestStand.
If you are using LabVIEW to program VeriStand, you can access these APIs within the
NI VeriStand » Execution palette.
Keyboard Shortcuts
Navigate VeriStand using keyboard shortcuts.
56 ni.com
VeriStand
File Operations
Action Shortcut
Create a new screen document and add it to the <Ctrl-N>
existing project.
Open an existing project. <Ctrl-O>
Close the current document. <Ctrl-W>
Save the current file. <Ctrl-S>
Save all open files. <Ctrl-Shift-S>
Quit VeriStand. <Alt-F4>
Basic Editing
Action Shortcut
Cut. <Ctrl-X>
<Shift-Delete>
Copy. <Ctrl-C>
<Ctrl-Insert>
Paste. <Ctrl-V>
<Shift-Insert>
Undo. <Ctrl-Z>
<Alt-Backspace>
Redo. <Ctrl-Y>
<Alt-Shift-Backspace>
Editing Text
Action Shortcut
Select a single word in a string. Double-click text
Select the entire string. Triple-click text
Move the cursor within a string by one word in <Ctrl-Right arrow>
the direction of the arrow. <Ctrl-Left arrow>
© National Instruments 57
VeriStand
Action Shortcut
Move the cursor to the beginning of the current <Home>
line.
Move the cursor to the end of the current line. <End>
Move the cursor to the beginning of the string. <Ctrl-Home>
Move the cursor to the end of the string. <Ctrl-End>
Cancel text entry. <Esc>
Submit text entry. <Ctrl-Enter>
Open shortcut menu for selected item. <Shift-F10>
Add free label or comment to the project <Double-click open area>
screen.
Find and replace text or objects within a project. <Ctrl-Shift-F>
Find and replace text or objects within a <Ctrl-F>
document.
Action Shortcut
Select multiple objects. <Shift-Click>
Add object to the current selection.
Select all objects. <Ctrl-A>
Move selected objects in grid-sized increments. <Arrow keys>
Move selected objects four grid units. <Shift-Arrow key>
Copy and drag selected object. <Ctrl-Drag>
Copy selected object and move it along one <Ctrl-Shift-Drag>
axis.
Resize selected object while maintaining aspect <Shift-Resize>
ratio.
Resize selected object while maintaining center <Ctrl-Resize>
point.
Resize selected object while maintaining both <Shift-Ctrl-Resize>
aspect ratio and center point.
Create additional blank space along the axis <Ctrl-Drag open area>
you drag the mouse.
58 ni.com
VeriStand
Action Shortcut
Search document for next instance of text or an <Enter>
object. This command is only available when in <F3>
Find mode.
<Ctrl-G>
Search document for previous instance of text <Shift-Enter>
or an object. This command is only available <Shift-F3>
when in Find mode.
<Shift-Ctrl-G>
Cycle through document tabs in the order in <Ctrl-Tab>
which they appear onscreen.
Cycle through document tabs in the opposite <Ctrl-Shift-Tab>
order in which they appear onscreen.
Action Shortcut
Highlight all mappings and nodes connected to <Ctrl+,>
a selected item.
Shift focus to the palette search bar. <Ctrl-Spacebar>
<Ctrl-Alt-Spacebar> for Chinese keyboards
Scroll the document horizontally. <Shift-Mouse Wheel>
Shift focus from one control to another in <Tab>
tabbing order while the code is running.
Shift focus from one control to another in <Shift-Tab>
reverse tabbing order while the code is running.
Pan across the project screen. <Spacebar-Drag>
Deployment Commands
Action Shortcut
Deploy the active system definition. <F6>
Undeploy the active system definition. <F7>
© National Instruments 59
VeriStand
Action Shortcut
Connect to the system definition that is <F8>
currently running on the VeriStand Gateway.
Disconnect from the current running system <F9>
definition. This leaves the VeriStand Gateway
running for other clients.
Help Commands
Action Shortcut
Display the Context Help. <Ctrl-H>
Access additional information on selected item. <F1>
Wiring
Action Shortcut
Delete all broken wires from the diagram. <Ctrl-B>
Delete a wire you are in the process of creating. <Esc>
<Ctrl-Z
Select one wire segment. Single-click wire
Select a wire branch. Double-click wire
Select the entire wire. Triple-click wire
Create a new wire branch from an existing wire. <Ctrl-Click> wire
Tack down the wire segment and start a new Single-click while wiring
wire segment.
End the wire without connecting it to a node. Double-click while wiring
Switch the direction of a wire between <Tap spacebar> while wiring
horizontal and vertical.
Organize the diagram or the selected code to <Ctrl-U>
make it easier to understand.
60 ni.com
VeriStand
Action Shortcut
Expand everything in the selected folder. <*> on the numeric keypad
Expand the selected folder. <+> on the numeric keypad
Collapse the selected folder. <-> on the numeric keypad
Expand the selected folder if it is closed. <Right arrow>
Otherwise, this keyboard shortcut selects the
first child.
Collapse the selected folder if it is open. <Left arrow>
Otherwise, this keyboard shortcut selects the
parent.
Select the item beginning with the entered <Any printable key>
letter(s).
Open the selected document. <Enter>
Rename the selected item. <F2>
Move the selection to the first item in the tree. <Home>
Moves the selection to the last item in the tree. <End>
Move the selection to the first visible item in the <Page up>
tree.
Move the selection to the last visible item in the <Page down>
tree.
Zooming
Action Shortcut
Zoom in and out. <Ctrl-Mouse wheel>
Zoom in. <Ctrl-+>
Zoom out. <Ctrl-->
Zoom to fit. <Ctrl-0>
Zoom to fit the selection. <Ctrl-9>
Related concepts:
© National Instruments 61
VeriStand
■ Host Computer
Note The aliases in this topic refer to locations on disk and are not
related to aliases you define for channels in a system definition file.
<Common Data>
Alias: To Common Doc Dir
<Application Data>
Alias: To Application Data Dir
For internal use only. Certain custom device development tools, including Custom
Device XML and the Device Properties VIs, can reference this directory. However, NI
recommends you avoid storing or modifying files in this directory.
62 ni.com
VeriStand
<Base>
Alias: To Base
<Model Framework>
Alias: None
Related tasks:
■ Creating an Alias
© National Instruments 63
VeriStand
64 ni.com
VeriStand
© National Instruments 65
VeriStand
Related tasks:
66 ni.com
VeriStand
NI Hardware Support
VeriStand supports NI-XNET devices, NI-DAQ devices, and NI FPGA targets.
For the best performance, use NI-DAQ devices that support hardware-timed single
point (HWTSP) I/O or on-demand sampling. Refer to DAQ Devices with Hardware-
Timed Single Point Sampling Mode Support for a list of NI-DAQ devices that
support HWTSP I/O. Refer to the custom device’s GitHub repository for a list of
supported modules.
Note VeriStand does not support HWTSP on cRIOs with DAQmx, such as
904x and 905x. For single-point I/O on these devices, use the Scan Engine
and EtherCAT custom device. Refer to the Scan Engine and EtherCAT
custom device GitHub repository for a list of supported modules.
© National Instruments 67
VeriStand
Supported Targets
VeriStand supports deploying a project to the following targets:
■ PXI/PCI—Any PXI controller with at least 256 MB of RAM.
■ CompactRIO/Single-Board RIO—Any CompactRIO or Single-Board RIO
device with at least 128 MB of RAM.
■ Desktop PC—Any PC running Windows 7, Vista, XP Service Pack 3 or later,
Server 2003 R2 (32-bit), or Server 2008 R2 (64-bit).
Note The files provided for the NI cRIO-9103 are configured for the
NI 9215, NI 9263, NI 9411, and NI 9474 I/O modules.
■ NI PXI/PCI-7811R
■ NI PXI/PCI-7813R
■ NI PXI/PCI-7831R
■ NI PXI/PCI-7833R
■ NI PXI/PCIe-7841R
■ NI PXI/PCIe-7842R
■ NI PXI/PCIe-7851R
■ NI PXI/PCIe-7852R
■ NI PXI-7853R
■ NI PXI-7854R
68 ni.com
VeriStand
© National Instruments 69
VeriStand
■ SCXI-1162HV
■ SCXI-1163
■ SCXI-1163R
■ SCXI-1190
■ SCXI-1191
■ SCXI-1192
■ SCXI-1520
■ SCXI-1530
■ SCXI-1531
■ SCXI-1540
■ SCXI-1581
Related tasks:
■
Adding and Configuring a Hardware Device
Related information:
■ DAQ Devices with Hardware-Timed Single Point Sampling Mode Support
■
Scan Engine and EtherCAT custom device GitHub repository
■ Creating a Custom FPGA Bitfile
1. Open VeriStand.
2. Click Default Project.
3. Enter a Project Name.
4. Select a Location to save the project.
5. Select a System Definition.
70 ni.com
VeriStand
Note If you do not have a system definition, leave this field as None
chosen. VeriStand will create a new system definition file with the
same name as the project.
6. Click Create.
Goal Task
Adding a custom Workspace Tools menu Add items to the Tools menu of the
item to the project file. Workspace to display custom dialog boxes.
Adding custom VIs. Add custom VIs by building a LabVIEW
project into a source distribution.
Adding custom files to the project file. Add custom files, such as documentation, to
the project file.
Connecting multiple hosts to the same Configure one or more host computers to
target. communicate with the same target using the
VeriStand Gateway.
Related tasks:
■ Adding a Standard or Custom Tools Menu Item
■
Adding Custom VIs
■ Adding Custom Files
■
Connecting Multiple Hosts to the Same Target
© National Instruments 71
VeriStand
Use the LabVIEW Application Builder to build a source distribution to call custom VIs
in VeriStand. This creates a local copy of the VI dependencies. For more information,
refer to Introduction to the LabVIEW Application Builder.
When the build finishes, LabVIEW creates the VI and all necessary dependencies in
the destination path.
After building the custom VI, add it to the VeriStand project or to the Tools menu.
Related tasks:
72 ni.com
VeriStand
© National Instruments 73
VeriStand
1. On the host that you want to connect, open the VeriStand Editor.
2. In the Navigation pane, click Project Files.
3. Double-click your project file (.nivsprj) to open it as a new tab.
4. In the Configuration pane, click the Document tab.
5. In Gateway address, enter the IP address of the host running the VeriStand
Gateway.
The host you configured now connects to the instance of the VeriStand Gateway that
runs on the host whose IP address you entered.
Integrating and Executing Models
Use models to mathematically represent real-world systems in your VeriStand
project.
74 ni.com
VeriStand
Simulate both the plant and controller to create a closed-loop control system within
a software model. Use models for signal generation, signal analysis, and control. For
more information on using models in VeriStand, refer to .
If you have problems after integrating your model with VeriStand, refer to .
Related concepts:
■ Models FAQs
■ FMI Support
■ Common Issues with Models in VeriStand
Related tasks:
■ Using Models from C and C++
■ Using Models from Simulink
■ Using Models from LabVIEW VIs
■
Adding and Configuring a Model
© National Instruments 75
VeriStand
Models FAQs
Answers to common questions on models in VeriStand.
76 ni.com
VeriStand
© National Instruments 77
VeriStand
Before you begin, install the VeriStand Model Framework on the computer you are
compiling the model. The framework adds tools you will use during the compile
process.
OS Compiler
Windows Microsoft Visual C++
NI Linux RT x64 C/C++ Development Tools for NI Linux Real-
Time, Eclipse Edition
2. Create a model header file—Create a model.h header file that contains the
type definitions for model properties and all user-visible parameters in your
model.
3. Adapt the template to model code—Use the template.c file that the VeriStand
Model Framework installs as a starting point for your model code.
4. Create a makefile to compile model code—Create a makefile for the compiler
and operating system your model will use.
Note <RootDrive> is the drive where NI software installs and <xxxx> is the
VeriStand version number. If you have problems locating the files, check NI
Package Manager to make sure that the VeriStand Model Framework was
installed.
78 ni.com
VeriStand
The example code contains definitions for both scalar and vector double
parameters.
For information about defining parameters whose data type is something
other than double, refer to the TO DO comments in the template.c file
installed by the VeriStand Model Framework.
3. Save the file.
After creating a model header file, adapt the template to your model code.
Related concepts:
■ Model Framework Components
Related tasks:
© National Instruments 79
VeriStand
1. Browse to <RootDrive>\VeriStand\<xxxx>\ModelInterface\custom\examples,
create a copy of template.c, and give the copy a new name.
File Description
template.c copy Lists the code you must customize, which is
marked with TO DO comments. This file also
contains information about how to
instantiate and access parameters.
ni_modelframework.h Lists definitions for properties of outward-
facing components of your model, such as
inports, outports, parameters, and signals.
After you adapt the template, create a makefile to compile the model.
Creating a Makefile and Compiling Model Code
Create a makefile for the compiler and operating system your model will use.
Before you begin, adapt the C template to your model code and determine which
real-time (RT) operating system your RT target runs. For more information, refer to
Adapting the C Template to Model Code and Real-Time Controllers and Real-
Time Operating System Compatibility.
80 ni.com
VeriStand
For your model code to work with the VeriStand Model Framework, create an
appropriate makefile to compile your model code.
2. Place your model code components in the same directory as the makefile.
3. Place your model framework components, ni_modelframework.h and
ni_modelframework.c, in the same directory as the makefile.
4. Run the makefile to compile your model code.
Related concepts:
■ Model Code Components
■ Model Framework Components
Related tasks:
■ Adapting the C Template to Model Code
Related information:
■ Real-Time Controllers and Real-Time Operating System Compatibility
© National Instruments 81
VeriStand
82 ni.com
VeriStand
Note NI
recommends
installing
Microsoft Visual
Studio 2017 with
C++ Development
option enabled.
The MATLAB software command window displays the status of the build process
and indicates when the Simulink Coder software has completed compiling the
model.
© National Instruments 83
VeriStand
84 ni.com
VeriStand
Note <RootDrive> is the drive where NI software installs and <xxxx> is the
VeriStand version number.
Note You must name the file model.h and include all user-visible
parameters in your model.
© National Instruments 85
VeriStand
Related tasks:
■ Creating a Model Header File
■
Adapting the C Template to Model Code
Model Framework and Model Code Interaction
When you run your VeriStand or Model Interface Toolkit test application, the
application executes functions that the VeriStand Model Framework files define.
These functions call functions in your model code, which convert user-defined data
types, initialize your model, and increment a time step in VeriStand.
The following illustration shows how NI software, the Model Framework API, and
code in your model interact.
86 ni.com
VeriStand
Your test application calls a function that the Model Framework exports. The
exported function calls a function in your model code. As the model executes, the
test application can interact with the model in the following ways:
■ Writing data to model inports
■ Reading data from model outports
■ Allowing you to adjust model parameter values
■ Allowing you to probe model signals
How VeriStand Imports Simulink Models using the Model Framework
VeriStand identifies inports, outports, parameters, and signals in models you
created in Simulink software according to their configuration in Simulink.
A simple model in Simulink might contain the following components.
© National Instruments 87
VeriStand
When you add this model to a system definition in VeriStand, its components appear
as shown in the following table.
Signal Importing
Certain optimizations you enable in Simulink can make a signal unavailable in
VeriStand. You can disable these options for the entire model to make all signals
available for probing, but the memory footprint of the model increases as a result.
Alternatively, you can mark individual signals as test points in Simulink to maintain
a reduced memory footprint while keeping the test-point signals available for
probing.
Note If you mark new signals as test points, you must recompile your
model.
Parameter Importing
Compiled models contain one of two types of parameters in VeriStand:
88 ni.com
VeriStand
© National Instruments 89
VeriStand
When you add this model to a system definition in VeriStand, its components appear
as shown in the following table.
Signal Importing
To import signals, enable the signal for export before compiling the model. In
Simulink, navigate to Code Generation » Interface to enable signal export and
designate the required signals as test points.
Note VeriStand does not support the use of virtual buses as signals.
90 ni.com
VeriStand
Parameter Importing
Simulink variables that are defined in the model workspace, Base Workspace, or in a
data dictionary will be available as parameters in VeriStand if they meet the
following requirements.
■ They are of a supported datatype.
■ They are referenced by at least one Simulink block or Model Mask.
© National Instruments 91
VeriStand
You can convert LabVIEW VIs or simulation subsystems you create using the
LabVIEW Control Design and Simulation Module. The converted files add system
simulation, closed-loop control, and other functionality to VeriStand applications.
92 ni.com
VeriStand
© National Instruments 93
VeriStand
Note For a list of real-time targets and the real-time operating systems
(RTOS) that each runs, see Real-Time Controllers and Real-Time
Operating System Compatibility.
94 ni.com
VeriStand
© National Instruments 95
VeriStand
You can use FMI to decouple modeling environments from model consumers. This
decoupling helps create tool-agnostic, portable solutions between modeling and
simulation environments. For more information, refer to the FMI website.
The FMI standard defines two model interaction patterns:
1. Model Exchange—The package contains the mathematical representation of
the model and the simulation environment solves the equations of the model
2. Co-Simulation—The model contains the solver for the model and can directly
provide outputs based on inputs and time slice.
FMI also defines the distribution packaging of the model and decouples the
interface description from the actual model binaries. You can have support for
several platforms, like Windows 32-bit and 64-bit, Linux 32-bit and 64-bit, and
source code, in the same package. A model that implements this interface is called a
Functional Mockup Unit (FMU).
Related information:
■
FMI
Model Configuration and Execution Support
VeriStand enables configuration and execution of FMI 2.0 CoSimulation models on
Windows and NI Real-Time Linux 64-bit systems. This support requires FMUs to have
the proper executable binaries available.
Supported modeling environments include:
■ AVL Boost
■ FMU SDK
■ Wolfram SystemModeler
■ MapleSim
■ Altair Activate
96 ni.com
VeriStand
Model Configuration
You can use the same general model import and configuration steps in System
Explorer to import FMUs into VeriStand.
The following table displays how a variable appears based on its causality when a
FMU is imported into VeriStand.
Model Execution
The following table displays the model execution target architectures that FMI Early
Access supports on the NI platform.
© National Instruments 97
VeriStand
Note Configuring log level greater than 1 can degrade the performance of
the system.
98 ni.com
VeriStand
■ All FMI numeric data types are supported but cast to doubles internally.
■ String variables are not accessible.
■A DefaultExperiment section with a non-zero stepSize is mandatory.
Models without the DefaultExperiment section will fail to run.
Note You can find execution channels for a model in the configuration
tree by clicking Targets » Controller » Simulation Models » Models,
selecting a model, and clicking Execution.
© National Instruments 99
VeriStand
You can also use system channels to monitor the system while it is deployed and
running.
Related concepts:
■ Model Command
■
Model Status
■ Model Time
■ Time Step Duration
Related tasks:
■ Adding and Configuring a Model
■ Adding and Configuring Controls and Indicators
Related reference:
■ System Channels
Model Command
Use the Model Command channel to change the model execution state at run time.
If you configured your model to be initially paused, you can use this channel to start
it. If your model gets into a desirable state for testing purposes, you can pause the
model, save that state to a file, and then restore the state later.
Refer to the following table to determine what values VeriStand associates with
each status.
Value Status
0 Start the model.
100 ni.com
VeriStand
Value Status
Model Status
Use the Model Status channel to monitor how the model is operating at run time.
The Model Status channel returns the model's state, such as running, resetting, and
stopped.
Refer to the following table to determine what values VeriStand associates with
each status.
Value Status
0 Running
1 Paused
2 Resetting
3 Idle
4 Stopped
5 Restoring
6 Saving
Model Time
Use the Model Time channel to verify that the model is running at the correct rate.
You can compare the model time to the value of the System Time system channel to
determine if the model is executing slower or faster than real time.
The following equation describes how the VeriStand Engine determines the rate to
execute each model.
Issue Solutions
Model is crashing Models often crash when an inport receives a value of 0 and the
model attempts to divide by the inport value. This issue will
occur during deployment if the initial state of the model is to run
and the default value for an inport is 0. Depending on your
system, complete the following troubleshooting solutions:
102 ni.com
VeriStand
Issue Solutions
■ Change the default value for the inport.
■ Rewrite the model to remove the possibility of dividing
by 0.
■ Change the initial state of the model to be paused in
System Explorer and implement a start-up procedure that
ensures that the inport values are acceptable before you
start the model.
Model runs too fast or slow If your model is unstable because it runs too fast or too slow,
ensure the actual model rate matches the rate at which the
model was compiled to run. If the rates do not match, adjust the
settings that determine the actual model rate until the following
expressions are correct:
actual model rate = compiled model rate
Model generated data is If other parts of your system that are mapped to your model do
delayed not receive data when you expect, consider adjusting the
following system definition settings:
■ PCL execution mode—Change the execution mode to
low latency if data from models must be available for
mapping during the same PCL iteration the model
generates the data. The default mode, parallel, applies a
one-cycle delay between when a model executes and
when the data it produces is available for mapping.
■ Execution order—Multiple models in a system execute in
parallel unless you define an execution order. If you map
Issue Solutions
an outport from one model to an inport of a second model
and you want the second model to wait until the first
model finishes executing before it runs, you must define
the execution order.
Decreased system performance If you suspect that models are causing your system to run slower
than you desire, consider the following solutions to improve
performance:
■ Import only parameters and signals your system
requires. Importing many parameters and signals can
have a negative impact on the performance of the model
even if the model is not running.
■ If you do not need data from models to be available to
the rest of the system on the same iteration of the PCL, set
the PCL execution mode to parallel instead of low latency.
Parallel mode causes a one-cycle delay between when a
model executes and when the data it produces is available
to the system, but increases the execution speed of the
entire system.
104 ni.com
VeriStand
Before you begin, you must create a new system definition file.
The system definition file contains the configuration settings of the VeriStand
Engine, such as the system rate and the list of channels.
Goal Task
Adding and activating a system definition Reuse or add new system definition files to
file VeriStand projects.
Versioning a system definition file Create and test modifications to your system
definition file by duplicating the file in the
VeriStand Editor.
Connecting to a target system definition Connect to the target's deployed system
definition to send and receive data.
Specifying a target Select a target and designate its name,
operating system, and IP address.
Configuring the VeriStand Engine Control the timing of the system and the
communication between the target and host
computer.
Adding and configuring a procedure Set the actions the VeriStand Engine
executes in response to an alarm, when
called from another procedure, or as a
startup procedure.
Adding and configuring an alarm Notify users when a channel value is outside
a specified range.
Adding and configuring a hardware device Add and configure NI hardware, timing and
sync devices, and custom devices.
Scaling a channel on hardware devices Create scales to convert hardware channel
unit measurements to transducer/actuator
scaled units.
Adding and configuring a custom device Add and configure third-party custom
devices to execute user-defined actions,
determined by LabVIEW VIs.
Adding and configuring a model Connect a model to other parts of the
system and run the model on a hardware
target.
Goal Task
Adding a user channel Store a single value as a user channel to use
as a variable in procedures, stimulus
profiles, and other operations.
Adding a calculated channel Produce a new value based on calculations
performed on other channels in the system
using the Mapping Diagram.
Creating an alias Set an alternate name for channels in a
system definition file.
Mapping channels and aliases Connect channels or aliases to one another.
Related tasks:
■ Creating a New System Definition File
■ Adding and Activating a System Definition File
■ Versioning a System Definition File
■ Connecting to a Target System Definition
■
Specifying a Target
■
Configuring the VeriStand Engine
■ Adding and Configuring a Procedure
■ Adding and Configuring Alarms
■
Adding and Configuring a Hardware Device
■ Scaling a Channel on Hardware Devices
■
Adding and Configuring a Custom Device
■ Adding and Configuring a Model
■
Adding a User Channel
■ Adding a Calculated Channel
■ Creating an Alias
■
Mapping Channels and Aliases
106 ni.com
VeriStand
1. Open VeriStand.
2. Create or open a VeriStand project.
3. Click Configure... to open System Explorer.
4. Click File » New to open the New System Definition dialog box.
5. Enter a System Definition name.
6. Click OK.
Related tasks:
■ Creating a New Project
108 ni.com
VeriStand
Specifying a Target
Select a target and designate its name, operating system, and IP address.
Update the target specification when reusing a system definition with a new real-
time target.
Note The Select Target drop-down only appears when you have
more than one target in your system definition.
4. Use the Controller Configuration page that appears to the right of the tree to
configure the VeriStand Engine.
5. Save the system definition file.
Related concepts:
■
VeriStand Engine
■ Primary Control Loop Execution Steps
Now that you have added a procedure, you can call that procedure from multiple
alarms.
Calling One Procedure from Multiple Alarms
Configure an Alarm Command step to trigger an alarm that executes a procedure
without resetting/disabling the alarm and exiting the subroutine.
110 ni.com
VeriStand
Note The Alarm field should be grayed out, indicating that the step
will execute for the calling alarm. If it is not, enable Apply settings
to the alarm that tripped this procedure.
Related reference:
■ VeriStand Environment
Adding an Alarm
Add alarms to notify users that the value of a channel is outside a specified range or
to trigger a procedure.
112 ni.com
VeriStand
6. Click OK. The new alarm appears under Alarms or in the subfolder you
selected.
After adding an alarm, you can right-click the alarm and select Add status
channel. Use a status channel to monitor when an alarm triggers or clears.
Related tasks:
■ Setting an Alarm Priority
■ Assigning an Alarm Group
Assigning an Alarm Group
Assign an alarm group to execute one alarm procedure at a time.
Alarm groups are used to determine the execution order of re-arm procedures. You
can assign alarms to different groups. If a system definition file contains multiple
alarm groups, one procedure per alarm group executes simultaneously.
Note One alarm group is automatically created for each alarm that
uses procedural re-arm behavior. All alarms default to group 0.
7. Click OK.
8. Save the system definition file.
Alarm Group Execution
Alarm groups and priorities determine when procedures execute.
Only one alarm procedure executes at a time in an alarm group.
Use the following table to learn the execution order of procedures based on the
order of the alarms.
Note If an alarm is set to Indicate Only mode, the alarm trips when the
monitored channel goes out of range but does not execute a procedure.
114 ni.com
VeriStand
Note Zero (0) is the highest priority number. For more information
on priority execution, refer to .
6. Click OK.
7. Save the system definition file.
Related concepts:
■ Alarm Group Execution
Triggering an Alarm for a Specific Channel Value
Create an alarm that trips when a channel reaches an exact value.
116 ni.com
VeriStand
Goal Task
Adding and configuring an SLSC device Use SLSC devices to introduce signal
conditioning and fault insertion into a real-
time testing scheme.
Adding and configuring DAQ devices Use DAQ devices to support analog, digital,
and counter I/O functions such as acquiring
waveform data.
Adding NI FPGA targets Use NI FPGA targets to create customizable
I/O, help with data preprocessing and
postprocessing, add high-speed closed-loop
control, and simulate a variety of sensors for
hardware-in-the-loop testers
Adding NI-XNET devices Use the NI-XNET platform to communicate
with hardware using the CAN, LIN, and
FlexRay protocols.
Adding reflective memory networks Use a reflective memory card to split up a
simulation model to execute simultaneously
on different target systems.
Adding and configuring timing and sync Use a timing and sync device to synchronize
devices more than one chassis.
Synchronizing hardware and software Synchronize the hardware and software
components of a system to ensure
consistency and optimal performance,
enable data analysis, and time correlation.
Setting chassis master hardware Use a chassis master hardware
synchronization devices synchronization device to control the
synchronization of all hardware in a chassis.
8. Click OK.
9. In the configuration tree, navigate to SLSC Chassis » Modules under your
SLSC chassis.
10. Use the drop-down menus under SLSC Modules Settings to select the
modules in each of the chassis slots.
11. Save the system definition file.
Related concepts:
■ SLSC Systems in Real-Time Schemes
SLSC Systems in Real-Time Schemes
A SLSC system is composed of chassis and module devices.
A SLSC chassis interfaces with the network and provides multiple slots for SLSC
modules. A SLSC module contains circuitry for switching, loads, and signal
conditioning.
The device under test and the measurement device send signals to the SLSC system
for signal conditioning. The SLSC system passes the signals on to the next stage in
the real-time scheme. Signals can pass back and forth through this process from
either the measurement device or the device under test. The direction of the signals
depends on the set up of the real-time scheme.
SLSC devices are assigned names using the following user-defined format.
118 ni.com
VeriStand
All
a. Click Hardware Discovery Wizard
and follow the onscreen instructions.
b. Right-click a device and select Add
Channels to display the Add DAQ
Channels dialog box.
5. Use the Add DAQ Channels dialog box to configure the type of physical
channel to add and their properties.
Note For analog input channels, you must choose to acquire the
signal a single point at a time or over a period of time as waveform.
6. Click Next.
7. Select the specific channels on the device you want to add to the system
definition.
Note If the DAQ device does not contain channels of the type you
specified, such as AO or DI, no channels are available to select.
8. Click Finish.
9. Save the system definition file.
After you add a DAQ device, you can add and configure more channels. Add an
internal channel to a DAQ device by right-clicking the device and selecting Add
Internal Channel.
You can also add a SCXI module to a DAQ device by right-clicking the device and
selecting Add SCXI Modules. Use the Add SCXI Module dialog box to configure the
module.
Adding and Configuring DAQ Device Channels
Define how VeriStand performs measurements using DAQ channels.
Before you begin, add a DAQ device.
Each measurement type has configurable properties. For example, counter input
channels that count up have a count edge property that sets whether the channel
counts rising edges or falling edges.
Note Some properties are only available on certain devices. Refer to the
documentation for your hardware device to find out what properties your
device supports.
120 ni.com
VeriStand
6. In the Add DAQ Channels dialog box, use the Select channel type to add
pull-down to select the channel type.
7. Use the Select measurement type pull-down to select the measurement
type.
8. Click Next.
9. Select the channel(s) you want to add and click Finish.
Note If the DAQ device does not contain channels of the type you
specified, no channels are available to select.
122 ni.com
VeriStand
Property/Section Description
Minimum Value The minimum value you expect to measure
before VeriStand performs any scaling or
calibration.
Maximum Value The maximum value you expect to measure
before VeriStand performs any scaling or
calibration.
Input Configuration Specifies the input terminal configuration to
apply to the device channels.
Property/Section Description
■ NRSE—Non-referenced single-ended
mode.
■ Differential—Differential mode.
■Pseudodifferential—Pseudodifferential
mode.
124 ni.com
VeriStand
Property/Section Description
Minimum Value The minimum value you expect to measure
before VeriStand performs any scaling or
calibration.
Maximum Value The maximum value you expect to measure
before VeriStand performs any scaling or
calibration.
Bridge Configuration Specifies what type of bridge configuration to
use:
■ Full Bridge
■ Half Bridge
■ Quarter Bridge
Property/Section Description
Shunt Element Location Specifies the location of the shunt resistor:
■ R1—Between Vch- and Vex+
■ R2—Between Vch- and Vex-
■ R3—Between Vch+ and Vex-
■ R4—Between Vch+ and Vex+
Filter Cutoff Frequency (supported devices only) Specifies the cutoff frequency of the digital
filter.
In-Situ Calibration (supported devices only) Specifies whether to perform an in-situ
calibration and when to perform the calibration:
■ Before deployment—Perform an in-
situ calibration before the system
definition is deployed.
■ After undeployment—Perform an in-
situ calibration after the system definition
is no longer deployed.
■ Both—Perform an in-situ calibration
before the system definition is deployed
and after the system definition is no
longer deployed.
126 ni.com
VeriStand
Property/Section Description
■ None—Do not perform an in-situ
calibration.
In-Situ Minimum Value (supported devices only) The minimum value you expect to measure
when VeriStand performs an in-situ calibration.
In-Situ Maximum Value (supported devices The maximum value you expect to measure
only) when VeriStand performs an in-situ calibration.
In-Situ Input Configuration (supported devices Specifies the input terminal configuration to
only) use when performing the in-situ calibration:
■ Same as device—The same
configuration specified for the DAQ device
itself. To set the input terminal
configuration at the device level, use the
Input Configuration pull-down menu
on the DAQ Device Configuration page.
■ Default—At run time, NI-DAQmx
chooses the default terminal
configuration for the channel.
■ RSE—Referenced single-ended mode.
■NRSE—Non-referenced single-ended
mode.
■ Differential—Differential mode.
■Pseudodifferential—Pseudodifferential
mode.
Property/Section Description
Minimum Value The minimum value you expect to measure
before VeriStand performs any scaling or
calibration.
Maximum Value The maximum value you expect to measure
before VeriStand performs any scaling or
calibration.
Property/Section Description
Input Configuration Specifies the input terminal configuration to
apply to the device channels.
Related information:
■ NI-DAQmx Common Applications
Force Channel Properties (AI)
Configure analog input (AI) channel properties to measure force.
For more information on measuring force, refer to the NI-DAQmx Manual.
128 ni.com
VeriStand
Property/Section Description
Minimum Value The minimum value you expect to measure
before VeriStand performs any scaling or
calibration.
Maximum Value The maximum value you expect to measure
before VeriStand performs any scaling or
calibration.
Bridge Configuration Specifies what type of bridge configuration to
use:
■ Full Bridge
■ Half Bridge
■ Quarter Bridge
Property/Section Description
Scale: 1st Physical Value Specifies the physical value that corresponds to
the first electrical value.
Scale: 2nd Electrical Value Specifies the second electrical value used to
calculate the slope and y-intercept of a two-
point linear equation to scale electrical values
to physical values.
Scale: 2nd Physical Value Specifies the physical value that corresponds to
the second electrical value.
Filter Type (supported devices only) Specifies whether to apply a digital filter to the
input signal:
■ Disabled—No filter.
■ Lowpass—Eliminates all signal
frequency components above the cutoff
frequency.
Filter Cutoff Frequency (supported devices only) Specifies the cutoff frequency of the digital
filter.
Related information:
■
NI-DAQmx Common Applications
Pressure Channel Properties (AI)
Configure analog input (AI) channel properties to measure pressure.
For more information on measuring pressure, refer to the NI-DAQmx Manual.
Property/Section Description
Minimum Value The minimum value you expect to measure
before VeriStand performs any scaling or
calibration.
Maximum Value The maximum value you expect to measure
before VeriStand performs any scaling or
calibration.
Bridge Configuration Specifies what type of bridge configuration to
use:
■ Full Bridge
■ Half Bridge
130 ni.com
VeriStand
Property/Section Description
■ Quarter Bridge
Property/Section Description
■ Lowpass—Eliminates all signal
frequency components above the cutoff
frequency.
Filter Cutoff Frequency (supported devices only) Specifies the cutoff frequency of the digital
filter.
Related information:
■ NI-DAQmx Common Applications
RTD Channel Properties (AI)
Configure analog input (AI) channel properties to measure temperature from a
Resistance Temperature Detector (RTD).
Platinum RTDs use a linearization curve known as the Callendar-Van Dusen
equation to measure the temperature of RTDs. For more information on measuring
temperature, refer to the NI-DAQmx Manual.
Property/Section Description
Minimum Value The minimum value you expect to measure
before VeriStand performs any scaling or
calibration.
Maximum Value The maximum value you expect to measure
before VeriStand performs any scaling or
calibration.
Resistance Configuration Specifies the number of wires to use for
resistive measurements:
■ 2-Wire
■ 3-Wire
■ 4-Wire
132 ni.com
VeriStand
Property/Section Description
■ None—Supply no excitation to the
channel.
For both internal and external current excitation
sources, you must use the Excitation Value
property.
RTD Type Specifies the type of RTD connected to the
channel:
■ Custom—Use a custom RTD. You must
use the three Custom RTD Const
properties to supply the coefficients for
the Callendar-Van Dusen equation.
■ Pt3750
■ Pt3851
■ Pt3911
■ Pt3916
■ Pt3920
■ Pt3928
Property/Section Description
when you use a custom RTD and specify
Custom for the RTD Type property.
Related information:
■ Callendar-Van Dusen Equation
■ NI-DAQmx Common Applications
■ 2-Wire Resistance
■
3-Wire Resistance
■ 4-Wire Resistance
Strain Channel Properties (AI)
Configure analog input (AI) channel properties to measure strain.
For more information on measuring strain, refer to the NI-DAQmx Manual.
Property/Section Description
Minimum Value The minimum value you expect to measure
before VeriStand performs any scaling or
calibration.
Maximum Value The maximum value you expect to measure
before VeriStand performs any scaling or
calibration.
Strain Configuration Specifies what type of bridge configuration to
use for the strain gages. For more information,
refer to Bridge Configurations in the NI-DAQmx
Manual.
■ Full Bridge I
■ Full Bridge II
■ Full Bridge III
■ Half Bridge I
■ Half Bridge II
■ Quarter Bridge I
■ Quarter Bridge II
134 ni.com
VeriStand
Property/Section Description
■ External—Use an external excitation
source instead of the built-in excitation
source of the device.
■ Internal—Use the built-in excitation
source of the device.
■ None—Supply no excitation to the
channel.
For both internal and external excitation
sources, you must use the Excitation Value
property.
Excitation Value Specifies the amount of excitation supplied to
the sensor. Refer to the sensor documentation
to determine this value.
Lead Resistance Specifies the amount of resistance in the lead
wires. Ideally, this value is the same for all leads.
Initial Bridge Voltage Specifies the output voltage of the bridge in the
unloaded condition. VeriStand subtracts this
value from any measurements before applying
scaling equations. Perform a voltage
measurement on the bridge with no strain
applied to determine this value.
Gage Factor Specifies the sensitivity of the strain gages and
relates the change in electrical resistance to the
change in strain. Each gage in the bridge must
have the same gage factor. Refer to the sensor
documentation to determine this value.
Nominal Gage Resistance Specifies the resistance of the gages in an
unstrained position. Each gage in the bridge
must have the same nominal gage resistance.
The resistance across arms of the bridge that do
not have strain gages must also be the same as
the nominal gage resistance. Refer to the sensor
documentation to determine this value.
Poisson Ratio Specifies the ratio of lateral strain to axial strain
in the material you are measuring.
Enable Offset Null Specifies whether to perform a bridge offset
nulling calibration.
Property/Section Description
Enable Shunt Calibration Specifies whether to perform a shunt
calibration.
Shunt Element Location Specifies the location of the shunt resistor:
■ R1—Between Vch- and Vex+
■ R2—Between Vch- and Vex-
■ R3—Between Vch+ and Vex-
■ R4—Between Vch+ and Vex+
Filter Cutoff Frequency (supported devices only) Specifies the cutoff frequency of the digital
filter.
In-Situ Calibration (supported devices only) Specifies whether to perform an in-situ
calibration and when to perform the calibration:
■ Before deployment—Perform an in-
situ calibration before the system
definition is deployed.
■ After undeployment—Perform an in-
situ calibration after the system definition
is no longer deployed.
■ Both—Perform an in-situ calibration
before the system definition is deployed
136 ni.com
VeriStand
Property/Section Description
and after the system definition is no
longer deployed.
■ None—Do not perform an in-situ
calibration.
In-Situ Minimum Value (supported devices only) The minimum value you expect to measure
when VeriStand performs an in-situ calibration.
In-Situ Maximum Value (supported devices The maximum value you expect to measure
only) when VeriStand performs an in-situ calibration.
In-Situ Input Configuration (supported devices Specifies the input terminal configuration to
only) use when performing the in-situ calibration:
■ Same as device—The same
configuration specified for the DAQ device
itself. To set the input terminal
configuration at the device level, use the
Input Configuration pull-down menu
on the DAQ Device Configuration page.
■ Default—At run time, NI-DAQmx
chooses the default terminal
configuration for the channel.
■ RSE—Referenced single-ended mode.
■NRSE—Non-referenced single-ended
mode.
■ Differential—Differential mode.
■Pseudodifferential—Pseudodifferential
mode.
Related information:
■ NI-DAQmx Common Applications
■ Bridge Configurations
Thermistor Iex Channel Properties (AI)
Configure analog input (AI) channel properties to measure current excitation
temperature using a thermistor.
Property/Section Description
Minimum Value The minimum value you expect to measure
before VeriStand performs any scaling or
calibration.
Maximum Value The maximum value you expect to measure
before VeriStand performs any scaling or
calibration.
Resistance Configuration Specifies the number of wires to use for
resistive measurements:
■ 2-Wire
■ 3-Wire
■ 4-Wire
138 ni.com
VeriStand
Property/Section Description
B Specifies the B constant for the Steinhart-Hart
thermistor equation. Refer to the sensor
documentation to determine values for these
constants.
C Specifies the C constant for the Steinhart-Hart
thermistor equation. Refer to the sensor
documentation to determine values for these
constants.
Related information:
■ Thermistors
■ NI-DAQmx Common Applications
Thermistor Vex Channel Properties (AI)
Configure analog input (AI) channel properties to measure voltage excitation
temperature using a thermistor.
NI-DAQmx scales the resistance of a thermistor to a temperature using the Steinhart-
Hart thermistor equation. For more information on measuring temperature, refer to
the NI-DAQmx Manual.
Property/Section Description
Minimum Value The minimum value you expect to measure
before VeriStand performs any scaling or
calibration.
Maximum Value The maximum value you expect to measure
before VeriStand performs any scaling or
calibration.
Resistance Configuration Specifies the number of wires to use for
resistive measurements:
■ 2-Wire
■
3-Wire
■ 4-Wire
Property/Section Description
■ External—Use an external excitation
source instead of the built-in excitation
source of the device.
■ Internal—Use the built-in excitation
source of the device.
■ None—Supply no excitation to the
channel.
For both internal and external current excitation
sources, you must use the Current Excitation
Value property.
r1 Specifies the value of the reference resistor.
Excitation Value Specifies the amount of excitation supplied to
the sensor. Refer to the sensor documentation
to determine this value.
A Specifies the A constant for the Steinhart-Hart
thermistor equation. Refer to the sensor
documentation to determine values for these
constants.
B Specifies the B constant for the Steinhart-Hart
thermistor equation. Refer to the sensor
documentation to determine values for these
constants.
C Specifies the C constant for the Steinhart-Hart
thermistor equation. Refer to the sensor
documentation to determine values for these
constants.
Related information:
■ Thermistors
■ NI-DAQmx Common Applications
Thermocouple Channel Properties (AI)
Configure analog input (AI) channel properties to measure temperature using a
thermocouple.
140 ni.com
VeriStand
Property/Section Description
Minimum Value The minimum value you expect to measure
before VeriStand performs any scaling or
calibration.
Maximum Value The maximum value you expect to measure
before VeriStand performs any scaling or
calibration.
Thermocouple Type Specifies the type of thermocouples connected
to the channel. Thermocouple types differ in
composition and measurement range.
■ B—B-type thermocouple.
■ E—E-type thermocouple.
■ J—J-type thermocouple.
■ K—K-type thermocouple.
■ N—N-type thermocouple.
■ R—R-type thermocouple.
■ S—S-type thermocouple.
■ T—T-type thermocouple.
Related information:
■ Signal Conditioning Requirements for Thermocouples
■
Thermocouples
Torque Channel Properties (AI)
Configure analog input (AI) channel properties to measure torque.
For more information on measuring torque, refer to the NI-DAQmx Manual.
Property/Section Description
Minimum Value The minimum value you expect to measure
before VeriStand performs any scaling or
calibration.
Maximum Value The maximum value you expect to measure
before VeriStand performs any scaling or
calibration.
Bridge Configuration Specifies what type of bridge configuration to
use:
■ Full Bridge
■ Half Bridge
■ Quarter Bridge
142 ni.com
VeriStand
Property/Section Description
Electrical Units Specifies from which electrical unit to scale the
data. Select the same unit that the sensor data
sheet or calibration certificate uses for electrical
values.
Scale: 1st Electrical Value Specifies the first electrical value used to
calculate the slope and y-intercept of a two-
point linear equation to scale electrical values
to physical values.
Scale: 1st Physical Value Specifies the physical value that corresponds to
the first electrical value.
Scale: 2nd Electrical Value Specifies the second electrical value used to
calculate the slope and y-intercept of a two-
point linear equation to scale electrical values
to physical values.
Scale: 2nd Physical Value Specifies the physical value that corresponds to
the second electrical value.
Filter Type (supported devices only) Specifies whether to apply a digital filter to the
input signal:
■ Disabled—No filter.
■ Lowpass—Eliminates all signal
frequency components above the cutoff
frequency.
Filter Cutoff Frequency (supported devices only) Specifies the cutoff frequency of the digital
filter.
Related information:
■ NI-DAQmx Common Applications
Voltage Channel Properties (AI)
Configure analog input (AI) channel properties to measure voltage.
For more information on measuring voltage, refer to the NI-DAQmx Manual.
Property/Section Description
Minimum Value The minimum value you expect to measure
before VeriStand performs any scaling or
calibration.
Property/Section Description
Maximum Value The maximum value you expect to measure
before VeriStand performs any scaling or
calibration.
Input Configuration Specifies the input terminal configuration to
apply to the device channels.
Filter Type (supported devices only) Specifies whether to apply a digital filter to the
input signal:
■ Disabled—No filter.
■ Lowpass—Eliminates all signal
frequency components above the cutoff
frequency.
144 ni.com
VeriStand
Property/Section Description
Filter Cutoff Frequency (supported devices only) Specifies the cutoff frequency of the digital
filter.
In-Situ Calibration (supported devices only) Specifies whether to perform an in-situ
calibration and when to perform the calibration:
■ Before deployment—Perform an in-
situ calibration before the system
definition is deployed.
■ After undeployment—Perform an in-
situ calibration after the system definition
is no longer deployed.
■ Both—Perform an in-situ calibration
before the system definition is deployed
and after the system definition is no
longer deployed.
■ None—Do not perform an in-situ
calibration.
In-Situ Minimum Value (supported devices only) The minimum value you expect to measure
when VeriStand performs an in-situ calibration.
In-Situ Maximum Value (supported devices The maximum value you expect to measure
only) when VeriStand performs an in-situ calibration.
In-Situ Input Configuration (supported devices Specifies the input terminal configuration to
only) use when performing the in-situ calibration:
■ Same as device—The same
configuration specified for the DAQ device
itself. To set the input terminal
configuration at the device level, use the
Input Configuration pull-down menu
on the DAQ Device Configuration page.
■ Default—At run time, NI-DAQmx
chooses the default terminal
configuration for the channel.
■ RSE—Referenced single-ended mode.
■NRSE—Non-referenced single-ended
mode.
■ Differential—Differential mode.
Property/Section Description
■ Pseudodifferential—Pseudodifferential
mode.
Lowpass Cutoff Filter Frequency (supported Specifies the frequency that corresponds to the
devices only) -3dB cutoff of the analog filter.
Related information:
■
NI-DAQmx Common Applications
Current Channel Properties (AO)
Configure analog output (AO) channel properties to generate current.
For more information on generating current, refer to the NI-DAQmx Manual.
Property/Section Description
Minimum Value The minimum value you expect to measure
before VeriStand performs any scaling or
calibration.
Maximum Value The maximum value you expect to measure
before VeriStand performs any scaling or
calibration.
Related information:
■ NI-DAQmx Common Applications
Voltage Channel Properties (AO)
Configure analog output (AO) channel properties to generate voltage.
For more information on generating voltage, refer to the NI-DAQmx Manual.
Property/Section Description
Minimum Value The minimum value you expect to measure
before VeriStand performs any scaling or
calibration.
146 ni.com
VeriStand
Property/Section Description
Maximum Value The maximum value you expect to measure
before VeriStand performs any scaling or
calibration.
Related information:
■ NI-DAQmx Common Applications
Digital Input Channel Properties (DI)
Configure DI channel properties to measure digital signals.
For more information on measuring digital signals, refer to the NI-DAQmx Manual.
Property/Section Description
Invert Lines Specifies whether to reverse digital line polarity:
■ False—Do not invert lines.
■ True—Invert lines.
■ Same as port—Use the same option
as the port that contains the channel. To
set this option, on the Port Configuration
page, click Invert digital lines.
Related information:
■ NI-DAQmx Common Applications
Digital Output Channel Properties (DO)
Configure DO channel properties to generate digital signals.
For more information on generating digital signals, refer to the NI-DAQmx Manual.
Property/Section Description
Invert Lines Specifies whether to reverse digital line polarity:
■ False—Do not invert lines.
Property/Section Description
■ True—Invert lines.
■ Same as port—Use the same option
as the port that contains the channel. To
set this option, on the Port Configuration
page, click Invert digital lines.
Related information:
■ NI-DAQmx Common Applications
Count Up/Count Down Channel Properties (CI)
Configure counter input (CI) channel properties to count the rising or falling edges
of a digital signal.
For more information on counting edges, refer to the NI-DAQmx Manual.
Property/Section Description
Count Edge Specifies on which edges of the input signal to
increment or decrement the count:
■ Falling—Count falling edges.
■ Rising—Count rising edges.
Note For device specific information about the default terminals used for
counter measurements and generations, refer to Connecting Counter
Signals.
148 ni.com
VeriStand
Related information:
■ NI-DAQmx Manual
■
NI-DAQmx: Connecting Counter Signals
Frequency Channel Properties (CI)
Configure counter input (CI) channel properties to measure the frequency of a
digital signal.
VeriStand measures the frequency of a digital signal by counting observed edges
and performing a software calculation over a period of time determined by your
expected frequency range.
Note This method uses a software calculation that may not provide the
most reliable accuracy or update rate. Alternatively, if your DAQ card
supports Pulse Measurement, use values from the Frequency channel
located under the counter channels in System Explorer.
Property/Section Description
Minimum Value The minimum value you expect to measure
before VeriStand performs any scaling or
calibration.
Note For device specific information about the default terminals used for
counter measurements and generations, refer to Connecting Counter
Signals.
Related reference:
■
Pulse Measurement Channel Properties (CI)
Position Channel Properties (CI)
Configure counter input (CI) channel properties for channels that use a linear
encoder to measure linear position.
For more information on encoders and measuring linear displacement, refer to
Encoders and Measuring Linear Displacement in the NI-DAQmx Manual.
Property/Section Description
Z Index Mode Specifies the states at which signal A and signal
B must be while signal Z is high for VeriStand to
reset the measurement.
150 ni.com
VeriStand
Property/Section Description
When signal Z transitions to high and how long
it stays high varies from encoder to encoder.
Refer to the documentation for the encoder to
determine the timing of signal Z with respect to
signal A and signal B.
Decoding Specifies how to count and interpret the pulses
the encoder generates on signal A and signal B.
X1, X2, and X4 are valid for quadrature encoders
only.
■ 2 Pulse Counting—Increment the
count on rising edges of signal A.
Decrement the count on rising edges of
signal B. If you select this value, the Z
Index Mode property is ignored.
■ X1—If signal A leads signal B, count the
rising edges of signal A. If signal B leads
signal A, count the falling edges of signal
A.
■ X2— Count the rising and falling edges
of signal A
■ X4—Count the rising and falling edges
of signal A and signal B.
Note For device specific information about the default terminals used for
counter measurements and generations, refer to Connecting Counter
Signals.
Related information:
■
Measuring Linear Displacement
■ NI-DAQmx Common Applications
■ Encoders
Pulse Measurement Channel Properties (CI)
Configure counter input (CI) channel properties to measure pulse specifications.
A pulse specification is a pairing of high time and low time values.
Note If you assign this measurement type to one or more counter input
channels, you cannot assign a different measurement type to other
counter input channels on the same device.
Property/Section Description
Minimum Value The minimum value you expect to measure
before VeriStand performs any scaling or
calibration.
Maximum Value The maximum value you expect to measure
before VeriStand performs any scaling or
calibration.
Sample Clock Source Specifies the name of the source terminal of the
sample clock. You can use an internal counter
timebase when performing counter
152 ni.com
VeriStand
Property/Section Description
measurements or an external timebase. For
more information, refer to Terminal Names in
the NI-DAQmx Manual.
Sample Clock Rate Specifies in hertz the sampling rate in samples
per channel per second. If you use an external
source for the sample clock, set this input to the
maximum expected rate of that clock.
Active Edge Specifies whether a timebase cycle is from
rising edge to rising edge or from falling edge to
falling edge:
■ Falling—Falling edge(s).
■ Rising—Rising edge(s).
Note For device specific information about the default terminals used for
counter measurements and generations, refer to Connecting Counter
Signals.
Related information:
■ Terminal Names
Time Period Channel Properties (CI)
Configure counter input (CI) channel properties to measure the period of a digital
signal.
With this measurement type, VeriStand measures the period of a digital signal by
counting observed edges and performing a software calculation over a period of
time determined by your expected range.
Note This method uses a software calculation that may not provide the
most reliable accuracy or update rate. Alternatively, if your DAQ card
supports Pulse Measurement, use values from the Frequency channel
located under the counter channels in System Explorer.
Property/Section Description
Minimum Value The minimum value you expect to measure
before VeriStand performs any scaling or
calibration.
Maximum Value The maximum value you expect to measure,
before VeriStand performs any scaling or
calibration.
Note For device specific information about the default terminals used for
counter measurements and generations, refer to Connecting Counter
Signals.
154 ni.com
VeriStand
Property/Section Description
Idle State Specifies the resting state of the output
terminal:
■ High—Terminal is at a high state at
rest. A pulse with a high idle state starts
high, pulses to low, and returns to high.
■ Low—Terminal is at a low state at rest.
A pulse with a low idle state starts at the
low value, pulses high, and returns to low.
Property/Section Description
Enable HWTSP
■ True—Generate pulses continuously
using hardware timing without a buffer.
This timing type is called hardware-
timed single-point sample mode.
■ False—Generates pulses continuously
without specifying timing. This timing
type is called implicit because the signal
being measured is itself the timing signal
or the timing is implicit in the rate of the
generated pulse train.
156 ni.com
VeriStand
Property/Section Description
VeriStand returns an error during
deployment.
Note For device specific information about the default terminals used for
counter measurements and generations, refer to Connecting Counter
Signals.
VeriStand limits how quickly you can update the frequency and duty cycle values
that define the pulses it generates. At least one complete pulse must elapse with a
set of frequency and duty cycle values before you can change one of these values. If
you update a value too quickly, VeriStand reacts in one of the following ways:
■ If the Enable HWTSP property is set to False, VeriStand ignores the new
value and continues using the latest value you successfully set.
■ If Enable HWTSP is set to True, VeriStand returns an error.
Related information:
■ NI-DAQmx Common Applications
■ Terminal Names
Accessing Cold-Junction Compensation Channels on SCXI Accessories
Manually add a Cold-Junction Compensation (CJC) channel to a system definition.
Before you start, add a DAQ device and use MAX to configure the SCXI chassis,
module, and accessory.
Map a thermocouple scale to the _cjTemp internal channel to convert the acquired
voltage values to temperature units.
Related tasks:
■ Creating a Thermocouple Scale
Setting Up Timing and Logging Properties for Waveform Acquisitions
Use tasks to define properties for when a system starts and stops acquisitions and
how to perform data logging.
Before you begin, add a DAQ device to the system definition.
158 ni.com
VeriStand
Goals Location
Perform finite acquisitions and identify an Click the task and use the Task
external sample clock. Configuration page.
Allow logging and configure to save data Click Logging and use the Logging
in .tdms log files. Configuration page.
Control waveform acquisitions by DAQ Use waveform task channels.
devices.
Define triggers to for acquisitions to start Click Triggers and use the Triggers
and stop when a certain analog or digital Configuration page.
value occurs or a software command is
received.
10. Save the system definition file.
Related concepts:
■
Single-Point Versus Waveform Acquisition
Related tasks:
■ Adding and Configuring a DAQ Device
■ Adding Waveform Task Channels
Related information:
■ TDMS File Format
Adding Waveform Task Channels
Use Analog Input (AI) channels with waveform tasks to control waveform
acquisitions by DAQ devices, such as how VeriStand logs waveform data and defines
triggers that start and stop acquisitions.
160 ni.com
VeriStand
In single-point acquisitions, channels acquire a single point at a time and return the
value directly to the system. A single-point acquisition is an immediate, non-
buffered operation that occurs at the rate at which the system runs.
In waveform acquisitions, channels acquire signals over a period of time as
waveforms.
The following table displays the use case for each acquisition type.
Related tasks:
■ Setting Up Timing and Logging Properties for Waveform Acquisitions
Adding NI FPGA Targets
Use NI FPGA targets to create customizable I/O, help with data preprocessing and
postprocessing, add high-speed closed-loop control, and simulate a variety of
sensors for hardware-in-the-loop testers
You can add an FPGA target and corresponding FPGA configuration file to a system
definition file without installing the LabVIEW FPGA Module. However, you must
install the LabVIEW FPGA Module to create a custom FPGA bitfile and configuration
file.
All
a. Click Hardware Discovery Wizard
and follow the onscreen instructions.
b. Select a target to display its
configuration page.
c. In the path control, select the FPGA
configuration file.
You can configure the FPGA device and its individual channels with the FPGA Target
and FPGA Channel configuration pages.
Related information:
■ Customizing an FPGA Target
Adding NI-XNET Devices
Use the NI-XNET platform to communicate with hardware using the CAN, LIN, and
FlexRay protocols.
You can configure an NI-XNET session by adding ports for your devices under the
protocol you want to use.
Depending on your goal, complete any of the following tasks.
162 ni.com
VeriStand
Goal Task
Adding any type of NI-XNET port Discover all NI-XNET devices on connected
targets and automatically add ports for them to
the system definition file.
Adding a CAN, FlexRay, or LIN port Add a CAN, FlexRay, or LIN port to a system
definition file.
Related information:
■ Using NI-XNET CAN, LIN, and FlexRay Interfaces
Adding an NI-XNET Port
Discover all NI-XNET devices on connected targets and automatically add ports for
them to the system definition file.
1. In the Project Files pane, left-click a system definition file (.nivssdf) and select
Configure in System Explorer.
2. Click Targets » Controller » Hardware » Chassis » NI-XNET in the
configuration tree.
3. Click Hardware Discovery Wizard and follow the onscreen instructions.
The new NI-XNET device(s) appears under the appropriate section in the
configuration tree.
Note You can restrict the type of NI-XNET device to discover. Select
CAN, FlexRay, or LIN, in the configuration tree and click
Hardware Discovery Wizard.
Expand the port to view sections for adding incoming and outgoing frames, data
logging files, and other options. Use the CAN, FlexRay, or LIN Port configuration
page to configure additional settings for the newly added port.
Related information:
Expand the port to view sections for adding incoming and outgoing frames, data
logging files, and other options. Use the CAN, FlexRay, or LIN Port configuration
page to configure additional settings for the newly added port.
Related information:
■ Using NI-XNET CAN, LIN, and FlexRay Interfaces
Adding Reflective Memory Networks
Use a reflective memory card to split up a simulation model to execute
simultaneously on different target systems.
164 ni.com
VeriStand
All
a. Click Hardware Discovery Wizard
and follow the onscreen instructions.
Related information:
■ Creating Custom Timing and Sync Devices
Synchronizing Hardware and Software
Synchronize the hardware and software components of a system to ensure
consistency and optimal performance, enable data analysis, and time correlation.
Goal Tasks
Configure timing of the system
a. Click Targets » Controller.
b. Under Timing Source Settings, in the
Primary Control Loop timing source
drop-down, select the device that will
time the system by sending ticks to
the Primary Control Loop of the
VeriStand Engine to start loop
iterations.
c. Enter a Target Rate and a Timing
Source Timeout.
166 ni.com
VeriStand
Goal Tasks
Additionally, you can only
synchronize hardware in a
PXI chassis, and all devices
must be connected to the
PXI backplane because the
Sample Clock is routed
from the chassis master
using PXI_Trig0.
Goal Tasks
by distributing a Sample Clock
to them.
b. In the Trigger line drop-down,
select which line the chassis will
import the start trigger.
168 ni.com
VeriStand
Note You can add a custom device to a system definition file without
installing LabVIEW. However, you must install LabVIEW to create a custom
device.
170 ni.com
VeriStand
Before you begin, you must compile the model to use it. To learn more about
models, refer to and .
VeriStand executes each model in its own loop. If a system definition contains
multiple models referencing the same compiled model, VeriStand makes a
temporary copy of the model so each loop has its own compiled model to execute.
Note Adding more than one instance of the same compiled model causes
errors if the model accesses a shared resource, such as a dependency.
Contact your model provider for information about whether the model
accesses such resources.
Goal Task
Set model timing Adjust the step size to have the model run at
a different rate.
Set model parameters Use the VeriStand Editor, Workspace, Model
Parameter Manager, and Stimulus Profile
Editor to set the values of model
parameters.
Scope global parameters Update the scope of all global parameters in
a model to the target-level or model-level.
Set the default values for inports Change the default value for an inport to
prevent your models from using invalid
values.
172 ni.com
VeriStand
Goal Task
Configure the execution order of multiple Define the order that the Primary Control
models Loop (PCL) executes models.
7. Save the system definition file.
After adding the model to the system definition, use model execution channels to
interact with models.
Components of a Model
Models run on hardware targets and contain inports, outports, parameters, and
signals to respond to stimuli from other parts of the system by producing outputs in
a way that simulates the modeled item.
The following table displays common model components that connect to other
parts of the system or allow you to interact with the model.
Component Description
Inports and Outports Communicates with other parts of the control
system. You can map inports and outports
directly to hardware inputs and outputs, other
models in the system, system channels, and
more. Inports and outports are dynamic values
the simulation updates each time the model
executes.
Parameters Acts like variables in the model. You can
manipulate parameters to tune the behavior of
the simulation. For example, an operator can
set a parameter before the model starts
executing or update its value between the
execution of discrete tests.
Signals Serves as probes, or test points, of a model as it
executes.
For example, consider a system with a model that runs a physical controller on a
hardware target to represent a DC motor. Such a model might contain the following
components:
■ An inport that accepts the motor command from the motor controller
■ An outport that returns the motor speed from the model
■ Parameters that adjust the load on the motor
174 ni.com
VeriStand
As seen in the following illustration, the PCL will not wait for models to finish
executing before it executes other steps.
If a model does not finish executing by the deadline, the VeriStand engine does not
schedule any models to execute during that iteration. The Model Count system
channel also increments.
Note To identify the model that was late, monitor the Time Step Duration
execution channel for each model. This is useful when a system contains
multiple models.
Decimated Models
A model that is decimated returns values on every N iteration of the PCL, when N
represents the decimation factor rather than every iteration as shown in the
previous illustration. Additionally, passing data between decimated models causes
an expected N tick delay where N represents the decimation factor.
176 ni.com
VeriStand
Note Since decimated models run in parallel, they ignore the execution
order you set in the system definition file. If you want to implement an
execution order, add handshaking code to the decimated models.
Note To identify the model that made the PCL late, monitor the Time
Step Duration execution channel for each model. This is useful when a
system contains multiple models.
Related concepts:
■ Time Step Duration
Setting Model Timing
Adjust the step size to have the model run at a different rate.
Before you begin, learn about the VeriStand system.
A model is set to run at a rate as defined in the build options when the model is
compiled. Depending on configuration settings for the system definition, the rate at
which the VeriStand Engine executes models can differ from the compiled rate.
The following equation describes how the VeriStand Engine executes models:
actual model rate = Primary Control Loop (PCL) rate / model decimation
Modify the system definition to alter this equation.
If both the controller and plant are simulated, such as during a model-in-the-loop
test, you can run your model at a different rate than specified when it was compiled.
For example, you can set the Primary Control Loop of a model compiled to run at
100 Hz to 1 kHz, or 10 times faster than real time (assuming model decimation is 1).
This results in more simulations and more data in a shorter amount of time.
However, a model that does not run in real time is potentially unstable. When
testing with hardware, such as hardware-in-the-loop testing, run your model at the
rate it was compiled to accurately simulate the system.
Related concepts:
■ VeriStand Engine
Setting Model Parameters
Use the VeriStand Editor, Workspace, Model Parameter Manager, and
Stimulus Profile Editor to set the values of model parameters.
Depending on your goal, complete the following task to set model parameters.
Goal Task
Change the initial value of model parameters Configure VeriStand to apply initial values for
model parameters from a .txt file when a system
definition file deploys.
Manually set individual parameters at run time. Use model calibration controls in the
Workspace to view and modify the values for
any model parameters in the system definition.
178 ni.com
VeriStand
Goal Task
Lock model parameters at run time Lock a parameter in the Workspace to prevent
its value from updating.
Declare temporary variables in a model Declare temporary variables within a .txt file
parameter file and use those temporary variables as new
parameter values or as parts of expressions that
define new parameter values.
Call a subscript from a model parameter file Call additional parameter files from within a .txt
file to encapsulate certain elements of a test in
separate files.
Alias parameter names in a model parameter Use an alias file to define syntactically correct
file aliases for model parameter names.
Import and manage batches of model Import model parameters with the Model
parameters in the VeriStand Editor Parameter Manager to apply values defined in
Import and manage batches of model an external .txt file to a model.
parameters in the Workspace
Update model parameters during a stimulus Use the Update Model Parameters from
profile test File step in a stimulus profile to apply model
parameter values defined in a text file to a
simulation model that is deployed and running
on a target.
Related tasks:
■ Changing the Initial Value of Model Parameters
■ Setting Model Parameter Values in the Workspace
■ Locking Model Parameters at Run Time
■ Declaring Temporary Variables in a Model Parameter File
■ Calling a Subscript from a Model Parameter File
■ Aliasing Parameter Names in a Model Parameter File
■ Importing and Managing Batches of Model Parameters with the VeriStand
Editor
■ Importing and Managing Batches of Model Parameters in the Workspace
■ Updating Model Parameters During a Stimulus Profile Test
Changing the Initial Value of Model Parameters
Configure VeriStand to apply initial values for model parameters from a .txt file when
a system definition file deploys.
Before you begin, format the initial values in the .txt file to VeriStand supported
syntax.
By default, the initial values of parameters are the values that were compiled into
the model. However, VeriStand can automatically apply parameter values from a file
when you deploy the system definition file. You can switch initial parameter values
between tests without recompiling models.
Note You can only select one model parameter file for VeriStand to
apply to models on the target that contain matching parameters.
Use the main model parameter file to call subscripts saved in
separate files.
180 ni.com
VeriStand
Note Locking a parameter does not prevent users from directly changing
its value in the VeriStand Editor, Workspace controls, or the Model
Parameter Manager. Locked parameters ignore only expression-based
changes.
VeriStand always unlocks parameters when you deploy a system definition. You
cannot lock parameters when VeriStand initializes parameter values prior to running
the model.
Note For examples of valid model parameter text files, refer to the text
files in the <Common Data>\Examples\Stimulus Profile\Engine
Demo\Stimulus Profiles\Update Model Parameters directory.
182 ni.com
VeriStand
Note For
example, if a
and b are
declared
variables, then
[1 -2/3; a b] is
a valid 2 x 2
matrix.
Note A path
is only valid if
the
corresponding
parameter
entry is
subscript.
Related tasks:
■
Aliasing Parameter Names in a Model Parameter File
■ Calling a Subscript from a Model Parameter File
Note The variable name must start with a letter and contain only
alphanumeric characters or underscores.
Initializing parameters
a. Use System Explorer to apply initial
values for model parameters from
a .txt file.
b. On the Simulation Models page, click
Allow temporary variables.
184 ni.com
VeriStand
The following excerpt from the ParameterUpdate2.txt example file shows how you
can declare a temporary variable, tempConversionFactor. The variable is used in an
expression that defines the value of the environment temperature (C) model
parameter.
tempConversionFactor 0.5
{environment temperature (C)} 50 * tempConversionFactor
This file is part of the Update Model Parameters example, available in the <Common
Data>\Examples\Stimulus Profile\Engine Demo\Stimulus Profiles\ directory.
Related concepts:
■ Supported Syntax in Model Parameter Files
Related tasks:
Note This is the subscript file. The subscript file must use the same
delimiter as the calling file.
When the call to the top-level text file executes, VeriStand inserts the contents of the
subscript file into the calling file at the line that contains the subscript call. You also
can use subscript calls recursively to call subscripts from within subscripts.
The second line of the following excerpt from the ParameterUpdate2.txt example file
shows how you can call a subscript file, in this case subfile.txt, from a model
parameter file.
186 ni.com
VeriStand
This file is part of the Update Model Parameters example, available in the <Common
Data>\Examples\Stimulus Profile\Engine Demo\Stimulus Profiles\ directory.
Aliasing Parameter Names in a Model Parameter File
Use an alias file to define syntactically correct aliases for model parameter names.
In addition to creating cleaner parameter files, aliasing parameter names can extend
the reusability of a test by allowing you to simply update the alias file if you want to
use the same test on a model with different parameter names.
Note Each alias must start with a letter and contain only
alphanumeric characters or underscores.
3. Create a new text (.txt) file and enter the aliases and their corresponding
model parameter paths in the same format you used for the model parameter
file.
Note The alias file must have a .txt file extension and use the same
delimiter as the parameter file with which it corresponds.
6. Set the Delimiter property to the delimiter type that both the parameter file
and the alias file use.
When the feature that calls the top-level text file executes, VeriStand uses the alias
file to map the aliases in the parameter file to actual model parameters.
The following examples show how to format a parameter file with aliases and its
corresponding alias file.
188 ni.com
VeriStand
190 ni.com
VeriStand
Related tasks:
■
Adding and Configuring a Model
■ Scoping Global Parameters
Setting Default Values for Inports
Change the default value for an inport to prevent your models from using invalid
values.
The default value of all inports is 0. Change the default if your model divides by an
inport to avoid an invalid operation.
Note Verify if your system configuration will cause the initial default
value to go unused. For example, if the Primary Control Loop execution
mode is in Low Latency, the model is assigned to the first execution group,
and an inport is mapped to hardware, the inport will always receive its
value from hardware.
1. Use the following table to determine the order that your models execute.
Note The PCL execution mode does not affect the execution order
for multiple models.
192 ni.com
VeriStand
6. Click Refresh to reorder the Models and Execution order lists based on the
changes you have made.
7. Save the system definition file.
Related concepts:
■ Primary Control Loop Step Execution in Models
Running Tests
Execute and automate tests.
Note You can deploy the system definition without launching the
VeriStand Editor.
If a system definition file is already running on the RT target, one of the following
happens:
■ If the system definition file on the host computer is the same as the system
definition deployed to the target, the host connects to the target and launches
the VeriStand Editor without deploying the system definition file.
■ If the system definition file on the host computer is different from the
system definition deployed to the target, clicking Operate » Deploy stops
the system definition on the target and deploys the system definition on the
host.
You can also manage individual targets at run time and configure a watchdog timer
for VeriStand to execute during deployment.
194 ni.com
VeriStand
Related concepts:
■ Individual Target Management
Related tasks:
■
Downloading Support Files in MAX
■ Running the VeriStand Gateway Silently
■ Configuring the Watchdog Timer when Deploying to a Real-Time Target
1. Launch MAX.
2. In the configuration tree, click Remote Systems.
3. Select the real-time target you want to deploy to and click Software.
MAX displays the progress of the installation and reboots the target so it is ready for
a system definition file.
Running the VeriStand Gateway Silently
Deploy a system definition without launching a VeriStand user interface, such as
VeriStand Editor or System Explorer.
By silently running the VeriStand Gateway, you can deploy a system definition, close
the user interface, and then reconnect to the still-deployed project upon re-opening
the user interface. This allows you to leave the system definition deployed while
being able to connect and disconnect testing user interfaces as needed.
If you run the VeriStand Gateway silently without first launching VeriStand, the
VeriStand Editor will indicate Legacy Project Functionality Disabled in the window
title. While in this state, you will not be able to access the following features:
■ Workspace
■ Workspace Tools dialog box
■ Console Viewer
■ XNET Bus Monitor
■ Channel Calibration
■ System Explorer Options dialog box
While the Gateway is running silently, you can check on the Gateway's status and
use programmatic APIs.
Note You can also use the Windows Run command or a language of
your choice.
Command Description
help Displays command options.
start Starts the server if it is not already running.
196 ni.com
VeriStand
Command Description
stop Stops the server if it is running.
status Displays the status of the server.
deploy Deploys a system definition to the server.
undeploy Undeploys a system definition from the
server if not password-locked.
Related concepts:
■
Components of a VeriStand Project
■ APIs in VeriStand
Related reference:
■ VeriStand Directories and Aliases
Related tasks:
■
Connecting Individual Targets
■ Disconnecting Individual Targets
■ Undeploying the System Definition from an Individual Target
Connecting Individual Targets
Connect to a new target for the first time or reconnect to an old target after
maintenance.
Connecting to a target deploys the system definition to the target. You must define
the target in the system definition before connecting to a new target. Otherwise, you
must undeploy the system definition from all targets, define the new target, and
redeploy to all targets.
Note If you are reconnecting a target that already has the system
definition, select the target and click Connect.
In the Manage Targets tab, verify that the State column displays the correct running
target.
Disconnecting Individual Targets
Disconnect a target for maintenance if it returns an error or develops a physical
fault.
In the Manage Targets tab, verify that the State column displays that the target is
disconnected.
Undeploying the System Definition from an Individual Target
Undeploy the system definition from an old target.
Undeploying the system definition from a target also disconnects the target.
198 ni.com
VeriStand
3. Click Undeploy.
In the Manage Targets tab, verify that the State column displays that the target is
disconnected. Once the system definition is undeployed, you must redeploy it
before you can reconnect the target.
Configuring the Watchdog Timer when Deploying to a Real-Time
Target
You can modify the timing watchdog that stops the execution of the VeriStand
Engine if too much time elapses when you deploy a project to a real-time target.
The timing watchdog is controlled by the Watchdog Timer Loop. This loop executes
at a rate of 10 Hz and at a lower priority than the other loops in the VeriStand
Engine.
The Watchdog Timer Loop executes and resets the Watchdog Timer system channel
every 500 milliseconds. When the Primary Control Loop executes, it evaluates
whether the Watchdog Timer system channel reports a time greater than 1 second.
If it does, VeriStand throws an error and stops execution of the VeriStand Engine.
To enable or disable watchdog functionality, complete the following steps:
When you enable this option, VeriStand will filter errors reported by the timing
watchdog. You can then monitor and respond to the Watchdog Timer system
channel with custom alarms and procedures.
Running VeriStand Operations Using the Command Line
Use the command line to execute processes in VeriStand, such as deploying or
closing a project.
Commands can be used while VeriStand is open or closed.
Note You can use a slash (/), a dash (-), or two dashes (--) before
each command. Commands are not case sensitive. For example, /
deploy and --DePloY are equivalent commands.
Command Description
closeAllFiles Closes all open files prompting if there are
any unsaved changes.
closeFile <relative path to project file> Closes individual project files if they are
open prompting if there are any unsaved
changes. This command can be repeated
multiple times to open multiple files. For
example: /closeFile "logging.nivslspec" /
closeFile "screen.nivsscr" will close both
files.
closeProject Closes the current project prompting if there
are any unsaved changes.
connect Connects to a deployed system on the
gateway. This command executes after
commands for creating the project, opening
the project, and modifying the system
definition. This command is ignored if
deploy is also specified. An error returns if a
system is not deployed but a project is open.
disconnect Disconnects from a deployed system on the
gateway.
deploy Deploys the system to the gateway and
connects to it. This command executes after
commands for creating the project, opening
the project, and modifying the system
definition.
editScreen Turns operate mode off to unlock the screen
for editing. This can be used to reverse the
operateScreen or operateOnly commands
while VeriStand is running.
200 ni.com
VeriStand
Command Description
forceCloseAllFiles Closes all open files and discards unsaved
changes.
forceCloseFile <relative path to project file> Closes individual project files if they are
open and discards unsaved changes. This
command can be repeated multiple times to
open multiple files. For example: /
forcecloseFile "logging.nivslspec" /
forcecloseFile "screen.nivsscr" will close
both files.
forceCloseProject Closes the current project and discards
unsaved changes.
gateway <IP address or hostname> Specifies the given IP address or hostname
as the gateway.
help Opens the VeriStand manual to Running
VeriStand Operations Using the Command
Line.
nivsprj <file path to .nivsprj file> Opens the specified project. If the project
does not exist, VeriStand creates it using the
default project template. If VeriStand has a
different project open, a dialog box will ask
you to save and close it.
noDeployKeys Disables the keyboard shortcuts for deploy
(F6) and undeploy (F7). This command does
not disable the Operate menu or the deploy
and undeploy commands.
openDocument <relative path to project Operates similar to openFile normally.
file> However, a legacy .nivsproj VeriStand
project path works like openLegacyProject
for backward compatibility.
openFile <relative path to project file> Opens individual project files. This
command can be repeated multiple times to
open multiple files (with the last file getting
focus). For example: /openFile
"logging.nivslspec" /openFile
"screen.nivsscr" will open both files and
leave screen.nivsscr with focus.
openLegacyProject <file path to Converts a legacy .nivsproj VeriStand project
legacy .nivsproj file> into a .nivsprj file and opens it.
Command Description
openProject<file path to .nivsprj file> Opens the specified project. If the project
does not exist, VeriStand creates it using the
default project template. If VeriStand has a
different project open, a dialog box will ask
you to save and close it.
operateOnly Turns operate mode on to lock the screen.
When operate mode is on, you cannot resize,
move, or edit the controls in the screen
document. This command disables the
screen document unlock button.
operateScreen Turns operate mode on to lock the screen.
When operate mode is on, you cannot resize,
move, or edit the controls in the screen
document. This command disables the
screen document unlock button.
sysDef <file path to .nivssdf system Loads the system definition into an open or
definition file> specified project. If you create a new project
with the nivsprj or openProject commands,
the specified system definition is used
instead of the default template. This
command does not work if the gateway is
currently connected or connecting. This
command executes before the connect
command.
undeploy Removes deployed system from the
gateway. This command works on
connected and disconnected systems.
Related concepts:
■
Host Computer
Related reference:
■ Keyboard Shortcuts
202 ni.com
VeriStand
■ Creating Real-Time Test Scenarios with Stimulus Profiles and Real-Time Test
Sequences
Related information:
■ VeriStand .NET Reference
Note If you need to log data from varying sources, use DIAdem to
combine and time correlate all of your data logs. For more information,
refer to Viewing Time Correlated NI VeriStand Data Logs.
204 ni.com
VeriStand
Logg scon
er nect
befor the
e host
depl from
oyin the
g. targe
You t
cann after
ot depl
chan oyin
ge ga
confi syste
gurat m
ion defin
at ition
run and
time. conti
nue
to
log
data.
206 ni.com
VeriStand
208 ni.com
VeriStand
210 ni.com
VeriStand
Related tasks:
■
Logging Target Data with the Embedded Data Logger
■ Logging Incoming NI-XNET Frames
■ Setting Up Timing and Logging Properties for Waveform Acquisitions
■
Logging Real-Time Test Data with the Stimulus Profile Editor
■ Logging Data with the VeriStand Editor
■ Configuring and Executing Host-Side Logging
Related information:
■ Viewing Time Correlated NI VeriStand Data Logs
Goal Task
Add an NI-XNET database Create a standardized file for embedded system
communication in a FIBEX (.xml), CANdb (.dbc),
NI-CAN (.ncd), or LDF (.ldf) format.
Goal Task
Edit an NI-XNET database Use the NI-XNET Database Editor to configure a
basic network, define frames and exchanged
signals, and assign frames to Electronic Control
Units (ECUs).
Import NI-XNET frames Import incoming or outgoing frames from an NI-
XNET database.
Use NI-XNET frame IDs Use frame IDs to prioritize event-triggered
frames, filter log file frames, and filter CAN data
replay file frames.
Access timing and ID information for incoming Create Frame Information channels to track
NI-XNET frames timestamps and frame IDs.
Log incoming NI-XNET frames Create TDMS (.tdms) or NI-XNET log (.ncl) files to
record incoming frame data during an NI-XNET
session.
Replay logged NI-XNET CAN frame data Add and replay TDMS (.tdms) or NI-XNET log
(.ncl) files on a CAN bus.
Configure cyclic NI-XNET CAN frame faulting Configure outgoing cyclic frames of NI-XNET
CAN interfaces by adding Skip Cyclic Frames
and Transmit Time channels.
Configure cyclic redundancy checks (CRCs) and Specify the bytes for outgoing frames of NI-
counters for outgoing NI-XNET CAN frames XNET CAN interfaces to include in CRCs and add
counters that increment each time the frame
transmits across the bus.
Related concepts:
■ NI-XNET Overview
■ NI-XNET Bus Monitor
■ How VeriStand Applies Scaling Factors to NI-XNET Signals
Related tasks:
■ Adding NI-XNET Databases
■ Editing NI-XNET Databases
■ Importing NI-XNET Frames
■
Using NI-XNET Frame IDs
■ Accessing Timing and ID Information for Incoming NI-XNET Frames
212 ni.com
VeriStand
NI-XNET Overview
Use sessions, clusters, and frames to set up your NI-XNET interfaces.
Note Refer to the NI-XNET Hardware and Software Help that installs
with your hardware for more detailed documentation about NI-XNET
interfaces.
Sessions
An NI-XNET session represents a connection between your NI CAN, FlexRay, or LIN
hardware and hardware products on the external network. Sessions include the
following configuration components:
■ Port—A port in NI-XNET refers to the physical connector on an NI hardware
device.
■ Interface—An interface represents the software CAN, FlexRay, or LIN
connector on an NI hardware device. Use the interface name as an alias for
your ports so you can avoiding changing your application if the physical
hardware configuration changes.
■ XNET Database—An XNET database is a standardized file that describes
embedded communication. XNET database file formats include CANdb (.dbc)
for CAN, FIBEX (.xml) for FlexRay, and LIN Description File (.ldf) for LIN. For the
NI-XNET interface to communicate with hardware products on the external
network, NI-XNET must understand the communication in the actual
embedded system.
You can edit NI-XNET databases directly from VeriStand by launching the NI-
XNET Database Editor from System Explorer.
■ Session Mode—A session mode specifies the data type (signals or frames),
direction (input or output), and how your application and network transfer
data. VeriStand supports the following NI-XNET session modes:
■ Signal Input Single-Point
■ Signal Output Single-Point
■ Frame Input Single-Point
■ Frame Output Single-Point
■ Frame Input Stream
Clusters
A cluster is a description of a single network, such as a CAN bus, within an XNET
database. For importing frames, each port in VeriStand is associated with a single
cluster within an XNET database. A cluster can contain an arbitrary number of
frames.
Frames
A frame is a message that transmits across an embedded network. In VeriStand,
frames are either inputs (incoming frames) or outputs (outgoing frames), and are
classified according to their transmission characteristics. For example, event-
triggered frames transmit only when a specific event occurs. Frames also contain
information such as ID numbers and timing data that you can access through Frame
Information channels in VeriStand.
You can import frames into VeriStand in either signal or raw data format. Signal
format frames contain signals and raw data format frames contain channels. These
terms refer to the basic data exchange unit on the network.
214 ni.com
VeriStand
The specific format and characteristics of frames vary based on the communication
protocol you use. Refer to the NI-XNET Hardware and Software Help for detailed
information about frame formats.
Related tasks:
■
Editing NI-XNET Databases
■ Accessing Timing and ID Information for Incoming NI-XNET Frames
Note Refer to the NI-XNET Hardware and Software Help for detailed
information about NI-XNET databases.
A database on disk
a. Click New XNET Database.
b. Enter an Alias.
c. Click the Path folder.
d. In the Select a File or Folder window,
select a database file.
e. Click OK.
5. Click OK.
Note The editor cannot open LIN description files (.ldf) or FIBEX
databases with LIN content.
Note VeriStand will ask you to delete any signals removed from the
database or multiplexed signals that changed in the database.
Import the changed multiplexed signals again for VeriStand to read
them correctly.
216 ni.com
VeriStand
Related tasks:
■ Adding NI-XNET Databases
8. Click OK.
9. Save the system definition file.
Related tasks:
■ Adding NI-XNET Databases
Note Refer to the NI-XNET Hardware and Software Help for more
information about frame identifiers.
Goal Tasks
Prioritizing the order that event-triggered
a. Add a CAN, FlexRay, or LIN port.
outgoing frames transmit.
b. Click the port you added.
c. On the port configuration page, click
the Transmission Order tab.
d. Under Pending Transmit Order, click
By Identifier.
218 ni.com
VeriStand
Goal Tasks
c. In the File Replay IDs section, use the
File Replay Configuration page to
configure filtering.
Time Difference
a. Select a channel.
b. On the Time Difference configuration
page, enter an initial value.
After creating Frame Information channels, you can use them like other channels in
VeriStand. For example, you can map them to other channels or to controls and
indicators in the VeriStand Editor or Workspace.
Use the XNET page of the Options dialog box to configure VeriStand to create Frame
Information channels when you import NI-XNET frames. You can also use the Import
NI-XNET Frames dialog box to automatically create channels on a one-time basis
when you import frames.
Logging Incoming NI-XNET Frames
Create TDMS (.tdms) or NI-XNET log (.ncl) files to record incoming frame data during
an NI-XNET session.
When you deploy and run the project, VeriStand logs the frame data you specify to
the log file when the trigger condition you specify is met. You can add multiple log
files to a single system definition file. A single log file can store data from multiple
220 ni.com
VeriStand
clusters within an XNET database. If you do not configure filters on the log file, it
simply stores everything that is received on the port. You can also replay the log file
with a CAN interface across a CAN bus.
8. Click OK.
The new file appears under Raw Frame Data Logging in the configuration tree.
9. On the XNET Data Logging Configuration page, enter a Buffer time [s] that is
large enough to avoid a buffer overflow while reading data.
Note The larger the buffer, the more memory is required for data
logging. To avoid additional dynamic memory allocation, determine
the bus load for your session before starting a data logging
operation.
10. Optional: Select a filter from the drop-down to configure filtering of the
frames to log.
Filtering uses frame IDs to include or exclude specific frames from the log file.
11. Click Trigger and File.
12. Configure when data logging starts, stops, and the operation that performs
when logging restarts after a stop.
For example, on a trigger channel, you can specify to start logging when value
becomes zero and to stop logging when it is not zero.
13. Save the system definition file.
Related concepts:
■ Raw Frame Data Logging FAQs
Related tasks:
■
Replaying Logged NI-XNET CAN Frame Data
■ Monitoring Incoming NI-XNET Frame Logging
Monitoring Incoming NI-XNET Frame Logging
Check the status of your logging of incoming NI-XNET frames by using the Error,
Finished Files, and Status channels.
Before you begin, you must add a raw frame data logging file.
222 ni.com
VeriStand
5. Click Incoming » Raw Frame Data Logging and select a log file.
6. Depending on your goal, click a channel.
Goal Channel
Review the most recent logging error. Error
Determine what files are ready for use by Finished Files
other processes.
Find the current status of the data logging Status
process.
You can monitor these channels from the VeriStand Editor and Workspace, or
map them to other channels within the project.
Related tasks:
■ Logging Incoming NI-XNET Frames
■ Mapping Channels and Aliases
Raw Frame Data Logging FAQs
Answers to common questions on using raw frame data logging in VeriStand.
When should I use raw frame data logging for NI-XNET CAN
interfaces?
Raw frame logging for CAN interfaces is useful when you need the exact timestamps
of when messages are sent and received from the hardware. You can use a program
such as DIAdem for post-processing of the data. Additionally, you can use the log
files you create to replay the frames.
Note VeriStand can only replay TDMS files that contain specific header
information. To ensure your files contain the correct information, use
VeriStand to create TDMS files you want to replay.
224 ni.com
VeriStand
6. Click Add a Replay File to display the Select an XNET Data File dialog
box.
7. Click the Path folder to select a log file that contains CAN data and click OK.
8. Under Data Replay, select the log file to display the File Replay Configuration
page.
9. Under File Replay Settings, specify a trigger channel for triggering the replay
of the file.
Note Replay starts as soon as the value of the trigger channel is not
zero. You can select a channel that triggers multiple replays of the
file.
10. (TDMS only) Specify the group name and channel name for the TDMS channel
that contains the data to replay.
11. Specify the cache # of frames and loop rate (Hz).
12. Under file replay IDs, specify the replay behavior.
The default behavior is to replay the entire file. You can configure this
behavior to include or exclude specific frame IDs.
Note If you select Include Frame IDs, you cannot specify IDs of
single-point frames that already appear as outgoing frames under
the port. If you select one of the other behavior options, you cannot
have any outgoing, single-point frames specified under the port.
Specifying a single-point frame as both an output and a frame to
replay causes a run-time error.
Note After you deploy and run the project, VeriStand also deploys the
data replay file. If a data replay file with the same name already exists on
the target when you deploy the project, VeriStand overwrites the existing
file.
Related tasks:
Goal Channel
Review the most recent replay error. Error
Determine whether data is replaying as Pending Frames
expected
Find the current status of the replay process. Status
You can monitor these channels from the Workspace or map them to other channels
within the project.
Related tasks:
■ Replaying Logged NI-XNET CAN Frame Data
■ Mapping Channels and Aliases
226 ni.com
VeriStand
In embedded networks, cyclic frames are frames that transmit at regular intervals.
You can add the following frame fault channels:
■ Skip Cyclic Frames—Skips transmission of a specified number of cyclic
frames across the bus.
■ Transmit Time—Specifies the amount of time that must elapse between
subsequent transmissions of a cyclic frame.
Goal Tasks
Skip the transmission of a certain number of
frames. a. Click Skip Cyclic Frames to display
the Skip Cyclic Frames Configuration
page.
b. Specify the Skip N cycles for the
number of cycles to skip .
c. Specify the Trigger channel to use to
start skipping channels.
Goal Tasks
Specify an amount of time that must elapse
between frame transmissions. a. Click Transmit Time to display the
Transmit Time Configuration page.
b. Specify the time that must elapse in
the Transmit time [sec] field, or
select Use trigger channel to set
transmit time? and specify a trigger
channel from which to get the time.
After creating Frame Faulting channels, you can use them like other channels in
VeriStand. For example, you can map them to other channels or to controls and
indicators in the VeriStand Editor or Workspace.
Use the XNET page of the Options dialog box to configure VeriStand to always create
faulting channels when you import NI-XNET frames. You can also use the Import NI-
XNET Frames dialog box to automatically create channels on a one-time basis when
you import frames.
Related concepts:
■ Configuring Controls and Indicators to Send and Receive Data
Related tasks:
■ Importing NI-XNET Frames
■
Mapping Channels and Aliases
■ Adding and Configuring Controls and Indicators
228 ni.com
VeriStand
a. Under CRC Settings, specify the first included byte and last included
byte for the CRC.
b. In the Storage offset [byte] field, specify a number of bytes to offset the
byte where CRC data is stored.
Note The CRC is always the last byte in the data. Set this
value to n-1, where n is the number of bytes in the data, to
avoid dropping frame data from the CRC.
230 ni.com
VeriStand
In addition to the network data, the NI-XNET Bus Monitor can provide statistical
information. For offline data analysis, you can stream all received network data to
disk in two log file formats.
You can launch the NI-XNET Bus Monitor from Measurement and Automation
Explorer (MAX) or from the Windows Start menu.
For more information about the NI-XNET Bus Monitor, refer to the NI-XNET Tools
and Utilities Help.
Related tasks:
■
Enhancing Your Workspace to View Data
Note Although the EESPort and MAPort use the 2.1 version of the ASAM
XIL API, they have their functionality implemented for the 2.0.1 API
version. The TargetScript in MAPort also implements the 2.1 API.
Locate example VeriStand ASAM XIL testbench and framework files in <Common
Data>\Examples\DotNet4.6.2\ASAM XIL.
Implementation Differences
The following table displays implementation differences.
232 ni.com
VeriStand
Limitations
The following table displays known limitations.
Process Limitation
Capturing Capture sessions ignore data logging errors.
ASAM XIL API users will not receive an error
notification. Instead, the capture will
immediately enter the eFINISHED state and
cease logging data. Untriggered captures also
cause this state change. Capture results
and .mdf files contain logging data until when
the error occurred.
Locate example VeriStand ASAM XIL testbench and framework files in <Common
Data>\Examples\DotNet4.6.2\ASAM XIL.
Related reference:
■ VeriStand Directories and Aliases
234 ni.com
VeriStand
The following table displays the XML elements you can use in a VeriStand ASAM XIL
port configuration XML file.
Note
The
hardwa
re
trigger
only
occurs
if the
channe
l value
change
s from
0 to
any
other
value.
236 ni.com
VeriStand
Note
The
softwar
e
trigger
only
occurs
if the
channe
l value
change
s from
0 to
any
other
value.
Set the
AutoRe
set
attribut
e of
this
elemen
t to
true to
autom
atically
set the
channe
l back
to zero
after
the
trigger
fires. If
AutoRe
set is
Note
238 ni.com
VeriStand
240 ni.com
VeriStand
Types
■ VersionType—Specifies version information.
If you want to script your test sequences in Python, you can use the VeriStand
Python Integration Package as an alternative to the Stimulus Profile Editor. This
open-source package allows you to execute Python scripts as if they were VeriStand
real-time sequences. To learn more about this feature, view the VeriStand Python
Documentation.
Related tasks:
■
Navigating the Stimulus Profile Editor Environment
■
Creating Stimulus Profiles
■ Creating Real-Time Sequences
■ Viewing Stimulus Profile Test Results
■
Logging Real-Time Test Data with the Stimulus Profile Editor
■ Communicating with the VeriStand Editor Using Stimulus Profile Arguments
Related information:
■ VeriStand Python Integration Package
■ VeriStand Python Documentation
242 ni.com
VeriStand
Related tasks:
■
Creating a Stimulus Profile Editor Layout
244 ni.com
VeriStand
Note You can save as many layouts as you need, but you cannot
rename or delete a layout after you save it.
To access a saved layout, in the View Tab, click Available Layouts and select the
layout you want to apply.
Related tasks:
■ Navigating the Stimulus Profile Editor Environment
profiles can open and close projects and user interface windows and log the results
of test scenarios to TDMS files.
Stimulus profiles appear on the VeriStand Editor in the Project Files tab with the file
extension .nivsstimprof. A single VeriStand project can contain multiple stimulus
profiles that define different test scenarios. You can execute multiple stimulus
profiles concurrently, and each stimulus profile can contain multiple real-time
sequences.
Note A stimulus profile can run with warnings, but not errors.
You can save the profile and resolve errors later.
After you configure and save the stimulus profile and any real-time sequences it
calls, you can run the profile. Deploy its associated system definition to run the
stimulus profile.
Related tasks:
■ Deploying the System Definition File to a Real-Time Target
246 ni.com
VeriStand
1. Open the stimulus profile from which you want to call the sequence in the
Stimulus Profile Editor.
2. In the Steps palette, expand Real-Time Sequences.
3. Select Real-Time Sequence Call and drag it to the stimulus profile code.
4. In the Property Browser, enter a File Path where the real-time sequence
(.nivsseq) file is located.
5. Use the Parameters section of the Property Browser to map the sequence
input parameters to channels.
Note If the stimulus profile you are using is saved in the same
directory as a real-time sequence,you can drag the real-time
sequence file from the Sequences palette directly to the stimulus
profile code to create a Real-Time Sequence Call step that calls that
sequence.
Use the Update Model Parameters from File step in a stimulus profile to apply
model parameter values defined in a text file to a simulation model that is deployed
and running on a target.
By using this step to automate model parameter value updates, you can update
your model at known points within the execution of the stimulus profile.
1. Create a stimulus profile that is associated with the system definition file that
contains the model you want to update.
2. In the Steps palette, click to VeriStand Control » Workspace and drag the
Update Model Parameters from File step to the stimulus profile code.
3. In the Property Browser, configure the Update Model Parameters from
File step.
a. Enter a Source path to a text file (.txt) that conforms to the model
parameter file format.
b. Confirm that the Target property shows the target that the model is
deployed to.
c. Confirm that the Delimiter property is set to the delimiter that the
Source file uses to separate parameter/value pairs.
d. If you are using an alias file to define model parameters, enter the path
to the file in the Alias File property.
e. If you are using temporary variables within the Source file, enable
Allow Temporary Variables
4. Deploy the system definition.
5. Compile and run the stimulus profile.
When the Update Model Parameters from File step executes, the model
parameters update to the values in the Source file.
Related concepts:
248 ni.com
VeriStand
Subpalette Description
Real-Time Sequences Steps Call real-time sequences from a stimulus profile.
Logging Steps Log data from channels in a system definition.
VeriStand Control Steps Interact with VeriStand, including the
Workspace and the VeriStand project.
Other Steps Add functionality to a stimulus profile.
Related reference:
■
Real-Time Sequences Steps
■ Logging Steps
■ VeriStand Control Steps
■ Other Steps
Real-Time Sequences Steps
Call real-time sequences from a stimulus profile.
Related reference:
■ Real-Time Sequence Call Step
■
Real-Time Sequence Group Step
Real-Time Sequence Call Step
Calls a real-time sequence, executes the sequence on the specified Target, and
returns information about whether the sequence execution passes or fails.
You can call a real-time sequence from any section of a stimulus profile (Setup,
Main, or Clean Up) or from within a Real-Time Sequence Group.
Property/Section Description
File Path Specifies the path to the real-time sequence to
execute. You can specify a real-time sequence
file (.nivsseq) or a properly formatted CSV file.
Target Name Specifies the name of the target on which the
sequence executes. The target must be defined
in the system definition file associated with the
stimulus profile.
Timeout [ms] Specifies the amount of time in milliseconds
within which the real-time sequence must
complete each timestep. A zero or negative
value indicates an infinite timeout. If the
sequence does not complete a timestep within
the specified amount of time, the VeriStand
Engine aborts sequence execution and returns
an error.
Description Specifies a description for the current item. This
text appears when you hover over the item in
the Stimulus Profile Editor.
Pass/Fail Evaluation Includes properties you can use to configure
pass/fail evaluation for the sequence:
250 ni.com
VeriStand
Property/Section Description
■ Type—Specifies the type of pass/fail
evaluation to perform. This step evaluates
the return variable for the real-time
sequence to determine whether the
sequence passes or fails. You can select
from the following options:
■ AlwaysPass—(Default) The
evaluation always passes, regardless of
the value of the return variable.
■ Boolean—Evaluates a Boolean value
for pass/fail status. True is pass, unless
you invert the evaluation.
■ NumericBoundsCheck—Evaluates
an integer value relative to specified
high and low boundaries.
■ Parameters—Defines parameters for
the pass/fail evaluation. The options that
appear depend on the Type of evaluation
you specify. AlwaysPass evaluations
have no parameters to define, because
they always pass. You can set the
following parameters:
■ Invert—[Type: Boolean] If TRUE,
inverts a Boolean evaluation so that
FALSE is pass and TRUE is fail.
■ Type—[Type: NumericBoundsCheck]
Specifies the type of bounds check:
■ Inbounds—The evaluation
passes if the value is within the
specified bounds.
■ OutOfBounds—The
evaluation passes if the value is
outside the specified bounds.
■ High—[Type: NumericBoundsCheck]
Specifies the high limit of the bounds. A
value is within bounds if it is less than
Property/Section Description
or equal to this value and greater than
or equal to the Low value.
■ Low—[Type: NumericBoundsCheck]
Specifies the low limit of the bounds.
252 ni.com
VeriStand
This step does not complete until each real-time sequence in the group executes.
Property/Section Description
Sequence Group Name Specifies the name of the sequence group.
Description Specifies a description for the current item. This
text appears in the Context Help when you
hover over the item in the Stimulus Profile
Editor.
Logging Steps
Log data from channels in a system definition.
Related reference:
■ Channel Group Step
■
Start Logging Step
■
Stop Logging Step
Channel Group Step
Groups channels in a logging configuration.
TDMS files arrange log data into groups of channels. The Channel Group Name you
specify and the Channels you add to the group correspond to the group and
channels that appear in the TDMS file. You can create multiple channel groups
under a single logging configuration to create multiple groups in one TDMS file.
Note You must use this step as a child of a Start Logging step.
Property/Section Description
Channel Group Name Specifies the name of the channel group.
Property/Section Description
Channels Specifies the channels that belong to the
channel group. Click the search button to
display an interactive system definition
hierarchy tree. Place check marks next to the
channels you want to add to the channel group.
Description Specifies a description for the current item. This
text appears when you hover over the item in
the Stimulus Profile Editor.
Start Logging Step
Starts logging data from the system definition channels you specify to a TDMS file.
When you add this step to a stimulus profile, VeriStand automatically creates a
Channel Group step to associate with the logging configuration. You can add
multiple channel groups under a single logging configuration.
Property/Section Description
Configuration Name Specifies the name of a specific data logging
operation. You use this name to identify and
control the operation. For example, to start and
stop data logging, both the Start Logging step
and the Stop Logging step must use the same
Configuration Name.
File Path Specifies the name and location of the log file to
save data to. The Stimulus Profile Editor creates
log files in the TDMS file format.
You can enter an absolute or relative path.
VeriStand treats relative paths as relative to the
directory that contains the ATML results file for
the stimulus profile.
Timestamp Filename If True, specifies to append a timestamp to the
data log filename that indicates when the file is
created.
Replace Existing File If True, specifies to overwrite an existing file at
the location specified by File Path. If False,
specifies to append data to the existing log file.
If you choose to append data to an existing
TDMS file, VeriStand logs new data for existing
254 ni.com
VeriStand
Property/Section Description
channels under the existing channel and group
names, and the file only shows the initial
creation date in the file header. The TDMS file
does not retain the timestamps of subsequent
logging operations that append data to an
existing file.
Log Rate [Hz] Specifies the rate in hertz at which to log data.
VeriStand logs at the closest possible rate to this
value that does not exceed the rate at which a
target produces data. The default is 100.
Description Specifies a description for the current item. This
text appears when you hover over the item in
the Stimulus Profile Editor.
Triggered Logging Includes properties you can use to configure a
trigger that starts logging:
■ Trigger Condition—Specifies the
condition under which to register start
and stop triggers:
■ none—(Default) No trigger is
specified. Logging starts when this step
executes and continues until a stop
logging command is received or the
stimulus profile stops executing.
■ in_limits—Registers a start trigger
when the Trigger Channel value
enters the bounds specified by High
Limit and Low Limit and a stop
trigger when the channel value leaves
the bounds.
■ out_of_limits—Registers a start
trigger when the Trigger Channel value
leaves the bounds specified by High
Limit and Low Limit and a stop trigger
when the channel value re-enters the
bounds.
■ Trigger Channel—Path to the
channel, as specified in the system
Property/Section Description
definition file, to watch for the specified
Trigger Condition.
■ High Limit—High limit for trigger limit
analysis.
■ Low Limit—Low limit for trigger limit
analysis.
■ Pre-Trigger Duration—The number
of seconds of data to retain in the buffer
in case a start trigger occurs. When the
start trigger occurs, any buffered data is
included in the log.
■ Post-Trigger Duration—The duration
in seconds to continue logging data after
a stop trigger occurs.
256 ni.com
VeriStand
Property/Section Description
Configuration Name Specifies the name of a specific data logging
operation. You use this name to identify and
control the operation. For example, to start and
stop data logging, both the Start Logging step
and the Stop Logging step must use the same
Configuration Name.
Description Specifies a description for the current item. This
text appears when you hover over the item in
the Stimulus Profile Editor.
VeriStand Control Steps
Interact with VeriStand, including the Workspace and the VeriStand project.
For example, you can use Control steps to open and close the project, open and
close the Workspace, and access Workspace tools.
Subpalette Description
Project Steps Open, communicate with, or close a VeriStand
project (.nivsprj) file.
Workspace Steps Interact with the Workspace and Workspace
tools.
Related reference:
■ Launch NI VeriStand Step
■ Project Steps
■ Workspace Steps
Launch NI VeriStand Step
Launches the VeriStand executable.
The Stimulus Profile Editor runs as a separate executable from the main VeriStand
application. Ensure VeriStand is running to execute tests. However, you can edit
stimulus profiles and real-time sequences without running VeriStand.
Property/Section Description
Timeout Specifies the time in seconds to wait for
VeriStand to launch before returning a timeout
error.
Description Specifies a description for the current item. This
text appears when you hover over the item in
the Stimulus Profile Editor.
Project Steps
Open, communicate with, or close a VeriStand project (.nivsprj) file.
Related reference:
■ Open VeriStand Project Step
■
Close Active VeriStand Project
■ Control Active VeriStand Project Step
Open VeriStand Project Step
Opens the VeriStand project (.nivsprj) file you specify.
A stimulus profile must be associated with an open and deployed project to execute
real-time sequences. Use this step to open a project file directly from a stimulus
profile. You can then use the Control Active VeriStand Project step to deploy the
project.
Property/Section Description
Show Project If TRUE, specifies to display the project in the
VeriStand Editor.
Project Path Specifies the path to the project file. This can be
an absolute or relative path. Relative paths
258 ni.com
VeriStand
Property/Section Description
must be relative to the directory that contains
the stimulus profile.
Description Specifies a description for the current item. This
text appears when you hover over the item in
the Stimulus Profile Editor.
Security Includes the following properties:
■ Username—(Optional) Specifies the
username to use to access the project. If
the project has only one defined user,
such as the Administrator, and that user
has no password, you do not need to
enter the username.
■ Password—(Optional) Specifies the
password associated with the Username.
Not all usernames have associated
passwords. If a username does have an
associated password and you leave this
property empty, VeriStand prompts you to
enter the password when this step
executes.
Related reference:
■ Control Active VeriStand Project Step
Close Active VeriStand Project
Closes the active VeriStand project (.nivsprj) file.
Property/Section Description
Description Specifies a description for the current item. This
text appears when you hover over the item in
the Stimulus Profile Editor.
Control Active VeriStand Project Step
Sends a command to the active VeriStand project (.nivsprj) file.
Property/Section Description
Command Specifies the command that the step sends to
the project:
■ Run—Runs the project.
■ Deploy—Deploys the system definition
file associated with the project to the
target.
■ Connect—Connects the project on the
host computer to a target. This option
only establishes a connection to a target.
It does not deploy the system definition.
■ Disconnect—Disconnects the project
from the target. This option does not stop
execution of the system definition file on
the target.
■ Undeploy—Undeploys the system
definition file associated with the project
from the target. Undeploying the system
definition file stops execution on the
target.
260 ni.com
VeriStand
Subpalette Description
Workspace Tools Steps Opens and communicates with Workspace tools
directly from a stimulus profile.
Related reference:
■ Close VeriStand Workspace
■
Open VeriStand Workspace
■ Update Model Parameters from File Step
■ Workspace Tools Steps
Close VeriStand Workspace
Closes the VeriStand workspace.
Property/Section Description
Description Specifies a description for the current item. This
text appears when you hover over the item in
the Stimulus Profile Editor.
Open VeriStand Workspace
Opens the VeriStand Workspace and loads the screen (.nivsscreen) file associated
with the currently active VeriStand project.
Open the Workspace to see the affects of the test on channel values while the
stimulus profile executes.
Property/Section Description
Description Specifies a description for the current item. This
text appears when you hover over the item in
the Stimulus Profile Editor.
Update Model Parameters from File Step
Updates parameter values for a simulation model to the values specified in a text
(.txt) file.
Use this step to synchronize parameter value updates with real-time sequences
without stopping the execution of a stimulus profile.
Property/Section Description
Source Specifies the path to the text file that contains
the new model parameter values. The source
file contains a set of key/value pairs that
represent model parameter names and the
corresponding values to assign each parameter.
This file must be a .txt file, and must follow the
expected model parameter file format.
This step also provides limited support for .m
files that follow the exact format generated by
the Model Parameter Manager Workspace tool.
Target Specifies the name of the target, as it appears in
the system definition file, on which the model
executes. This step can only update model
parameters on one target at a time.
Description Specifies a description for the current item. This
text appears when you hover over the item in
the Stimulus Profile Editor.
Advanced Includes the following properties:
■ Alias File—Specifies the path to an
alias file to define mappings for aliased
parameter names in the source file. Alias
files allow you to easily reuse the same
source file for multiple models. For
example, you can write a source file with
parameter names a, b, and c, and then
use an alias file to map a, b, and c to
parameters in the current model.
Alias files must be .txt files that use the
same Delimiter as the source file.
■ Delimiter—Specifies the delimiter
used to separate model parameter names
and values in the source file and, if used,
parameter aliases and names in the alias
file:
■ Tab (Default)
■ Equals
262 ni.com
VeriStand
Property/Section Description
■ Comma
■ Allow Temporary Variables—If True,
specifies to allow temporary variables in
the source file. For example, the following
snippet defines a temporary variable,
tempX, and then uses tempX in an
expression that defines a model
parameter value:
tempX 0.5
{parameter} 10 * tempX
Related concepts:
■ Supported Syntax in Model Parameter Files
Related tasks:
■ Importing and Managing Batches of Model Parameters in the Workspace
Workspace Tools Steps
Opens and communicates with Workspace tools directly from a stimulus profile.
Related reference:
■ Open Workspace Tool Step
■ Send Workspace Tool Message
Open Workspace Tool Step
Opens the workspace tool specified by VI Path.
Property/Section Description
Initialization Time Specifies the time in milliseconds to allow for
the workspace tool to initialize after it loads.
The stimulus profile does not proceed to the
next step until the initialization time elapses.
VI Path Specifies the path to the workspace tool VI.
Description Specifies a description for the current item. This
text appears when you hover over the item in
the Stimulus Profile Editor.
Send Workspace Tool Message
Sends a message or command to a workspace tool VI, as well as data required by
the case in the tool that handles the command.
The tool at the VI Path you specify must be capable of receiving messages.
Property/Section Description
VI Path Specifies the path to the workspace tool VI.
Description Specifies a description for the current item. This
text appears when you hover over the item in
the Stimulus Profile Editor.
Message Details Includes the following properties:
264 ni.com
VeriStand
Property/Section Description
■ Command—Specifies the message or
command to send to the workspace tool.
The tool VI must include code to handle
the command you send. This property
expects a string.
■ Data—Specifies data to send to the
workspace tool. This can be any data that
the code that handles the Command
accepts, but must be a string with a
format that the tool can process.
■ Timeout [ms]—Specifies the amount
of time in milliseconds to wait for a
response from the workspace tool before
timing out.
Other Steps
Add functionality to a stimulus profile.
Examples include displaying a message to the user, replaying a previously recorded
macro (.nivsmacro) file, or grouping steps to better organize and reuse code.
Subpalette Description
FTP Steps Interact with files on an FTP server, such as a
real-time target.
Related reference:
Property/Section Description
Description Specifies a description for the current item. This
text appears when you hover over the item in
the Stimulus Profile Editor.
Command Prompt Includes the following properties that configure
interaction with the Command Prompt:
■ Filename—The name of the
application to pass arguments to. You can
enter a system command (for example,
cmd notepad), a system variable, or the
fully-qualified path to the executable.
■ Arguments—The arguments to pass to
the called application.
■ Hide command shell—If True, runs
the application in an inaccessible
Command Prompt window.
266 ni.com
VeriStand
Property/Section Description
Execution Includes the following properties that configure
step execution:
■ Wait to Complete—If True, blocks
execution of the remainder of the
stimulus profile until the Command
Prompt returns.
Property/Section Description
VeriStand Macro File The path to the macro file to play back.
Playback Mode Specifies the speed at which to play back the
macro file:
■ Ignore Timing—(Default) Plays back
the macro file as fast as possible.
Property/Section Description
■ Use Timing—Plays back the macro file
at the speed at which it was recorded.
Property/Section Description
Message The message that the pop-up displays to the
operator.
Dialog Title The text that appears in the title bar of the pop-
up.
Default Text The text that appears on the button the
operator uses to close out of the pop-up. For
example, OK.
Description Specifies a description for the current item. This
text appears when you hover over the item in
the Stimulus Profile Editor.
Group
Groups steps with no impact on execution.
You can use groups to organize your code. Because a Group is a single item, using
groups makes it easy to move or duplicate a set of steps.
Property/Section Description
Group Name The name of the group.
Description Specifies a description for the current item. This
text appears when you hover over the item in
the Stimulus Profile Editor.
FTP Steps
Interact with files on an FTP server, such as a real-time target.
268 ni.com
VeriStand
Related reference:
■ FTP Download
■
FTP Upload
FTP Download
Downloads files from an FTP server, such as a real-time target. .
Property/Section Description
Description Specifies a description for the current item. This
text appears when you hover over the item in
the Stimulus Profile Editor.
FTP Server Includes the following properties that configure
access to the FTP server:
■ URL—The address of a file or directory
on the FTP server.
Property/Section Description
■ Is Folder?—If TRUE, specifies that URL
is a folder. If FALSE, specifies that URL is a
specific file.
■ Filter—If the path to the files to
transfer is a folder, specifies a regular
expression to use to filter the files in the
folder by filename.
270 ni.com
VeriStand
Property/Section Description
■ Binary—If TRUE, transmits data in
binary form. If FALSE, transmits data as
text.
■ Behavior—Specifies the action to take
if a file of the same name already exists in
the Destination directory.
■ Overwrite—Overwrites the existing
file. This option does not change the
creation date of the file, but it does
change the most recent access date.
■ Skip—Skips the file completely and
does not include it in the download.
■ Unique—Downloads the file and
appends a number to the filename to
create a unique name.
■ Buffer Length—The size of the buffer,
in bytes, to use for streaming data. The
minimum is 2.
FTP Upload
Uploads a file to an FTP server, such as a real-time target.
Property/Section Description
Description Specifies a description for the current item. This
text appears when you hover over the item in
the Stimulus Profile Editor.
FTP Server Includes the following properties that configure
access to the FTP server:
■ URL—The address of a file or directory
on the FTP server.
272 ni.com
VeriStand
Property/Section Description
specifies that this step listens for a
connection on the FTP server.
■ SSL—If TRUE, specifies that data
transmission is encrypted using an SSL
protocol.
Property/Section Description
■ Unique—Downloads the file and
appends a number to the filename to
create a unique name.
■ Buffer Length—The size of the buffer,
in bytes, to use for streaming data. The
minimum is 2.
274 ni.com
VeriStand
Section Description
Return Variable The value the real-time sequence returns
after it executes.
Parameters The inputs and outputs that the
sequence accepts when called and can
pass out to other sequences or the
stimulus profile.
Local Variables Variables you want to access from
statements within the current sequence.
Channel References References that allow you to read/write
system definition channels directly from
a real-time sequence.
Note A sequence can run with warnings, but not errors. You
can save the profile and resolve errors later.
276 ni.com
VeriStand
After creating the real-time sequence, add a call for the real-time sequence to a
stimulus profile. A sequence cannot execute independently of a stimulus profile.
Run the stimulus profile to run the sequence.
Declaring Variables in a Real-Time Sequence
Declare and define the variables a real-time sequence can access and act on.
Before you begin, create a real-time sequence.
Real-time sequences can contain four different sections of variables that appear in
the Variables pane.
Section Description
Return Variable The value the real-time sequence returns after it
executes.
Parameters The inputs and outputs that the sequence
accepts when called and can pass out to other
sequences or the stimulus profile.
Local Variables Variables you want to access from statements
within the current sequence.
Channel References References that allow you to read/write system
definition channels directly from a real-time
sequence.
b. In the Primitives palette, drag a data type from the Variables folder to
the Parameters section of the Variables pane.
c. In the Variables pane, select a variable and use the Property Browser to
configure its Default Assignment, or the channel it maps to.
4. Declare a Local Variable.
a. To conserve memory, select the smallest possible data type that can
hold the value you want to pass into or out of the sequence.
b. In the Primitives palette, drag a data type from the Variables folder to
the Local Variables section of the Variables pane.
c. In the Variables pane, select a variable and use the Property Browser to
configure its Default Value.
5. Declare a Channel Reference.
278 ni.com
VeriStand
After you declare variables, you can include them in expressions that you add to the
sequence code. When you begin entering an Expression in the Property Browser,
VeriStand automatically includes the names of defined variables to the list of values
that appears.
Related tasks:
■ Creating Real-Time Sequences
Related reference:
■
Boolean Variable
■ Void Return Value
Using CSV Files as Real-Time Sequences
Use Comma Separated Values (.csv) files within stimulus profiles to stimulate, fault,
and evaluate channels.
CSV files that you call as real-time sequences return a Boolean return value. This
Boolean is false if the CSV file evaluates a channel that fails to meet any expected
value defined within the CSV file. Otherwise, the Boolean returns true. CSV files that
do not evaluate channels for pass/fail requirements always return true.
Related concepts:
■ CSV File Formatting for Stimulus Profiles
Related tasks:
■ Creating Real-Time Sequences
■
Calling a Real-Time Sequence from Another Sequence
280 ni.com
VeriStand
For all headers that include a ParameterName, VeriStand creates a default channel
assignment based on the format of ParameterName. If ParameterName is a fully
qualified channel path or channel alias, VeriStand uses the full channel or alias as
the default channel assignment. Otherwise, VeriStand treats ParameterName as a
partially qualified alias and creates a fully qualified alias using ParameterName as
the alias name. This new alias is the default channel assignment.
Related tasks:
■
Creating an Alias
CSV File Formatting Examples
Format CSV files to run as real-time sequences or subroutines within a sequence in a
stimulus profile.
The following table displays examples of CSV files based on the goal. The formatting
of the CSV file depends on whether you want to stimulate, fault, and/or evaluate a
channel.
Goal Example
Stimulating a Channel The following CSV file stimulates a channel with
the alias channelX by updating the value of the
channel every 100 milliseconds.
timestamp,channelX
0,0
100,5
200,10
300,20
400,30
500,40
Stimulating Multiple Channels The following CSV file stimulates two channels,
channelX and channelY, by updating the
channel values every 100 milliseconds.
timestamp,channelX,channelY
0,0,-50.5
282 ni.com
VeriStand
Goal Example
100,5,-49
200,10,-46
300,20,-40
400,30,-28
500,40,-4
timestamp,#FLT_STATE#channelX,#FLT_VAL
UE#channelX
0,0,0
100,1,100
200,0,0
300,1,100
400,0,0
500,1,100
timestamp,#EXP(.05;.05;0)#channelX
0,0
100,1
200,0
300,-1
400,0
500,1
Goal Example
channel evaluation in a separate,
parallel task.
Stimulating, Faulting, and Evaluating a Channel The following CSV file stimulates channelX,
faults channelY, and evaluates channelZ every
100 milliseconds.
timestamp,channelX,#FLT_STATE#channelY
,#FLT_VALUE#channelY,#EXP(.05;.05;50)#
channelZ
0,0,0,0,0
100,1,1,100,10
200,0,0,0,0
300,-1,1,100,-10
400,0,0,0,0
500,1,1,100,10
Related tasks:
■ Using CSV Files as Real-Time Sequences
■ Creating an Alias
Calling a Real-Time Sequence from Another Sequence
Call real-time sequences by reference to run multiple sequences in parallel.
You can add references to real-time sequences or CSV files that you call as
sequences, and then call those references from expressions within an existing
sequence.
284 ni.com
VeriStand
4. Use the File dialog box to navigate to the real-time sequence (.nivsseq) or CSV
file you want to reference.
After you add the reference, you can use an expression to call the referenced real-
time sequence.
Generating Errors in a Real-Time Sequence
Configure a real-time sequence to return user-defined error codes and messages in
the stimulus profile test results file.
Note This primitive also allows you to stop the sequence and skip
to the clean-up tasks or to immediately abort the sequence without
performing clean-up tasks.
Goal Function
Clear the last error so it does not appear in clearlasterror
the test results file.
Return the numeric error code of the last getlasterror
error.
The test results file displays the error information in the section that corresponds to
the sequence that generated the error. The following example shows how an error
appears in the test results file:
Goal Tasks
Create a new, empty expression Drag an Expression primitive from the
Expressions palette to the sequence code.
create an expression that automatically Drag a declared variable from the Variables
includes a variable. pane to the sequence code.
create an expression that automatically Drag a real-time sequence from the
includes a sequence Sequences palette or the References pane to
the sequence code.
2. In the Property Browser, build the expression as a mathematical operation.
If the new expression contains a variable that is not already declared in the
sequence, declare the variable.
286 ni.com
VeriStand
Expression Functions
Use functions when editing expressions in the Property Browser.
288 ni.com
VeriStand
290 ni.com
VeriStand
Related reference:
■ Generate Error
Expression Syntax
Use expression syntax similarly to the syntax used in text-based programming
languages.
Your expression syntax must conform to the allowed functions and operator
precedence in the Expression component of the Property Browser.
Note Italicized symbols are terminal symbols given exactly as how you
should reproduce them. The symbol # denotes any number of the term
following it.
assignment:
■ expression
■ left-hand-side assignment-operator assignment
expression:
■ expression binary-operator expression
■ unary-operator expression
■ expression unary-operator
■ expression ? expression : expression
■ ( expression )
■ identifier
■ constant
■ function-name ( argument-list )
left-hand-side:
■ identifier
■ identifier array-subscription
array-subscription:
■ [assignment]
assignment-operator: one of
■ = += –= *= /= >>= <<= &= ^= |= %= **=
binary-operator: one of
292 ni.com
VeriStand
■ digit [non-first-character]
number:
■ integer-constant
■ float-constant
integer-constant:
■ decimal-constant
■ binary-constant
■ hex-constant
decimal-constant:
■ nonzero-digit #digit
binary-constant:
■ 0b #binary-digit
■ 0B #binary-digit
hex-constant:
■ 0x #hex-digit
■ 0X #hex-digit
float-constant:
■ fraction exponent-part
■ decimal-constant exponent-part
fraction:
■ #digit . digit #digit
exponent-part:
■ e [sign] #digit
■ E [sign] #digit
sign: one of
■ +-
294 ni.com
VeriStand
Related concepts:
■ Expression Operator Precedence
Related reference:
■
Expression Functions
Expression Operator Precedence
Operators in real-time sequence expressions have an order to when they execute.
The following table lists the order of precedence for operators from highest to
lowest. Operators on the same line have the same precedence.
Operator Description
** Exponentiation
-, !, ~, ++, and –– Unary negation, logical not, bit complement,
pre- and post-increment, pre- and post-
decrement
*, /, % Multiplication, division, modulus (remainder)
+ and – Addition and subtraction
>> and << Arithmetic shift right and shift left
>, <, >=, and <= Greater, less, greater or equal, and less or equal
!= and == Inequality and equality
& Bit and
^ Bit exclusive or
| Bit or
&& Logical and
|| Logical or
?: Conditional evaluation
= op= Assignment, shortcut operate and assignop can
be +, –, *, /, >>, <<, &, ^, |, %, or **.
The assignment operator = is right associative (groups right to left), as is the
exponentiation operator **. All other binary operators are left associative.
The numeric value of TRUE is 1, and FALSE is 0 for output. The logical value of 0 is
FALSE, and any nonzero number is TRUE. The logical value of the conditional
expression
The process for calling CSV files from an expression is the same as for real-time
sequence (.nivsseq) files. You must add a reference to the CSV file, and each channel
in the CSV file requires a parameter in the function call.
Note If the dividend, divisor, and result are all of type I32, the division
operator performs an integer division and returns a result of data type I32.
The quotient function method rounds the result of the division towards minus
infinity.
296 ni.com
VeriStand
Depending on your goal, use a division method with your expression function or
operator.
Goal Method
Perform an integer division and want the result Division Operator (/)
as a double
Perform an integer division and want the result Quotient Function
as an integer rounded towards minus infinity
Divide U64 integers
The result of the function (operator) is either the data type of the dividend or the
divisor. This is determined by the largest data type, according to this order: Double >
U64 > I64 > U32 > I32.
If the result is passed to another data type, VeriStand performs an implicit cast. An
implicit cast converts one data type to another. For example, if a double is converted
to an integer, the resulting number is rounded toward zero. This may lead to
unexpected values.
The following table shows the results of different functions in the case of division by
zero.
Note While the fault is active, it overrides any attempts to set the
value of the faulted channel, whether from mappings or from the
VeriStand Editor or Workspace.
■The clearfault(x) function clears any faults from the specified channel (x).
Once cleared, any mappings resume.
In the following real-time sequence, the parameter ao0 is mapped to the system
definition channel PXI FPGA AO0. The real-time sequence faults the value of PXI
FPGA AO0 to -10.0, waits five seconds, and then clears the fault.
Related tasks:
■ Creating Real-Time Sequences
■ Adding and Editing Expressions in a Real-Time Sequence
Related reference:
■ Expression Functions
Variables for Reading and Writing Channels in a Real-Time Sequence
Use parameter and channel reference variables to read or write system definition
channels.
There are key differences between how parameters and channel references access
channels. Use the following table to determine the best variable type to read or
write channels in your real-time sequence.
298 ni.com
VeriStand
■ Configure the
parameter
assignments so
that the
appropriate SeqA
parameter is
assigned to
MyChannel.
Subpalette Description
Advanced Primitives Configure advanced operations in the real-time
sequence code.
Expressions Primitives Assign values to and perform operations on
variables in a real-time sequence.
Miscellaneous Primitives Add cosmetic and informational elements to
real-time sequence code.
Structures Primitives Add programming structures, such as loops and
conditional statements, to the real-time
sequence code.
Variables Primitives Create and configure variables that a real-time
sequence can access and act on.
Related reference:
■ Advanced Primitives
■ Expressions Primitives
■ Miscellaneous Primitives
300 ni.com
VeriStand
■ Structures Primitives
■ Variables Primitives
Advanced Primitives
Configure advanced operations in the real-time sequence code.
Property/Section Description
Description Specifies a description for the current item. This
text appears when you hover over the item in
the Stimulus Profile Editor.
Expressions Primitives
Assign values to and perform operations on variables in a real-time sequence.
Related reference:
■ Assignment Primitive
■
Expression Syntax
Assignment Primitive
Property/Section Description
Expression Specifies the expression to evaluate. You can
include real-time sequence variables,
supported functions, and operators in an
expression.
Description Specifies a description for the current item. This
text appears when you hover over the item in
the Stimulus Profile Editor.
Expression Syntax
A statement that can operate on variables in a real-time sequence.
For example, VarName * 2 is an expression that multiplies the value of a variable,
VarName, by 2. Expressions are the building blocks of real-time sequence code, and
must follow the expected syntax.
Property/Section Description
Expression Specifies the expression to evaluate. You can
include real-time sequence variables,
supported functions, and operators in an
expression.
Description Specifies a description for the current item. This
text appears when you hover over the item in
the Stimulus Profile Editor.
Miscellaneous Primitives
Add cosmetic and informational elements to real-time sequence code.
The primitives on this palette do not affect the execution of sequence code.
302 ni.com
VeriStand
Related reference:
■ Block
■
Comment
■ Generate Error
Block
Organize your real-time sequence code.
A block is a list of functional statements to execute. Because a block is itself a single
statement, you also can use blocks to easily duplicate or move related statements.
The predefined sections of a real-time sequence, Setup, Main, and Clean Up, are
examples of code blocks. Blocks have no effect on the execution of the code.
Property/Section Description
Name The name of the block.
Description Specifies a description for the current item. This
text appears when you hover over the item in
the Stimulus Profile Editor.
Comment
Document in your real-time sequence code.
Comments have no effect on the execution of the code.
Property/Section Description
Comment The text of the comment.
Description Specifies a description for the current item. This
text appears when you hover over the item in
the Stimulus Profile Editor.
Generate Error
Create and return a user-defined error code and message in the stimulus profile test
results file.
You can also configure this primitive to stop the sequence and skip to the clean-up
tasks or to immediately abort the sequence without performing clean-up tasks. Only
the most recent error appears in the test results file because the most recent error
overwrites any previous error that occurred.
Property/Section Description
Description Specifies a description for the current item. This
text appears when you hover over the item in
the Stimulus Profile Editor.
Error Code Specifies the numeric value to return.
Message Specifies a string that you want to append to
the Error Code in the test results file.
Action to Take Specifies how to proceed through the
remainder of the real-time sequence:
■ ContinueSequenceExecution—
Continues normal execution of the real-
time sequence.
■ StopSequence—Halts execution and
runs the tasks under the Clean Up node.
■ AbortSequence—Immediately halts
execution without running tasks under
the Clean Up node.
The test results file displays the error code and message in the section that
corresponds to the sequence that generated the error. The following example shows
how an error appears in the test results file:
Outcome: Error: 55. Details: <append> ========================= NI VeriStand:
Alert! The Engine Temperature is outside the critical range. Shutting down the
engine.
Structures Primitives
Add programming structures, such as loops and conditional statements, to the real-
time sequence code.
Subpalette Description
Conditional Statements Use the Conditional statements to execute
different code under different, specified
conditions.
Loops Use Loops to add structures that repeat a
section of real-time sequence code a specified
304 ni.com
VeriStand
Subpalette Description
number of times or while a specified condition
is TRUE.
Multitasking Primitives Use the Multitasking primitives to divide real-
time sequence code into multiple tasks that
execute in parallel.
Related reference:
■
Conditional Statements
■ Loops
■ Multitasking Primitives
Conditional Statements
Use the Conditional statements to execute different code under different, specified
conditions.
Subpalette Description
Switch Statement Primitives Use the Switch Statement primitives to create
different cases of code to execute based on the
value of a test expression.
Related reference:
■ If Else
■ Switch Statement Primitives
If Else
A statement that defines an expression to evaluate to determine whether to execute
one section of code or another.
When you add an If Else statement to your real-time sequence code, the editor
automatically generates Then and Else blocks under the statement. If the Test
Expression evaluates to TRUE, the statement executes the code under the Then
block. If the expression evaluates to FALSE, the statement executes the code under
the Else block.
To specify the code that each block executes, drag expressions and other primitives
to the blocks and configure them as you would any other section of sequence code.
Property/Section Description
Test Expression Specifies the expression to evaluate to
determine the code to execute.
Description Specifies a description for the current item. This
text appears when you hover over the item in
the Stimulus Profile Editor.
Switch Statement Primitives
Use the Switch Statement primitives to create different cases of code to execute
based on the value of a test expression.
Related reference:
■
Case Statement
■ Switch Primitive
Case Statement
A functional statement under which you add code that executes if a test condition is
met.
A case statement executes if its Case Value matches the value of the Test
Expression for the Switch statement that contains the case.
To specify the code that the case executes, drag expressions and other primitives to
the case and configure them as you would any other section of sequence code.
306 ni.com
VeriStand
Property/Section Description
Case Value The value to check against the Test
Expression for the Switch statement. If the two
values match, this case executes.
Description Specifies a description for the current item. This
text appears when you hover over the item in
the Stimulus Profile Editor.
Switch Primitive
A statement that defines an expression to evaluate to determine which section of
code, or Case Statement, to execute.
The Switch statement executes the case with the Case Value that matches the
value of the Test Expression. If no cases match the test value, a default case
executes instead. When you add a Switch to your real-time sequence code, the
editor automatically creates a Cases section for the test cases and a DefaultCase,
which is another Case Statement.
Build your test code by adding additional cases to the Cases section. You can then
add code to define the execution of each case, including the default.
Property/Section Description
Test Expression Specifies the expression to evaluate to
determine the code to execute.
Description Specifies a description for the current item. This
text appears when you hover over the item in
the Stimulus Profile Editor.
Loops
Use Loops to add structures that repeat a section of real-time sequence code a
specified number of times or while a specified condition is TRUE.
Related reference:
■ DoWhile Loop
■ For Loop
■ ForEach Loop
■
While Loop
DoWhile Loop
A collection of statements that execute once and then continue executing for as long
as the Repeat While expression evaluates to TRUE.
Configure the code that executes in the loop by dragging expressions and other
primitives to the loop and configuring them as you would any other section of
sequence code.
Property/Section Description
Repeat While Specifies the expression to evaluate to
determine if the loop continues to execute. The
loop executes as long as this expression
evaluates to TRUE.
Auto Yield If TRUE, specifies that the loop automatically
yields control of the CPU to the next task at the
end of each iteration.
Description Specifies a description for the current item. This
text appears when you hover over the item in
the Stimulus Profile Editor.
For Loop
308 ni.com
VeriStand
Property/Section Description
Iteration Count The number of iterations the loop executes.
Loop Variable Specifies the identifier, or name, for the variable
that holds the current iteration count for the
loop. You can use this variable in other
expressions within the real-time sequence.
Auto Yield If TRUE, specifies that the loop automatically
yields control of the CPU to the next task at the
end of each iteration.
Description Specifies a description for the current item. This
text appears when you hover over the item in
the Stimulus Profile Editor.
ForEach Loop
A collection of statements that executes one time for each element in the array
specified by the Array Expression.
Configure the code that executes in the loop by dragging expressions and other
primitives to the loop and configuring them as you would any other section of
sequence code.
Property/Section Description
Loop Variable Specifies the identifier, or name, for the variable
that holds the current iteration count for the
loop. You can use this variable in other
expressions within the real-time sequence.
Array Expression Defines the array of items that the loop iterates
over.
Auto Yield If TRUE, specifies that the loop automatically
yields control of the CPU to the next task at the
end of each iteration.
Property/Section Description
Description Specifies a description for the current item. This
text appears when you hover over the item in
the Stimulus Profile Editor.
While Loop
A collection of statements that execute continuously for as long as the Repeat
While expression evaluates to TRUE.
Configure the code that executes in the loop by dragging expressions and other
primitives to the loop and configuring them as you would any other section of
sequence code.
Property/Section Description
Repeat While Specifies the expression to evaluate to
determine if the loop continues to execute. The
loop executes as long as this expression
evaluates to TRUE.
Auto Yield If TRUE, specifies that the loop automatically
yields control of the CPU to the next task at the
end of each iteration.
Description Specifies a description for the current item. This
text appears when you hover over the item in
the Stimulus Profile Editor.
Multitasking Primitives
Use the Multitasking primitives to divide real-time sequence code into multiple
tasks that execute in parallel.
Related reference:
■
MultiTask Structure
■ Stop Task
310 ni.com
VeriStand
■ Task
MultiTask Structure
A structure that branches real-time sequence code execution into one or more child
tasks.
On each time step, the MultiTask structure iteratively executes code from each child
task until the task either terminates or yields execution to the next time step.
MultiTask structures have two child tasks by default, but you can add more Task
primitives from the Multitasking palette.
Property/Section Description
Description Specifies a description for the current item. This
text appears when you hover over the item in
the Stimulus Profile Editor.
Stop Task
Stops a Task in a MultiTask structure.
When a task stops, any subsequences executing in that task immediately execute
their Clean Up block and any sub-tasks stop.
Property/Section Description
Task Name Specify the task name.
Description Specifies a description for the current item. This
text appears when you hover over the item in
the Stimulus Profile Editor.
Task
A block of code in a MultiTask structure.
On each time step, the MultiTask structure iteratively executes code from each child
Task that it contains. A Task cannot exist outside of a MultiTask structure. Configure
the code that executes as part of the task by dragging expressions and other
primitives to the task and configuring them as you would any other section of
sequence code.
Property/Section Description
Task Name Specify the task name.
Property/Section Description
Description Specifies a description for the current item. This
text appears when you hover over the item in
the Stimulus Profile Editor.
Variables Primitives
Create and configure variables that a real-time sequence can access and act on.
Drag a variable to the Variables pane to configure its properties. You can drag most
variables directly to the sequence code to create an expression that sets the value of
a variable.
Subpalette Description
Array Variables Primitives Use the Array Variables primitives to create
variables that are arrays of values of a certain
data type.
Related reference:
■ Boolean Variable
■ Double Variable
■ Int32 Variable
■ Int64 Variable
■ UInt32 Variable
■ UInt64 Variable
■ Void Return Value
312 ni.com
VeriStand
Property/Section Description
Identifier Specifies the name of the variable. Use this
string to identify the variable in expressions.
Evaluation Method Specifies whether to evaluate the parameter by
value or by reference. ByReference is
appropriate for most use cases, where
parameters map to channels in a system
definition, because calling by reference allows
changes to the value of the channel to
propagate across all sequences that use the
parameter.
■ ByReference—When another real-
time sequence calls this real-time
sequence as a subsequence, the calling
sequence operates directly on the
mapped variable value. If the
subsequence updates the parameter
value, the mapped variable in the calling
sequence also is updated. If the calling
sequence updates the mapped variable
value while the subsequence executes
from another task, the parameter value in
the subsequence updates as well.
ByReference parameters can only be
called by variables of the same data type
as the parameter.
■ ByValue—When another real-time
sequence calls this real-time sequence as
a subsequence, the parameter maps a
copy of the variable value. If the calling
sequence updates the mapped variable
value while the subsequence executes,
Property/Section Description
the parameter value in the subsequence
is not affected. If the subsequence
modifies the parameter value while the
subsequence executes, the value of the
mapped variable in the calling sequence
is not affected. ByValue parameters can
be called by variables of any logical data
type.
314 ni.com
VeriStand
Property/Section Description
Identifier Specifies the name of the variable. Use this
string to identify the variable in expressions.
Evaluation Method Specifies whether to evaluate the parameter by
value or by reference. ByReference is
appropriate for most use cases, where
parameters map to channels in a system
definition, because calling by reference allows
changes to the value of the channel to
propagate across all sequences that use the
parameter.
■ ByReference—When another real-
time sequence calls this real-time
sequence as a subsequence, the calling
sequence operates directly on the
mapped variable value. If the
subsequence updates the parameter
value, the mapped variable in the calling
sequence also is updated. If the calling
sequence updates the mapped variable
value while the subsequence executes
from another task, the parameter value in
the subsequence updates as well.
ByReference parameters can only be
called by variables of the same data type
as the parameter.
■ ByValue—When another real-time
sequence calls this real-time sequence as
a subsequence, the parameter maps a
copy of the variable value. If the calling
sequence updates the mapped variable
value while the subsequence executes,
the parameter value in the subsequence
is not affected. If the subsequence
modifies the parameter value while the
subsequence executes, the value of the
mapped variable in the calling sequence
is not affected. ByValue parameters can
Property/Section Description
be called by variables of any logical data
type.
Property/Section Description
Identifier Specifies the name of the variable. Use this
string to identify the variable in expressions.
Evaluation Method Specifies whether to evaluate the parameter by
value or by reference. ByReference is
appropriate for most use cases, where
parameters map to channels in a system
definition, because calling by reference allows
316 ni.com
VeriStand
Property/Section Description
changes to the value of the channel to
propagate across all sequences that use the
parameter.
■ ByReference—When another real-
time sequence calls this real-time
sequence as a subsequence, the calling
sequence operates directly on the
mapped variable value. If the
subsequence updates the parameter
value, the mapped variable in the calling
sequence also is updated. If the calling
sequence updates the mapped variable
value while the subsequence executes
from another task, the parameter value in
the subsequence updates as well.
ByReference parameters can only be
called by variables of the same data type
as the parameter.
■ ByValue—When another real-time
sequence calls this real-time sequence as
a subsequence, the parameter maps a
copy of the variable value. If the calling
sequence updates the mapped variable
value while the subsequence executes,
the parameter value in the subsequence
is not affected. If the subsequence
modifies the parameter value while the
subsequence executes, the value of the
mapped variable in the calling sequence
is not affected. ByValue parameters can
be called by variables of any logical data
type.
Property/Section Description
unless you override the parameter value when
you call the real-time sequence from a stimulus
profile.
You can specify a channel by its alias or by the
path to the channel in the system definition, for
example: Targets/Controller/System Channels/
Model Count
This property only appears if you use the
variable as a parameter.
Default Value Specifies the default or initial value of the local
variable. This property only appears if you use
the variable as a local variable.
Units Specifies the units to associate with the variable
value.
Description Specifies a description for the current item. This
text appears when you hover over the item in
the Stimulus Profile Editor.
Int64 Variable
A 64-bit signed integer.
Property/Section Description
Identifier Specifies the name of the variable. Use this
string to identify the variable in expressions.
Evaluation Method Specifies whether to evaluate the parameter by
value or by reference. ByReference is
appropriate for most use cases, where
parameters map to channels in a system
definition, because calling by reference allows
changes to the value of the channel to
propagate across all sequences that use the
parameter.
■ ByReference—When another real-
time sequence calls this real-time
sequence as a subsequence, the calling
sequence operates directly on the
mapped variable value. If the
subsequence updates the parameter
318 ni.com
VeriStand
Property/Section Description
value, the mapped variable in the calling
sequence also is updated. If the calling
sequence updates the mapped variable
value while the subsequence executes
from another task, the parameter value in
the subsequence updates as well.
ByReference parameters can only be
called by variables of the same data type
as the parameter.
■ ByValue—When another real-time
sequence calls this real-time sequence as
a subsequence, the parameter maps a
copy of the variable value. If the calling
sequence updates the mapped variable
value while the subsequence executes,
the parameter value in the subsequence
is not affected. If the subsequence
modifies the parameter value while the
subsequence executes, the value of the
mapped variable in the calling sequence
is not affected. ByValue parameters can
be called by variables of any logical data
type.
Property/Section Description
Default Value Specifies the default or initial value of the local
variable. This property only appears if you use
the variable as a local variable.
Units Specifies the units to associate with the variable
value.
Description Specifies a description for the current item. This
text appears when you hover over the item in
the Stimulus Profile Editor.
UInt32 Variable
A 32-bit unsigned integer.
Property/Section Description
Identifier Specifies the name of the variable. Use this
string to identify the variable in expressions.
Evaluation Method Specifies whether to evaluate the parameter by
value or by reference. ByReference is
appropriate for most use cases, where
parameters map to channels in a system
definition, because calling by reference allows
changes to the value of the channel to
propagate across all sequences that use the
parameter.
■ ByReference—When another real-
time sequence calls this real-time
sequence as a subsequence, the calling
sequence operates directly on the
mapped variable value. If the
subsequence updates the parameter
value, the mapped variable in the calling
sequence also is updated. If the calling
sequence updates the mapped variable
value while the subsequence executes
from another task, the parameter value in
the subsequence updates as well.
ByReference parameters can only be
called by variables of the same data type
as the parameter.
320 ni.com
VeriStand
Property/Section Description
■ ByValue—When another real-time
sequence calls this real-time sequence as
a subsequence, the parameter maps a
copy of the variable value. If the calling
sequence updates the mapped variable
value while the subsequence executes,
the parameter value in the subsequence
is not affected. If the subsequence
modifies the parameter value while the
subsequence executes, the value of the
mapped variable in the calling sequence
is not affected. ByValue parameters can
be called by variables of any logical data
type.
UInt64 Variable
A 64-bit unsigned integer.
Property/Section Description
Identifier Specifies the name of the variable. Use this
string to identify the variable in expressions.
Evaluation Method Specifies whether to evaluate the parameter by
value or by reference. ByReference is
appropriate for most use cases, where
parameters map to channels in a system
definition, because calling by reference allows
changes to the value of the channel to
propagate across all sequences that use the
parameter.
■ ByReference—When another real-
time sequence calls this real-time
sequence as a subsequence, the calling
sequence operates directly on the
mapped variable value. If the
subsequence updates the parameter
value, the mapped variable in the calling
sequence also is updated. If the calling
sequence updates the mapped variable
value while the subsequence executes
from another task, the parameter value in
the subsequence updates as well.
ByReference parameters can only be
called by variables of the same data type
as the parameter.
■ ByValue—When another real-time
sequence calls this real-time sequence as
a subsequence, the parameter maps a
copy of the variable value. If the calling
sequence updates the mapped variable
value while the subsequence executes,
the parameter value in the subsequence
is not affected. If the subsequence
modifies the parameter value while the
subsequence executes, the value of the
mapped variable in the calling sequence
322 ni.com
VeriStand
Property/Section Description
is not affected. ByValue parameters can
be called by variables of any logical data
type.
Note You cannot use this variable for anything other than a return
variable.
Property/Section Description
Identifier Specifies the name of the variable. Use this
string to identify the variable in expressions.
Property/Section Description
Units Specifies the units to associate with the variable
value.
Description Specifies a description for the current item. This
text appears when you hover over the item in
the Stimulus Profile Editor.
Array Variables Primitives
Use the Array Variables primitives to create variables that are arrays of values of a
certain data type.
Property/Section Description
Identifier Specifies the name of the variable. Use this
string to identify the variable in expressions.
Evaluation Method Specifies whether to evaluate the parameter by
value or by reference. ByReference is
appropriate for most use cases, where
parameters map to channels in a system
definition, because calling by reference allows
changes to the value of the channel to
propagate across all sequences that use the
parameter.
324 ni.com
VeriStand
Property/Section Description
■ ByReference—When another real-
time sequence calls this real-time
sequence as a subsequence, the calling
sequence operates directly on the
mapped variable value. If the
subsequence updates the parameter
value, the mapped variable in the calling
sequence also is updated. If the calling
sequence updates the mapped variable
value while the subsequence executes
from another task, the parameter value in
the subsequence updates as well.
ByReference parameters can only be
called by variables of the same data type
as the parameter.
■ ByValue—When another real-time
sequence calls this real-time sequence as
a subsequence, the parameter maps a
copy of the variable value. If the calling
sequence updates the mapped variable
value while the subsequence executes,
the parameter value in the subsequence
is not affected. If the subsequence
modifies the parameter value while the
subsequence executes, the value of the
mapped variable in the calling sequence
is not affected. ByValue parameters can
be called by variables of any logical data
type.
Property/Section Description
You can specify a channel by its alias or by the
path to the channel in the system definition, for
example: Targets/Controller/System Channels/
Model Count
This property only appears if you use the
variable as a parameter.
Default Value Specifies the default or initial value of the local
variable. This property only appears if you use
the variable as a local variable.
Units Specifies the units to associate with the variable
value.
Description Specifies a description for the current item. This
text appears when you hover over the item in
the Stimulus Profile Editor.
Double Array Variable
An array of double-precision, floating point numbers.
Property/Section Description
Identifier Specifies the name of the variable. Use this
string to identify the variable in expressions.
Evaluation Method Specifies whether to evaluate the parameter by
value or by reference. ByReference is
appropriate for most use cases, where
parameters map to channels in a system
definition, because calling by reference allows
changes to the value of the channel to
propagate across all sequences that use the
parameter.
■ ByReference—When another real-
time sequence calls this real-time
sequence as a subsequence, the calling
sequence operates directly on the
mapped variable value. If the
subsequence updates the parameter
value, the mapped variable in the calling
sequence also is updated. If the calling
326 ni.com
VeriStand
Property/Section Description
sequence updates the mapped variable
value while the subsequence executes
from another task, the parameter value in
the subsequence updates as well.
ByReference parameters can only be
called by variables of the same data type
as the parameter.
■ ByValue—When another real-time
sequence calls this real-time sequence as
a subsequence, the parameter maps a
copy of the variable value. If the calling
sequence updates the mapped variable
value while the subsequence executes,
the parameter value in the subsequence
is not affected. If the subsequence
modifies the parameter value while the
subsequence executes, the value of the
mapped variable in the calling sequence
is not affected. ByValue parameters can
be called by variables of any logical data
type.
Property/Section Description
Default Value Specifies the default or initial value of the local
variable. This property only appears if you use
the variable as a local variable.
Units Specifies the units to associate with the variable
value.
Description Specifies a description for the current item. This
text appears when you hover over the item in
the Stimulus Profile Editor.
Imported Double Array Variable
An array of Boolean values.
To create this type of variable, right-click Local Variables in the Variables pane
and select Import Double Array from File. In the file dialog box that displays,
select a file whose data you want to import. The Import Double Array from File
dialog box displays, which you use to select which channels you want to import as
local variables, specify how much data to import, and preview the channel data.
When you click OK, the variable(s) appear in the list of local variables.
Note You cannot add this type of variable from a palette or drag it to the
Return Variable or Parameters sections in the Variables pane.
Property/Section Description
Identifier Specifies the name of the variable. Use this
string to identify the variable in expressions.
Properties Includes the following properties that allow you
to select an import file or that display
information about the data that VeriStand will
import from File Path:
■ File Path—Specifies the path of the file
from which to import values. You can
change the import file after you create the
variable; however, you cannot change
other properties you set in the Import
Double Array from File dialog box when
328 ni.com
VeriStand
Property/Section Description
you create the variable, such as the
Number of Values
■ Channel—Displays the name of the
channel in the import file that contains
data you want to import.
■ Channel Group—Displays the name
of the group in the import file that owns
the Channel.
■ Subset Start Value—Displays the
index of the first value imported from the
file.
■ Number of Values—Displays the
number of values imported from the file,
starting at the Subset Start Value index.
■ Offset—Displays the amount by which
channel values are offset along the y-axis.
■ Scale—Displays the multiplier by
which channel values are scaled along the
y-axis.
Property/Section Description
Identifier Specifies the name of the variable. Use this
string to identify the variable in expressions.
Evaluation Method Specifies whether to evaluate the parameter by
value or by reference. ByReference is
appropriate for most use cases, where
parameters map to channels in a system
definition, because calling by reference allows
Property/Section Description
changes to the value of the channel to
propagate across all sequences that use the
parameter.
■ ByReference—When another real-
time sequence calls this real-time
sequence as a subsequence, the calling
sequence operates directly on the
mapped variable value. If the
subsequence updates the parameter
value, the mapped variable in the calling
sequence also is updated. If the calling
sequence updates the mapped variable
value while the subsequence executes
from another task, the parameter value in
the subsequence updates as well.
ByReference parameters can only be
called by variables of the same data type
as the parameter.
■ ByValue—When another real-time
sequence calls this real-time sequence as
a subsequence, the parameter maps a
copy of the variable value. If the calling
sequence updates the mapped variable
value while the subsequence executes,
the parameter value in the subsequence
is not affected. If the subsequence
modifies the parameter value while the
subsequence executes, the value of the
mapped variable in the calling sequence
is not affected. ByValue parameters can
be called by variables of any logical data
type.
330 ni.com
VeriStand
Property/Section Description
unless you override the parameter value when
you call the real-time sequence from a stimulus
profile.
You can specify a channel by its alias or by the
path to the channel in the system definition, for
example: Targets/Controller/System Channels/
Model Count
This property only appears if you use the
variable as a parameter.
Default Value Specifies the default or initial value of the local
variable. This property only appears if you use
the variable as a local variable.
Units Specifies the units to associate with the variable
value.
Description Specifies a description for the current item. This
text appears when you hover over the item in
the Stimulus Profile Editor.
Int64 Array Variable
An array of 64-bit signed integers.
Property/Section Description
Identifier Specifies the name of the variable. Use this
string to identify the variable in expressions.
Evaluation Method Specifies whether to evaluate the parameter by
value or by reference. ByReference is
appropriate for most use cases, where
parameters map to channels in a system
definition, because calling by reference allows
changes to the value of the channel to
propagate across all sequences that use the
parameter.
■ ByReference—When another real-
time sequence calls this real-time
sequence as a subsequence, the calling
sequence operates directly on the
mapped variable value. If the
Property/Section Description
subsequence updates the parameter
value, the mapped variable in the calling
sequence also is updated. If the calling
sequence updates the mapped variable
value while the subsequence executes
from another task, the parameter value in
the subsequence updates as well.
ByReference parameters can only be
called by variables of the same data type
as the parameter.
■ ByValue—When another real-time
sequence calls this real-time sequence as
a subsequence, the parameter maps a
copy of the variable value. If the calling
sequence updates the mapped variable
value while the subsequence executes,
the parameter value in the subsequence
is not affected. If the subsequence
modifies the parameter value while the
subsequence executes, the value of the
mapped variable in the calling sequence
is not affected. ByValue parameters can
be called by variables of any logical data
type.
332 ni.com
VeriStand
Property/Section Description
This property only appears if you use the
variable as a parameter.
Default Value Specifies the default or initial value of the local
variable. This property only appears if you use
the variable as a local variable.
Units Specifies the units to associate with the variable
value.
Description Specifies a description for the current item. This
text appears when you hover over the item in
the Stimulus Profile Editor.
UInt32 Array Variable
An array of 32-bit unsigned integers.
Property/Section Description
Identifier Specifies the name of the variable. Use this
string to identify the variable in expressions.
Evaluation Method Specifies whether to evaluate the parameter by
value or by reference. ByReference is
appropriate for most use cases, where
parameters map to channels in a system
definition, because calling by reference allows
changes to the value of the channel to
propagate across all sequences that use the
parameter.
■ ByReference—When another real-
time sequence calls this real-time
sequence as a subsequence, the calling
sequence operates directly on the
mapped variable value. If the
subsequence updates the parameter
value, the mapped variable in the calling
sequence also is updated. If the calling
sequence updates the mapped variable
value while the subsequence executes
from another task, the parameter value in
the subsequence updates as well.
Property/Section Description
ByReference parameters can only be
called by variables of the same data type
as the parameter.
■ ByValue—When another real-time
sequence calls this real-time sequence as
a subsequence, the parameter maps a
copy of the variable value. If the calling
sequence updates the mapped variable
value while the subsequence executes,
the parameter value in the subsequence
is not affected. If the subsequence
modifies the parameter value while the
subsequence executes, the value of the
mapped variable in the calling sequence
is not affected. ByValue parameters can
be called by variables of any logical data
type.
334 ni.com
VeriStand
Property/Section Description
Units Specifies the units to associate with the variable
value.
Description Specifies a description for the current item. This
text appears when you hover over the item in
the Stimulus Profile Editor.
UInt64 Array Variable
An array of 64-bit unsigned integers.
Property/Section Description
Identifier Specifies the name of the variable. Use this
string to identify the variable in expressions.
Evaluation Method Specifies whether to evaluate the parameter by
value or by reference. ByReference is
appropriate for most use cases, where
parameters map to channels in a system
definition, because calling by reference allows
changes to the value of the channel to
propagate across all sequences that use the
parameter.
■ ByReference—When another real-
time sequence calls this real-time
sequence as a subsequence, the calling
sequence operates directly on the
mapped variable value. If the
subsequence updates the parameter
value, the mapped variable in the calling
sequence also is updated. If the calling
sequence updates the mapped variable
value while the subsequence executes
from another task, the parameter value in
the subsequence updates as well.
ByReference parameters can only be
called by variables of the same data type
as the parameter.
■ ByValue—When another real-time
sequence calls this real-time sequence as
a subsequence, the parameter maps a
Property/Section Description
copy of the variable value. If the calling
sequence updates the mapped variable
value while the subsequence executes,
the parameter value in the subsequence
is not affected. If the subsequence
modifies the parameter value while the
subsequence executes, the value of the
mapped variable in the calling sequence
is not affected. ByValue parameters can
be called by variables of any logical data
type.
336 ni.com
VeriStand
Enable the Stimulus Profile Editor to automatically open stimulus profile test
results.
Each time you run a stimulus profile, VeriStand produces a test results file that
adheres to the Automatic Test Markup Language (ATML) standard.
After a stimulus profile finishes running, the ATML Test Report will open in a web
browser.
Alter the appearance of the test report by modifying its style sheet.
Related concepts:
■ Automatic Test Markup Language (ATML) Standard
Related tasks:
■ Customizing ATML Test Result Appearance
Automatic Test Markup Language (ATML) Standard
ATML is a military and aerospace industry standard for sharing data between
different components of a test system and supports test program, test asset, and
unit under test (UUT) interoperability within an automatic test environment.
ATML accomplishes this through a standard XML schema for exchanging UUT test
and diagnostic information between components of the test system. ATML specifies
standards for test environments that encompass the total product life cycle. ATML
defines an integrated set of test-related information that supports the information
needs of test environments for testing applications.
ATML standards focus on the following areas:
■ Diagnostics
■ Instrument Description
■ Test Adapter
■ Test Configuration
■ Test Description
■ Test Results and Session Information
■ Test Station
■ UUT Description
Purpose
ATML is intended to accomplish the following objectives:
■ Facilitate the communication, sharing, and reuse of product design and test
information for the purpose of testing the product.
■ Facilitate test program set (TPS) portability and interoperability.
■ Facilitate instrument interchangeability.
■ Facilitate the development, integration, and use of test software and test
software development tools.
■ Support the application of integrated diagnostics.
■ Support modular software architectures based upon a framework that
supports reusable software products.
338 ni.com
VeriStand
schema the ATML standard defines. VeriStand applies a style sheet to that report to
define how a web browser displays the content of the report. When you open the
report in a web browser, the web browser uses this file to transform the XML report
into formatted HTML.
VeriStand contains two style sheets you can use. Both template XSL files are located
in the <Application Data>VeriStand\Data Storage\ATML directory.
■ TRML.xsl—Displays reports in a vertical, tabular, indented format with data
for each step in multiple rows. This is the default style sheet.
■ TR_Horizontal.xsl—Displays reports in a concise tabular format with expand
and collapse sections.
To switch between these style sheets, use the following steps.
Stimulus Profile Editor provides support for both triggered and segmented logging
to help you manage large data sets and long test scenarios.
3. Click Start Logging Configuration in the stimulus profile code and use the
Property Browser to configure the following properties.
Property Description
Configuration Name The name you want to use to start and stop
logging.
File Path The name and location for a resulting log
file.
Timestamp Filename Whether to append the start time of the
logging operation to the name of the log file.
Replace Existing File Whether to replace an existing file with the
same filename. If you disable this property,
the Stimulus Profile Editor appends any new
log data to the existing file.
This property performs a basic append, so
you will need to use the channel data in the
final file to determine where new data is
appended.
Log Rate [Hz] The Stimulus Profile Editor logs data at the
closest possible rate to this value without
exceeding the rate at which the target
produces data.
340 ni.com
VeriStand
Property Description
Triggered Logging Configure trigger conditions to specify when
data logging starts and stop. If you do not
configure triggers, the Stimulus Profile
Editor continuously logs all specified
channel data beginning when the Start
Logging step executes.
4. Click the Channel Group step and configure the following properties.
Property Description
Channel Group Name The name of the channel group used in the
TDMS file.
Channels Adds channels or aliases to the channel
group.
5. If you want to log data in multiple channel groups, add additional Channel
Group steps under Start Logging Configuration.
6. Add a Stop Logging step after the Real-Time Sequence Call step, and set
the Configuration Name to the name you specified in the Start Logging
step.
7. Save and run the stimulus profile.
The Stimulus Profile Editor logs data on channels using the triggers and file
segmenting you specified.
Related tasks:
■ Creating Stimulus Profiles
■ Calling a Real-Time Sequence from a Stimulus Profile
Related reference:
■ Start Logging Step
■ Channel Group Step
■
Stop Logging Step
Configuring Triggered Logging in Stimulus Profiles
Use triggered logging in stimulus profiles if you want to see channel data under
certain conditions, such as those that you might expect to cause the unit under test
(UUT) to fail.
When you use the Stimulus Profile Editor to log real-time test data, you can
configure start and stop triggers for logging. The editor logs channel data while the
start trigger condition is TRUE and the stop trigger condition is FALSE.
You can also configure pre-triggered and post-triggered data logging. This saves the
channel data immediately before a start trigger and after a stop trigger. For
example, if the start trigger represents a fault in the system, and the stop trigger
represents a return to expected values, it can be useful to see the behavior of the
system that lead to the fault and how well the system recovers.
4. Set the Trigger Condition and the corresponding High Limit and Low
Limit values.
342 ni.com
VeriStand
7. If you want to specify an amount of channel data to log after a stop trigger
occurs, set a value for Post-Trigger Duration.
8. Click Save.
Related tasks:
■ Logging Real-Time Test Data with the Stimulus Profile Editor
Related reference:
■ Start Logging Step
344 ni.com
VeriStand
1. Deploy the Engine Demo—Deploy the engine demo's system definition before
running a stimulus profile.
2. Create a real-time sequence—Create a real-time sequence that starts, stalls,
and stops the engine demo.
3. Create a stimulus profile—Configure a stimulus profile to execute a real-time
sequence.
4. Run the stimulus profile—Compile and run the stimulus profile to see the real-
time sequence interact with the Engine Demo.
Related tasks:
■ Deploying the Engine Demo
■ Creating a Basic Real-Time Sequence
■
Creating a Basic Stimulus Profile
■ Running a Stimulus Profile
Creating a Basic Real-Time Sequence
Create a real-time sequence that starts, stalls, and stops the engine demo.
Before you begin, deploy the engine demo's system definition.
346 ni.com
VeriStand
a. In the Primitives palette, expand Variables and drag a Boolean into the
Parameters section of the Variables pane.
b. In the Property Browser next to Default Assignment, click Browse to
display the system definition channel tree.
c. Click View aliases to display the aliases defined in the system
definition.
d. Double-click EnginePower to assign this alias to the parameter.
e. In Identifier, enter EnginePower.
f. In Units, enter On/Off.
g. Select Double from the Primitives palette and drag it to Parameters to
add a double-precision numeric parameter after EnginePower.
h. In the Property Browser, name the new parameter DesiredRPM, map the
parameter to the corresponding alias, and enter the units as RPM.
6. Add variables to the sequence code and set their values.
a. In the Variables pane, drag EnginePower into the Turn on engine
block.
b. In the Property Browser, edit the Expression to EnginePower = true.
This value will turn the engine on when the block executes.
c. Drag DesiredRPM into the Set engine speed to 2500 and wait
block.
d. Set DesiredRPM to 2500.
e. Press <Ctrl> and drag DesiredRPM from the Set engine speed to
2500 and wait block into the Turn off engine block.
f. Set DesiredRPM to 0.
g. In the Variables pane, right-click EnginePower and select Copy.
h. Right-click Turn off engine and select Paste.
Leave the value as false to turn the engine off when the block executes.
7. Set the expression to wait before it executes.
a. In the Sequences palette, expand Real-Time Sequence Library »
Standard » Timing and drag Wait into the Set engine speed to
2500 and wait block.
b. In the Property Browser, edit the Expression to replace Duration with
20.
This will hold the DesiredRPM value at 2500 for 20 seconds when this
step executes.
8. Set a return value.
a. In the Primitives palette, expand Variables and drag Void Return
Value into the Return Variable section of the Variables pane.
The real-time sequence code will look like the following image.
348 ni.com
VeriStand
After creating this real-time sequence code, you must add it to a stimulus profile.
Related tasks:
■ Deploying the Engine Demo
■ Reading and Writing Channels Directly from a Real-Time Sequence Tutorial
■ Creating a Basic Stimulus Profile
Related reference:
■ VeriStand Directories and Aliases
Creating a Basic Stimulus Profile
Configure a stimulus profile to execute a real-time sequence.
Before you begin, create a real-time sequence for the engine demo.
Note You can add arguments in the Property Browser for this
step to specify the VeriStand project, system definition file,
and VeriStand gateway IP address to connect to.
When the stimulus profile runs, this step opens the VeriStand Editor or
Workspace so you can watch the stimulus profile execute.
5. In the Steps palette, expand Real-Time Sequences and drag Real-Time
Sequence Call into Main.
The Real-Time Sequence Call calls the real-time sequence you specify in the
Property Browser.
6. Select the Real-Time Sequence Call step in the stimulus profile code to
specify the real-time sequence to call.
The Property Browser displays several properties you can use to configure the
step. Each step in a stimulus profile contains properties. These properties are
editable attributes that determine how the step executes.
7. In the Property Browser, browse the File Path to the real-time sequence you
created.
The Parameters section of the Property Browser displays the parameters in
the called real-time sequence as well the channels assigned to them. If you
use the parameters to read or write system definition channels, you must
assign those channels to the parameters in the stimulus profile. When you add
a real-time sequence call, the stimulus profiles uses the default assignment
for each parameter.
8. Click the Target Name pull-down and select Controller to execute the real-
time sequence on the Controller target.
9. Click the Pass Fail pull-down and select AlwaysPass.
10. Save the stimulus profile.
The stimulus profile code will look like the following image.
350 ni.com
VeriStand
1. Deploy the Engine Demo—Deploy the engine demo's system definition before
running a stimulus profile.
2. Create a real-time sequence with a channel reference—Create a real-time
sequence that uses a channel reference to read/write a engine power channel
and a parameter to specify the value to read/write.
352 ni.com
VeriStand
5. Configure the real-time sequence to turn the engine on or off based on the
value of the OnOff parameter.
a. In the Variables pane, drag EnginePower into Main.
b. In the Property Browser, enter the Expression as EnginePower = OnOff.
This allows you to toggle the engine on or off by calling this sequence
from a stimulus profile.
6. Save the real-time sequence.
The real-time sequence code will look like the following image.
354 ni.com
VeriStand
6. Add main expressions to measure how long it takes for the engine to settle at
its RPM set point.
a. In the Primitives pane, drag Comment into Main.
b. In the Property Browser, enter the Comment as Measure how long it
takes for the engine to settle at its RPM set point.
c. In the Variables pane, drag StartTime into Main.
d. In the Property Browser, enter the Expression as StartTime =
abstime().
e. In the Sequences pane, expand Real-Tim Sequence Library »
Standard » Timing and drag WaitUntilSettled into Main.
f. In the Property Browser, enter the Expression as
WaitUntilSettled(ActualRPM, DesiredRPM + Tolerance, DesiredRPM -
Tolerance, 1.0, Timeout).
g. In the Variables pane, drag SettleTime into Main.
h. In the Property Browser, enter the Expression as SettleTime =
abstime() - StartTime.
The Main block of the sequence stores the absolute time at which the
sequence starts to the StartTime local variable. The code waits for the RPM, as
read from the ActualRPM channel, to settle into a range between the
DesiredRPM plus or minus the specified Tolerance for at least one second or
until it reaches the specified Timeout. When the RPM either settles or times
out, the code returns how long it took the engine to settle at the specified
RPM.
7. Save the real-time sequence.
The real-time sequence code will look like the following image.
356 ni.com
VeriStand
The stimulus profile code will look like the following image.
358 ni.com
VeriStand
1. Deploy the Engine Demo—Deploy the engine demo's system definition before
running a stimulus profile.
2. Create a multitasking real-time sequence—Create a real-time sequence that
will warm-up and monitor the demo engine in separate tasks.
3. Create a stimulus profile—Configure a stimulus profile to execute a
multitasking real-time sequence.
4. Run the stimulus profile—Compile and run the stimulus profile to see the real-
time sequence interact with the Engine Demo.
Related tasks:
360 ni.com
VeriStand
Note Local variables are variables you use within the real-
time sequence as a way to hold values you get or set in
statements.
l. In the Primitives palette under Variables, drag Void Return Value into
the Return Variable section of the Variables pane.
362 ni.com
VeriStand
The real-time sequence code will look like the following image.
364 ni.com
VeriStand
Note You can add arguments in the Property Browser for this
step to specify the VeriStand project, system definition file,
and VeriStand gateway IP address to connect to.
When the stimulus profile runs, this step opens the VeriStand Editor or
Workspace so you can watch the stimulus profile execute.
5. Create a step to call the sequence you created.
a. In the Steps palette, expand Real-Time Sequences and drag Real-
Time Sequence Call into Main.
b. Select the Real-Time Sequence Call step in the stimulus profile code
to specify the real-time sequence to call.
c. In the Property Browser, browse the File Path to the real-time
sequence you created.
d. Click the Target Name pull-down and select Controller to execute the
real-time sequence on the Controller target.
6. Save the stimulus profile.
The stimulus profile code will look like the following image.
1. Deploy the Engine Demo—Deploy the engine demo's system definition before
running a stimulus profile.
2. Create a real-time sequence to return a pass/fail value—Update an existing
sequence to pass a Boolean return value.
3. Create a stimulus profile to execute after a step fails—Define the actions a
stimulus profile performs to stop execution after a step fails.
4. Run the stimulus profile—Compile and run the stimulus profile to see the real-
time sequence interact with the Engine Demo.
When the Message Box step executes in the stimulus profile, a dialog box with the
message you specified appears in the Stimulus Profile Editor.
Related tasks:
■ Deploying the Engine Demo
■ Creating a Real-Time Sequence to Return a Pass/Fail Value
366 ni.com
VeriStand
The altered real-time sequence code will look like the following image.
Note You can add arguments in the Property Browser for this
step to specify the VeriStand project, system definition file,
and VeriStand gateway IP address to connect to.
368 ni.com
VeriStand
When the stimulus profile runs, this step opens the VeriStand Editor or
Workspace so you can watch the stimulus profile execute.
5. Create a step to call the sequence you created.
a. In the Steps palette, expand Real-Time Sequences and drag Real-
Time Sequence Call into Main.
b. Select the Real-Time Sequence Call step in the stimulus profile code
to specify the real-time sequence to call.
c. In the Property Browser, browse the File Path to the real-time
sequence you created.
d. Click the Target Name pull-down and select Controller to execute the
real-time sequence on the Controller target.
6. Create pop-up dialog box.
a. In the Steps palette, expand the Other and drag Message Box into
Main.
b. In the Property Browser, enter the following into Message:
Because the Stop Execution on Fail checkbox is disabled, the Message
Box step executes despite the failure of the previous step.
c. Enter the following text into Dialog Title:
Checked/Unchecked - Stop Execution on Fail
d. In Default Text, enter OK.
Because the Message Box step executes after the Real-Time Sequence Call
step, you only see this message if the Real-Time Sequence Call step executes
without failure, or if Stop Execution on Fail is disabled.
7. Click Engine Demo Return Value tutorial.nivsstimprof and in the
Property Browser disable Stop Execution on Fail.
8. Save the stimulus profile.
The stimulus profile code will look like the following image.
1. Deploy the Engine Demo—Deploy the engine demo's system definition before
running a stimulus profile.
2. Create a stimulus profile to log data—Create a stimulus profile that logs RPM
and Temperature data as a TMDS file.
3. Run the stimulus profile—Compile and run the stimulus profile to see the real-
time sequence interact with the Engine Demo.
You can open the created TDMS file in the VeriStand Editor by clicking Tool
Launcher » TDMS File Viewer or by using the Workspace TDMS File Viewer
tool.
Related tasks:
■ Deploying the Engine Demo
■ Creating a Stimulus Profile to Log Data
■
Running a Stimulus Profile
■ Enhancing Your Workspace to View Data
Creating a Stimulus Profile to Log Data
Create a stimulus profile that logs RPM and Temperature data as a TMDS file.
Before you begin, deploy the engine demo's system definition.
370 ni.com
VeriStand
Note You can add arguments in the Property Browser for this
step to specify the VeriStand project, system definition file,
and VeriStand gateway IP address to connect to.
When the stimulus profile runs, this step opens the VeriStand Editor or
Workspace so you can watch the stimulus profile execute.
5. In the Steps palette, expand Logging and drag Start Logging into Main.
A Channel Group step automatically appears under Start Logging. This step
logs execution data for the channels you specify in each Channel Group that
appears under this step.
6. From the Steps palette, drag another Channel Group into Start Logging so
it contains two groups.
7. Click the Start Logging step and, in the Property Browser, configure it.
a. Enter the Configuration Name as Logging Configuration Demo.
b. Browse the File Path to <Common Data>\VeriStand Projects\Engine
Demo\Stimulus Profiles\Engine Demo Logging, enter the File name as
Log File, and click Save.
c. Enable Replace Existing File.
d. Enter the Log Rate [Hz] as 100.
The stimulus profile code will look like the following image.
372 ni.com
VeriStand
1. Deploy the Engine Demo—Deploy the engine demo's system definition before
running a stimulus profile.
2. Create a stimulus profile to call the CSV file—Create a stimulus profile that
calls two Comma Separated Values (.csv) files like a real-time sequence.
3. Run the stimulus profile—Compile and run the stimulus profile to see the real-
time sequence interact with the Engine Demo.
Creating a Stimulus Profile to call CSV Files
Create a stimulus profile that calls two Comma Separated Values (.csv) files like a
real-time sequence.
Before you begin, deploy the engine demo's system definition.
Note You can add arguments in the Property Browser for this
step to specify the VeriStand project, system definition file,
and VeriStand gateway IP address to connect to.
When the stimulus profile runs, this step opens the VeriStand Editor or
Workspace so you can watch the stimulus profile execute.
5. Expand Real-Time Sequences and drag Real-Time Sequence Call step
into Main.
6. In the Property Browser, next to File Path, click Browse and select <Common
Data>\Examples\Stimulus Profile\Engine Demo\Stimulus Profiles\Engine
Demo CSV File Replay\WarmUp Phase 1.csv.
7. Click the Target Name pull-down and select Controller to execute the CSV
file on the Controller target.
8. In the Sequences palette, expand Real-Time Sequence Library »
Standard » Timing and drag WaitUntilSettled into Main.
9. In the Property Browser, configure the WaitUntilSettled sequence.
a. Click the Target Name pull-down and select Controller.
374 ni.com
VeriStand
The stimulus profile code will look like the following image.
1. Deploy the Engine Demo—Deploy the engine demo's system definition before
running a stimulus profile.
2. Create a stimulus profile—Create a stimulus profile to call a macro file that
contains data from a previous engine test.
3. Run the stimulus profile—Compile and run the stimulus profile to see the real-
time sequence interact with the Engine Demo.
Related tasks:
■ Deploying the Engine Demo
■ Creating a Stimulus Profile to Play a Macro File
■ Running a Stimulus Profile
Creating a Stimulus Profile to Play a Macro File
Create a stimulus profile to call a macro file that contains data from a previous
engine test.
Before you begin, deploy the engine demo's system definition.
Note You can add arguments in the Property Browser for this
step to specify the VeriStand project, system definition file,
and VeriStand gateway IP address to connect to.
376 ni.com
VeriStand
When the stimulus profile runs, this step opens the VeriStand Editor or
Workspace so you can watch the stimulus profile execute.
5. In the Steps palette, expand Other and drag Macro Player to Main.
6. In the Property Browser next to VeriStand Macro File, click Browse and select
<Common Data>\Examples\Stimulus Profile\Engine Demo\Stimulus
Profiles\Engine Demo Macro Player\Engine Demo Macro.nivsmacro.
7. Click the Playback Mode pull-down and select UseTiming to play back the
macro file using the timing information embedded in the file.
8. Save the stimulus profile.
The stimulus profile code will look like the following image.
1. Deploy the Engine Demo—Deploy the engine demo's system definition before
running a stimulus profile.
2. Update the stimulus profile to use a text file—Configure an existing stimulus
profile to use a text file to update model parameters without having to create
and run multiple profiles.
3. Run the stimulus profile—Compile and run the stimulus profile to see the real-
time sequence interact with the Engine Demo.
Related tasks:
■ Deploying the Engine Demo
■ Updating a Stimulus Profile to Use a Text File for Model Parameters
■ Running a Stimulus Profile
Related reference:
■ Update Model Parameters from File Step
Updating a Stimulus Profile to Use a Text File for Model Parameters
Configure an existing stimulus profile to use a text file to update model parameters
without having to create and run multiple profiles.
Before you begin, deploy the engine demo's system definition.
378 ni.com
VeriStand
Note You can add arguments in the Property Browser for this
step to specify the VeriStand project, system definition file,
and VeriStand gateway IP address to connect to.
In this code, a is the A matrix for the engine state-space model, {environment
temperature (C)} is the temperature of the environment in which the engine
operates, and {idle speed (RPM)} is the RPM the engine maintains while idle.
7. Select the Prompt Operator step that appears after the Real-Time Sequence
Call and change the Message to Model parameters set to default values and
the Dialog Title to New Parameter Values.
8. Add a second Update Model Parameters from File after the Prompt Operator,
and set the Source to <Common Data>\VeriStand Projects\Engine
Demo\Stimulus Profiles\Update Model Parameters\ParameterUpdate1.txt.
This file changes the environment temperature and the idle speed of the
engine to very high values:
{environment temperature (C)} 75
{idle speed (RPM)} 2000
380 ni.com
VeriStand
The stimulus profile code will look like the following image.
After updating the stimulus profile, run it. Each a time a test completes, click OK in
the operator prompt to advance to the next model update.
Related tasks:
■ Communicating with the VeriStand Editor Using Stimulus Profile Arguments
■ Running a Stimulus Profile
Related reference:
■
VeriStand Directories and Aliases
Running a Stimulus Profile
Compile and run the stimulus profile to see the real-time sequence interact with the
Engine Demo.
You can observe the user interface's graph to see the output change as the
real-time sequence executes.
Note The Warnings and Errors pane displays any errors, warnings,
or messages that you must resolve before the stimulus profile can
successfully execute.
When the stimulus profile completes its execution, the ATML Test Report opens. This
report displays details about the stimulus profile execution. If you run the stimulus
profile again, the previous results are overwritten.
Related concepts:
■ Automatic Test Markup Language (ATML) Standard
382 ni.com
VeriStand
After receiving errors in VeriStand, you must resolve them to continue running the
system.
384 ni.com
VeriStand
386 ni.com
VeriStand
388 ni.com
VeriStand
390 ni.com
VeriStand
392 ni.com
VeriStand
394 ni.com
VeriStand
396 ni.com
VeriStand
398 ni.com
VeriStand
400 ni.com
VeriStand
402 ni.com
VeriStand
Related information:
404 ni.com
VeriStand
■ NI KnowledgeBase
Note If you click Start Listening again, the log will update with
information that was not recorded while stopped.
To view logs from previous deployments, access the machine serving as the target
and navigate to the /c/ni-rt/NIVeriStand/Logs/ directory.
Related tasks:
■ Deploying the System Definition File to a Real-Time Target
Related Documentation
Use the following documents for more help with VeriStand. Refer to ni.com/manuals
for updated documentation resources.
Document Description
VeriStand Release Notes Provides system requirements, installation
instructions, and important information about
the version of VeriStand that you are installing.
Access this file from ni.com.
VeriStand .NET API Help Documents several of the .NET APIs included
with VeriStand. Use these APIs to
Document Description
programmatically control various software
operations from any .NET-compatible
programming language or environment,
including LabVIEW and TestStand. Access this
file from the Windows Start menu.
LabVIEW Help Provides information about LabVIEW palettes,
menus, tools, VIs, and functions. It also includes
step-by-step instructions for using LabVIEW
features, and documentation on LabVIEW Real-
Time Module and LabVIEW FPGA Module when
you install those modules.
LabWindows/CVI Help Provides information about LabWindows and
CVI windows, functions, tools, and menus.
NI-DAQmx Help Provides information on using NI-DAQmx to
program your National Instruments device.
NI-XNET Hardware and Software Help Describes how to install and configure the NI-
XNET hardware and software. It also includes
the NI-XNET LabVIEW and C API reference and
summarizes the CAN, FlexRay, and LIN
standards.
Hardware Documentation Provides support for any hardware devices you
want to use with a project.
MathWorks Simulink software documentation. Provides support for Simulink tasks such as
system-level design, simulation, automatic
code generation, and continuous test and
verification of embedded systems.
MathWorks MATLAB software documentation. Provides support for MATLAB tasks such as
signal processing, event-based modeling, and
application deployment.
MathWorks Simulink Coder software Provides support generates and executes C and
documentation. C++ code from Simulink models and MATLAB
functions.
Related information:
■
VeriStand Release Notes
406 ni.com
VeriStand
Increase the efficiency of VeriStand by following best practices for your system
definition, controllers, hardware, models, and reflective memory.
Task Rationale
Enable Turbo Boost Enabling Turbo Boost for Intel Core™ processors
allows active processor cores to run faster than
the base operating frequency for short
durations while other cores are idle.
408 ni.com
VeriStand
Task Rationale
Reduce the number of enabled cores. When you activate Turbo Boost, the maximum
frequency of a specific processing core depends
on the number of active cores. Manually
reducing the number of cores ensures the active
cores receive the maximum increase in clock
frequency. If your system does not contain
asynchronous components, enable only one
core to provide the greatest frequency boost.
For example, the Intel Core i7-820QM quad-core
processor used in an NI PXIe-8133 embedded
controller has a base clock frequency of 1.73
GHz. If an application requires only one CPU
core, Turbo Boost automatically increases the
clock frequency of the active CPU core on the
Intel Core i7-820QM processor to 3.06 GHz.
Enable two cores for VeriStand systems with Enabling two cores allows you to assign the
asynchronous components, such as an asynchronous components to another CPU
asynchronous custom device. while still providing greater clock frequency to
both active cores.
For more information, refer to Top Eight Features of the Intel Core i7 Processors for
Test, Measurement, and Control.
Related information:
■ Top Eight Features of the Intel Core i7 Processors for Test, Measurement,
and Control
1. Open NI MAX.
2. In the Packet Detection setting of the controller, select Line Interrupt.
Task Rationale
Use controllers that support hardware Software timing slows the system
timing. significantly and adds to CPU usage. Using
controllers that support hardware timing
allows for better system performance.
Choose DAQ devices that use simultaneous Simultaneous sampling provides better
sampling. performance than multiplexed sampling.
Use a USB CAN device instead of XNET ports Using a USB CAN device on the host
or channels for bus monitoring only. computer reduces the number of channels
in the system. The fewer channels VeriStand
reads, the better the performance.
Use PXIe devices and controllers. PXIe devices generally contain newer
technology and run at faster rates than
other devices.
Do not use NI Real-Time Hypervisor for Real-Time Hypervisor comes with dramatic
systems that require high performance. real-time performance penalties. Switching
410 ni.com
VeriStand
Task Rationale
to a real-time only PXI controller can
potentially double the performance.
Related tasks:
■ Adding and Configuring a Hardware Device
Task Rationale
Consolidate small models into one large model. Several small models use more memory than
one large model.
Preallocate arrays for LabVIEW models instead Each Build Array function uses a shared
of using Build Array functions. resource. This may delay the model execution
because both models cannot use the shared
resource simultaneously. Preallocating arrays
avoids potential delays.
To preallocate an array, use a Case structure
and the First Call? function. Replace the
elements of the array at run time with the
Replace Array Subset function.
412 ni.com
VeriStand
414 ni.com
VeriStand
Tailoring Channels
Manage channels for scaling, faulting, and more.
System Channels
Use system channels to monitor system parts, such as the host computer, the target,
and the VeriStand Engine, while it is deployed and running.
You can access the system channels in System Explorer by clicking Targets »
Controller » System Channels.
Use the following table for more information on each system channel.
416 ni.com
VeriStand
418 ni.com
VeriStand
Goal Task
Create a lookup table scale. Map an array of pre-scaled values to an array
of corresponding scaled values.
Create a polynomial scale. Convert values using a polynomial equation
with up to ten coefficients.
Create a thermocouple scale. Convert values to Kelvins or degrees Celsius,
Fahrenheit, or Rankine.
Import scales from another application. Import a scale created by another system
definition file (.nivssdf) or NI-DAQmx.
Import scale values from a text file. Import scale table values or coefficients
from a text file.
2. Map the scale to the channel.
Related tasks:
■ Creating a Lookup Table Scale
■ Creating a Polynomial Scale
■ Creating a Thermocouple Scale
420 ni.com
VeriStand
Note The units you enter will supersede the units associated with
the channel.
5. Enter and edit pairs of pre-scaled values and corresponding scaled values in
the table.
6. Save the system definition file.
VeriStand clips samples that are outside the maximum and minimum scaled values
found in the table.
Creating a Polynomial Scale
Convert values using a polynomial equation with up to ten coefficients.
VeriStand requires two direction coefficients for a polynomial scale. They are a
forward polynomial to convert pre-scaled values to scaled values and a reverse
polynomial to convert scaled values to pre-scaled values.
2. In the Project Files pane, left-click a system definition file (.nivssdf) and select
Configure in System Explorer.
3. Right-click Scales and select Add Scale » Polynomial Scale.
4. On the new scale's Polynomial Scale Configuration page, enter the scale
Name and Units to associate with the scaled values.
Note The units you enter will supersede the units associated with
the channel.
6. Enter Coefficients for an order of the polynomial in the table control, where
the coefficients are a0, a1, a2,...an for your polynomial scale y = a0 + a1x +
a2x2 + … + anx.
Note For forward coefficients, y is the scaled data and x is the raw
data. For reverse coefficients, x is the scaled data and y is the raw
data.
After creating a direction coefficient, you can click Generate to use regression
analysis to estimate coefficients for the opposite direction. In the dialog box, enter a
Minimum and Maximum value for the raw range and click OK.
Creating a Thermocouple Scale
Convert values to Kelvins or degrees Celsius, Fahrenheit, or Rankine.
422 ni.com
VeriStand
2. In the Project Files pane, left-click a system definition file (.nivssdf) and select
Configure in System Explorer.
3. Right-click Scales and select Add Scale » Thermocouple Scale.
4. On the new scale's Thermocouple Scale Configuration page, enter the scale
Name.
Note The units you enter will supersede the units associated with
the channel.
Goal Task
Import a scale mapping. Click Import and select the file you want to
import.
424 ni.com
VeriStand
The scale names you import must not duplicate scale names already in the system
definition file.
You can import NI-DAQmx custom scales saved in MAX on the host computer. You
can also import NI-DAQmx custom scales exported from MAX as an INI file. VeriStand
does not support map range scales from MAX.
Related tasks:
■ Defining Scale Values in a Text File
■
Creating a Lookup Table Scale
■ Creating a Polynomial Scale
Defining Scale Values in a Text File
Format scale values in a text file to import to VeriStand.
VeriStand converts non-numeric characters in the import file to 0.
Polynomial Coefficients
Order0Coefficient
Order1Coefficient
.
.
.
Order9Coefficient
After creating and formatting the text file, you can import it to VeriStand.
Related tasks:
■ Importing Scale Values from a Text File
426 ni.com
VeriStand
Note You can select multiple channels and fault all the selected
channels to a single value.
3. In the Value field, enter the value to which you want to force the channel, and
then click OK.
Channel Fault Manager saves the value as a pending value.
4. Verify the value and click Apply Pending Changes to apply the value.
Note To add more than one user channel, select New » Multiple
user channels and use the Create Multiple User Channels dialog
box to configure the user channels.
5. In the Create a New User Channel dialog box, enter a Name, Description,
Unit, and Initial Value.
6. Click OK.
7. Save the system definition file.
On the Mapping Diagram, expand the User Channels node to find the new user
channel.
Creating an Alias
Set an alternate name for channels in a system definition file.
Before you begin, you must add a model to the system definition.
The VeriStand Editor will reference the alias instead of the full channel path.
428 ni.com
VeriStand
Note The alias' location in the system definition cannot be changed after
the alias is created.
On the Mapping Diagram, expand the Aliases node to find the new alias.
Related tasks:
■
Adding and Configuring a Model
2. In the Project Files pane, double click the system definition file (.nivssdf) to
open the Mapping Diagram.
3. Click a channel or alias terminal and drag a wire to another channel or alias
terminal to map them.
1. Open VeriStand.
2. In the VeriStand Editor, click Project Files.
3. Right-click your system definition file (.nivsdf) and select Open.
4. Click the Software palette and drag one of the following calculated channels
onto the diagram.
430 ni.com
VeriStand
Refer to the following table of supported functions and operators for examples of
formula elements that you can use to configure a calculated channel.
432 ni.com
VeriStand
User interfaces, called screens, allow an operator to easily control and monitor
specific channels within a system definition at run-time. Use the VeriStand Editor to
modify and operate screens.
Related tasks:
■
Running the VeriStand Workspace
434 ni.com
VeriStand
436 ni.com
VeriStand
A screen contains various components that allow a user to send data to a system
definition as well as receive data from it. These components are called controls and
indicators.
The VeriStand Editor provides tools that allow you to manipulate a project
without having to open the system definition.
Goal Task
Log data Create logging specification (.nivslspec) files
with Log Management to configure and execute
host-side data logging.
View model values Check signal values with the Model Signal
Viewer without importing the signal as a
channel or editing the system definition file.
Fault a channel to a specific value Fault a channel with the Channel Fault Manager
to test the behavior of a system when a channel
reaches a specific value.
Import and manage batches of model Import model parameters with the Model
parameters Parameter Manager to apply values defined in
an external .txt file to a model.
View channel values at run time Monitor channels with the Channel Data
Viewer to view the current values of several
channels together.
Related tasks:
■ Logging Data with the VeriStand Editor
■ Viewing Model Values in the VeriStand Editor
■
Faulting a Channel to a Specific Value
■ Importing and Managing Batches of Model Parameters with the VeriStand
Editor
■
Viewing Channel Values at Run Time
438 ni.com
VeriStand
1. In the VeriStand Editor, click View » Tool Launcher » Model Signal Viewer.
2. In the Model Signal Viewer tab, click Select Signals.
3. In the Select Signals dialog box, click the signals you want to view and click
OK.
Note Only select signals that you need immediate information on.
Adding too many signals will decrease the VeriStand Engine’s
execution loop rate. For every 500 signals displayed, there is an
expected 1% drop in performance.
The Path and Value of the signals you selected will appear in the Model Signal
Viewer tab.
Importing and Managing Batches of Model Parameters with the
VeriStand Editor
440 ni.com
VeriStand
Import model parameters with the Model Parameter Manager to apply values
defined in an external .txt file to a model.
Before you can work with model parameters, you must deploy and connect to a
system definition and understand model parameter syntax.
Maintaining model parameter values in external files allows you to quickly switch
between batches of test parameters without manually entering the values. This tool
is also useful for managing multiple parameters from a single interface.
Setting the value of a parameter is a two-step process: importing or calculating new
values, and then applying the new values.
To update model parameter values, click in the Pending Value column, enter the
new value, and click Apply Pending Changes.
Related concepts:
■ Supported Syntax in Model Parameter Files
Related tasks:
■ Deploying the System Definition File to a Real-Time Target
Supported Syntax for Model Parameter Manager
The Model Parameter Manager supports simple text files ( .txt) as model
parameter files.
The Model Parameter Manager allows text files that conform to the model
parameter file format that other VeriStand features support.
One limitation of using model parameter text files is that the manager imports and
sets the result of the expression rather than the expression itself. The following
parameter definitions demonstrate this limitation.
a 10
b a * 2
In this example, the Model Parameter Manager sets the value of b to 20, not a * 2.
Changes to the value of a do not affect b because the original expression is no
longer valid.
Related concepts:
■ Supported Syntax in Model Parameter Files
442 ni.com
VeriStand
Actions Controls
Launch EXE, BAT, or real-time sequence files from the screen.
2. On the Item tab, click Sequence Path to specify the real-time sequence file.
3. Click Target to select the target on which you want to run the real-time
sequence.
4. Click Configure Parameters to update the parameters in the real-time
sequence file.
5. Switch the screen to operate mode and click Run on the Real-Time Sequence
control to run the real-time sequence.
Array Controls
Enter or display array data.
What Is an Array?
An array consists of elements and dimensions. Elements are the data that make up
the array. A dimension is the length, height, or depth of an array. An array can have
one or two dimensions.
444 ni.com
VeriStand
Note Array indices are zero-based. The index of the first element in the
array, regardless of dimension, is zero.
Automotive Controls
Create an automotive dashboard.
Booleans Controls
Enter or display true and false data.
Charts Controls
Display data from channels or waveforms in the system definition file.
Configuring a Scale
1. Select the Chart control on the Screen.
2. On the Item tab, select Scale Legend in the Visual Style section.
The Scales box appears on the screen.
3. Select the scale you want to configure.
4. Update the settings for the scale on the Item tab.
Adding a Cursor
1. Select the Chart control on the Screen.
2. On the Item tab, select Cursor Legend in the Visual Style section.
The Cursors box appears on the screen.
3. Click New Cursor to add a cursor.
Containers Controls
446 ni.com
VeriStand
Numerics Controls
Enter and display numeric data.
Control Use
Numeric control and indicator Enter or display numeric data.
Sliders Display numeric data in a vertical or horizontal
slide with a customizable scale and a pointer
that helps you see the exact value.
Gauge, Meter, and Knob Enter or display numeric data in a rotary scale.
Tank Display numeric data in a vertical slide that
resembles a real tank or thermometer
instrument.
Timestamp Enter or display a time and date value.
Progress bars Show progress in a vertical bar or circle.
448 ni.com
VeriStand
Character(s) Description
Hexadecimal digits 0 through F
Octal digits 0 through 7
Binary digits 0 and 1
Decimal digits 1, 1.0, 2, 3.5, and so on
. Decimal point
+ Positive symbol
- Negative symbol
E or e For scientific or engineering notation format
Infinity Infinity
NaN Not a number
/ For use in absolute time format
: For use in absolute time format
AM, am, PM, pm For use in absolute time format
SI prefixes
y yocto (10 )
z zepto (10 )
a atto (10 )
f femto (10 )
p pico (10 )
n nano (10 )
Character(s) Description
u micro (10 )
m milli (10 )
c centi (10 )
d deci (10 )
da deka (10 )
h hecto (10 )
k kilo (10 )
M mega (10 )
G giga (10 )
T tera (10 )
P peta (10 )
E exa (10 )
Z zetta (10 )
Y yotta (10 )
Text Controls
Create text entry boxes and labels.
450 ni.com
VeriStand
Goal Task
Adding and configuring controls and Use the Workspace Controls palette to add
indicators and configure controls and indicators to
create a user interface.
Modifying control mappings at run time Change the channel mapping of a control or
indicator while the Workspace runs.
Calibrating a hardware channel at run time Use the Channel Calibration tool to
calibrate hardware channels by adjusting
the values they return to known values while
a system definition runs.
Using channel value forcing Use the Channel Fault Manager tool to
test the behavior of a system when a
channel reaches a certain value.
Logging test results with stimulus profiles Use the Stimulus Profile Editor to create
and execute a stimulus profile on your host
machine to log test data acquired from real-
time sequences performed on a target.
Goal Task
Recording commands sent to the target Use the Macro Recorder tool to record
commands, such as the setting of channel or
parameter values, model execution states,
and fault or alarm values, that VeriStand
sends to the target and save them to a
macro (.nivsmacro) file.
Playing back commands sent to the target Use the Macro Player tool to review the
commands that VeriStand sent to the target
using the macro (.nivsmacro) file you
recorded with the Macro Recorder tool.
Setting model parameter values in the Use model calibration controls in the
Workspace Workspace to view and modify the values for
any model parameters in the system
definition.
Importing and managing batches of model Use the Model Parameter Manager tool to
parameters import and apply model parameter values
defined in external .m or .txt files to a model.
Displaying waveform data in a graph Use a waveform graph control to display
data from one or more waveforms in the
system definition file to monitor and verify
acquired data.
Enhancing your Workspace to view data Use other tools, such as the Alarm Monitor,
TDMS File Viewer, and XNET Bus Monitor, to
view data in the Workspace.
Configuring and Executing host-side logging Use the Data Logging control to adjust log
times, better format data files, select start
and stop times, and more at run time.
Related tasks:
■ Adding and Configuring Controls and Indicators
■ Modifying Control Mappings at Run Time
■ Calibrating a Hardware Channel at Run Time
■
Using Channel Value Forcing
■ Logging Test Results with Stimulus Profiles
■ Recording Commands VeriStand Sends to the Target
452 ni.com
VeriStand
Workspace
■ Access the Channel Calibration tool.
■ Access macro recording and playback
capabilities.
■ Access custom objects.
■ Access API to automate the application.
■ Use services to launch application tools
upon connecting to a target.
You can map execution channels to regular controls to achieve the same functionality as a model
control within the VeriStand Editor.
If you double-click a TDMS file in the VeriStand Editor, the file launches in your default viewer.
You can use the browser-based console viewer in the VeriStand Editor.
You can use an action button to launch the bus monitor application in the VeriStand Editor.
You can use action buttons to launch custom tools from the VeriStand Editor.
Related reference:
■
VeriStand Environment
454 ni.com
VeriStand
Note If a channel has a scale mapped to it, VeriStand applies the scale
first and applies the calibration to the scaled channel values second.
Note The name of this menu item might differ depending on how
you named it in the Tools Properties dialog box.
Note You can click Build Table and then complete a procedure for
automatically calculating polynomial coefficients that best fit raw
sensor values to known input values.
6. Click Finish.
The Scaled and Calibrated Value column in the Scalable Channels table displays
channel values after the calibration.
When you close the Channel Calibration tool, the calibration remains applied to
the channel. Even if you close the Workspace or undeploy and redeploy the system
definition, the calibration remains active until you remove it.
You also can use the Calibration VIs in the LabVIEW Execution API to automate
applying calibrations and reading raw values from hardware channels.
Channel Calibration
The Channel Calibration tool displays channel information such as channel
names, paths, values, and calibration dates you use to calibrate your hardware.
The following image highlights the layout of the Channel Calibration tool you will
interact with to calibrate values received from a hardware device.
456 ni.com
VeriStand
1. In the Workspace, select Tools » Channel Fault Manager to launch the tool.
Note The name of this menu item might differ depending on how
you named it in the Tools Properties dialog box.
2. In the Channel Fault Manager tool, select a channel from the configuration
tree and click Add Fault.
3. In the Fault Value dialog box, enter a fault value for the specified channel and
click OK.
The faulted channel and value appear in the Channel Fault Manager tool.
Logging Test Results with Stimulus Profiles
Use the Stimulus Profile Editor to create and execute a stimulus profile on your
host machine to log test data acquired from real-time sequences performed on a
target.
If the Stimulus Profile Editor is not in the Tools menu, add it.
You can start multiple concurrent stimulus profile executions. Each stimulus profile
execution performs sequential execution of one or more real-time sequences.
Note The name of this menu item might differ depending on how
you named it in the Tools Properties dialog box. The Stimulus
Project Editor launches as a separate application and may take a few
minutes to open.
458 ni.com
VeriStand
Once you have created a stimulus profile, you can deploy it to a real-time target
based on your system definition. This profile is then run on the real-time target, and
the current state of the profile is displayed in the Profile window on the host
computer.
Related tasks:
■ Adding a Standard or Custom Tools Menu Item
Note You can also use the Macro Recorder VIs to access the Macro
Recorder and create macro files programmatically from LabVIEW. Use the
Note The name of this menu item might differ depending on how
you named it in the Tools Properties dialog box.
Note The Macro Recorder does not record any commands you send
while it is paused. You can click Resume to continue appending
commands to the same macro recording.
You can use the Macro Player tool to play back macro files you create using the
Macro Recorder tool.
Related tasks:
■ Adding a Standard or Custom Tools Menu Item
■ Playing Back Commands Sent to the Target
460 ni.com
VeriStand
Note You can also use the Macro Player VIs to access the Macro Player
and play back macro files programmatically from LabVIEW. Use the
Execution API to access the Macro Player from any .NET-compatible
programming language.
Note The name of this menu item might differ depending on how
you named it in the Tools Properties dialog box.
2. In the Macro Recorder tool, click File » Open and navigate to the macro file
you want to play back.
3. Select a Play Mode.
4. Click Play.
The Workspace Macro list highlights each command as it is played back.
5. Click Stop to stop playback.
6. Use the Item Properties dialog box to customize the control and click OK.
462 ni.com
VeriStand
Note The name of this menu item might differ depending on how
you named it in the Tools Properties dialog box.
6. In the Select Calibration Files to Load dialog box, click OK to import the
values from the files as new values.
7. In the Model Parameter Manager, review the New Value column for errors.
8. Double-click a file in the Selected Files column to edit the contents of the
file.
9. Click Calc. New Values to read or calculate new parameters values from files
you loaded.
464 ni.com
VeriStand
Related concepts:
■
Supported Syntax in Model Parameter Files
Setting a Parameter Value Manually
Use the Model Parameter Manager tool to set a parameter value manually.
If the Model Parameter Manager tool is not in the Tools menu, add it.
To set the value of a parameter manually, you must set and then apply new values.
Note The name of this menu item might differ depending on how
you named it in the Tools Properties dialog box.
Note The name of this menu item might differ depending on how
you named it in the Tools Properties dialog box.
466 ni.com
VeriStand
3. Click Save Values to save the current system values to a new or existing
model parameter file.
VeriStand exports values in the format that corresponds to the file extension you
choose.
Related tasks:
■
Deploying the System Definition File to a Real-Time Target
To configure the x-axis to represent absolute time, right-click a waveform graph and
uncheck Ignore Time Stamps.
Related tasks:
Goal Tool
Manage alarms high limit, low limit, Alarm Monitor
corresponding procedure name, delay
duration, trip value, priority, state, and
mode information.
View the current values for several channels Channel Data Viewer
at a time.
View the contents of a .tdms file. TDMS File Viewer
View and log messages sent by an NI-XNET XNET Bus Monitor
device.
Perform custom tasks specified by a Custom VI Tool
LabVIEW VI.
Related concepts:
■ NI-XNET Bus Monitor
468 ni.com
VeriStand
4. Select Logging » Logging Control and drag the control onto the alignment
grid.
5. Complete any of the following configuration goals in the Edit Settings dialog
box.
Related tasks:
■
Running a Command Line Script
■
Loading a File in DIAdem
■
Including Log Files Produced on a Target in Post-Processing
■ Logging and Documenting Sessions
Running a Command Line Script
Execute a command line script for each file the control generates during a log
session to complete tasks such as passing log files to a batch file or to an executable,
like Excel, for additional post-processing.
470 ni.com
VeriStand
This feature requires NI DIAdem. For more information about NI DIAdem, visit
ni.com/diadem.
4. Specify the Report template path to the report template and the Report
export path where you want to save the PDF or HTML report.
Including Log Files Produced on a Target in Post-Processing
Automatically download files produced by a target to include these files in post-
processing.
You must start and stop the logs on the targets from outside of the Data Logging
control.
When you stop logging, the log control downloads all files closed by the target
during logging. If you choose to use DIAdem for post-process, the log files merge in
DIAdem below the host-side log files.
Related tasks:
■ Logging and Documenting Sessions
Logging and Documenting Sessions
Control when a session log executes and document your observations about the
session.
Note You can also launch the File History dialog box from the control to
view past log sessions and the files associated with them.
472 ni.com
VeriStand
Note If you do
not have a
specified
application for
viewing TDMS
files, you can view
the file in the
TDMS Filer
Viewer
workspace tool.
To do so, right-
click the file and
select View File
Related tasks:
■
Configuring and Executing Host-Side Logging
474 ni.com
VeriStand
You can use LabVIEW to create various types of custom add-ons and plug-ins to
extend VeriStand.
The following table lists common add-ons you can develop using LabVIEW and any
additional features they require.
Add-on Requirements
Custom devices Application Builder
Custom timing and sync devices
Custom FPGA configuration files and bitfiles ■ Application Builder
■ LabVIEW FPGA Module
The Application Builder is included with the LabVIEW Professional Development System. If you
use the LabVIEW Base Development System or Full Development System, you can purchase the
Application Builder.
For more information on how to use LabVIEW to create custom workspace objects, refer to
Creating Custom Workspace Objects for VeriStand.
476 ni.com
VeriStand
Before you begin, download the Embedded Data Logger from the VeriStand
Embedded Data Logger Custom Device repository on GitHub.
Use the Embedded Data Logger to log more data than the connection bandwidth
between the target(s) and the host allows. For example, to log data on several real-
time targets, use the Embedded Data Logger instead of streaming the data from
each target back to the host.
The Embedded Data Logger also allows you to log data after you disconnect the
host machine. This is useful if you want to deploy your system definition to a real-
time target, disconnect your host computer, and let the target run over several days.
Related information:
■ VeriStand Embedded Data Logger Custom Device
You can use a custom device to execute on real-time systems and perform
deterministic hardware-in-the-loop and real-time test procedures. With a custom
device, you can control the configuration, execution, and user interface of a project.
Custom devices appear in the System Explorer configuration tree.
A custom device can run either inline or in parallel (asynchronously) with the
VeriStand Engine's Primary Control Loop, and can function as a timing and sync
device. All custom devices communicate with the VeriStand Engine using
configurable channels and properties.
1. Custom Device FAQs
Answers to common questions about creating a custom device.
2. Custom Device Framework
Follow the custom device framework to ensure your LabVIEW code interacts
correctly with VeriStand.
3. Planning a Custom Device
It is important to plan the major components of a custom device before
writing any LabVIEW code.
4. Implementing a Custom Device
Develop a custom device to fit your requirements.
5. Building a Custom Device
Build a custom device for distribution to VeriStand.
478 ni.com
VeriStand
Note You can gain this experience through taking NI educational courses
and earning certifications.
Situation Rationale
Integrating VeriStand with third-party hardware If the hardware you need to integrate with
VeriStand is not natively supported, you may be
able to integrate it by creating a custom device.
Implementing a measurement or generation If VeriStand does not support the measurement
mode that VeriStand does not support or generation mode you need for your hardware
type, you may be able to implement it using a
custom device.
For example, VeriStand supports single-point
hardware-timed analog acquisition using
DAQmx. However, VeriStand does not support
force or torque measurements for analog DAQ
channels. You can implement this measurement
mode as a custom device.
Implementing additional features that A VeriStand project may require a feature that
VeriStand does not support VeriStand does not provide. You can extend
VeriStand to meet your needs through a variety
of methods. Custom devices are best suited for
implementing features that require or use
VeriStand channel data on the execution host.
For example, the Embedded Data Logger allows
you to log VeriStand channels to a TDMS file
without first sending channel data back to the
480 ni.com
VeriStand
Situation Rationale
Workspace, as with high-speed streaming.
However, if you need to display the previous
test results on the workspace while running a
new test, a custom workspace object may be
more appropriate than a custom device.
If you do not need the full range of custom device functionality, you can fulfill your
requirements by converting a LabVIEW VI into a compiled model. Other alternatives
include utilizing workspace tools, implementing custom FPGA bitfiles, and exploring
the various LabVIEW and .NET APIs that ship with VeriStand.
■Is a hardware driver/API available for the device and easy to use?
■If necessary, is the hardware driver executable in LabVIEW Real-Time
Module?
Related concepts:
■ VeriStand Engine
Related information:
■ NI Education Services
■ Instrument Driver Network (IDNet)
■
NI Hardware Drivers
■ Verify Your DLL Is Executable in LabVIEW Real-Time
Component Description
Custom Device XML file The Custom Device XML file enables you to
define parts of the custom device in System
Explorer, specify which VIs to call, and select the
dependencies to deploy to an RT target.
Custom Device API Library The Custom Device API library is a LabVIEW
library that contains type definitions, template
482 ni.com
VeriStand
Component Description
VIs, and the LabVIEW API a custom device needs
to interact with VeriStand.
Custom Device Library The Custom Device library is a LabVIEW library
that contains the configuration and engine VIs
for a custom device. The configuration and
engine VIs may optionally be distributed in
different LabVIEW libraries.
Build Specifications The Build Specifications in a custom device
LabVIEW project includes the Configuration and
Engine source distributions.
Related concepts:
■ Custom Device XML File
■ Custom Device API Library
■
Custom Device Library
■
Custom Device Build Specifications
Custom Device XML File
The Custom Device XML file enables you to define parts of the custom device in
System Explorer, specify which VIs to call, and select the dependencies to deploy
to an RT target.
When VeriStand launches, it uses the Custom Device XML file in the <Common
Data>\Custom Devices directory to determine how to load, configure, display, and
run custom devices. This XML file provides basic information about a custom device,
including the type of custom device, paths to its VIs and dependencies, and pages,
glyphs, buttons, and menu items associated with the custom device.
Every custom device must have a Custom Device XML file in the directory. A properly
formatted XML file correctly implements the tags defined by the Custom Device XSD
file located in the same directory. The XML file must have its custom device type
defined in its title before the device name. The following are examples of properly
named XML files:
■ Custom Device <Device Name>.xml
■ SLSC Module <Device Name>.xml
■ Timing and Sync <Device Name>.xml
The <Common Data>\Custom Devices directory also includes Custom Device XML
files for the custom devices that install with VeriStand. You can use these XML files
for reference when structuring your XML.
Caution Do not directly edit the contents of the included Custom Device
XML files. Edits to the file can break the custom devices.
Related concepts:
■
Custom Device Types
Related tasks:
■ Adding Custom Glyphs, Shortcut Menus, and Toolbar Buttons
Related reference:
■ VeriStand Directories and Aliases
■
Custom Device XML Tags
Custom Device XML Tags
XML tags define settings for a custom device.
These elements, and non-standard element types, are defined in the Custom
Device.xsd schema located in the <Common Data>\Custom Devices directory. You
can open the file in an XML or text editor to read the schema and view the hierarchy.
For an example of how to implement tags in your XML file, refer to the pre-built
custom device XML files that install with VeriStand.
Caution Do not directly edit the contents of the included Custom Device
XML files. Edits to the file can break the custom devices.
The following table displays the XML tags you can use in a custom device XML file.
484 ni.com
VeriStand
486 ni.com
VeriStand
488 ni.com
VeriStand
490 ni.com
VeriStand
492 ni.com
VeriStand
494 ni.com
VeriStand
496 ni.com
VeriStand
498 ni.com
VeriStand
500 ni.com
VeriStand
502 ni.com
VeriStand
504 ni.com
VeriStand
506 ni.com
VeriStand
508 ni.com
VeriStand
510 ni.com
VeriStand
Related concepts:
■ Custom Device Types
Related reference:
■
Custom Device Non-Standard XML Element Types
■ VeriStand Directories and Aliases
Custom Device Non-Standard XML Element Types
Non-standard element types are defined in the Custom Device.xsd schema.
Dependency
The Dependency element type describes a dependency of the custom device, such
as a DLL or VI, that the custom device requires and that you want to deploy to the
target with the custom device.
512 ni.com
VeriStand
LocString
The LocString element type specifies English and localized strings to display in
menu items.
Path
The Path element type describes a path to a file and whether the path is relative or
absolute.
Target
The Target element type describes the target to which you want to deploy the
custom device.
VersionType
The VersionType element type specifies version information.
Related reference:
514 ni.com
VeriStand
Note To access the Custom Device API library, you must first install a
compatible version of LabVIEW. When installing VeriStand, under
Additional items you may wish to install, select VeriStand Support for
LabVIEW. This will install the VeriStand APIs, including the Custom Device
API library.
The components of the library allows the custom device to communicate seamlessly
in the VeriStand Engine. You can find the library in the labview\vi.lib\NI
VeriStand\Custom Device API directory.
The following table displays the template VIs included in the Custom Device API
library. You can access most of the VIs in this library from the Custom Device palette
and subpalettes in LabVIEW. The connector panes of these VIs are configured to
work with VeriStand, and the front panels and block diagrams include
documentation to help you configure VIs that fit the needs of your custom device.
Note If you add any VIs created from the following templates to a custom
device project, you must define the item in the Custom Device XML file
using valid Custom Device XML tags.
Template VI Usage
Initialization VI Template.vit Initialization VI.
Page Template.vit Main Page VI or additional Page VI.
Asynchronous Custom Device Driver VI RT Driver VI for an asynchronous custom device.
Template.vit
Inline Custom Device Driver VI Template (HW RT Driver VI for an Inline Hardware Interface
Interface).vit custom device.
Inline Custom Device Driver VI Template (Model RT Driver VI for an Inline Model Interface custom
Interface).vit device.
Template VI Usage
Timing Source Initialization VI Template.vit Timing Source Initialization VI for the Primary
Control Loop. For VeriStand to call this VI, you
must select the custom device as the Master
Custom Device on the Controller configuration
page.
RunTimeMenu Custom Item 2 Launch.vit Runs when the user selects a custom shortcut
menu item.
RunTimeMenu Custom Population.vit Creates a custom shortcut menu.
RunTimeMenu Dependency.vit Shows, removes, enables, or disables items in a
custom shortcut menu.
ActionVIOnCompile Template.vit Runs when an item is compiled.
ActionVIOnDelete Template.vit Runs when a user successfully deletes an item.
ActionVIOnDownload Template.vit Runs when the custom device downloads to the
target.
ActionVIOnDeleteRequest Template.vit Runs when a user attempts to delete an item.
ActionVIOnLoad Template.vit Runs when VeriStand loads a system definition
containing a custom device in System Explorer.
ActionVIOnPaste Template.vit Runs when a user pastes an item in System
Explorer.
ActionVIOnSave Template.vit Runs when a user saves the system definition
file.
ActionVIOnShutdown Template.vit Runs when the VeriStand system shuts down.
Related reference:
■
Custom Device XML Tags
Custom Device Library
The Custom Device library is a LabVIEW library that contains the configuration and
engine VIs for a custom device. The configuration and engine VIs may optionally be
distributed in different LabVIEW libraries.
Custom device library VIs configure the initialization behavior of the custom device,
its interaction with the VeriStand Engine, and the user interface for the custom
device in System Explorer.
516 ni.com
VeriStand
Note Custom devices also include a separate library, called the Custom
Device API library, which contains the type definitions, template VIs, and
the LabVIEW API that a custom device needs to interact with VeriStand.
The Custom Device library contains the following sets of VIs to modify your custom
device.
Note In a custom device, pages are the configuration pages that appear
when you select the custom device or various sub-items of the device in
System Explorer. The configuration page that an operator sees is the front
panel of a page VI.
VI Description
Initialization VI Prepares the custom device for first use. This VI
defines the initial list of channels and/or
sections that appear in System Explorer, as well
as sets their initial properties.
The VI runs in the background every time an
operator adds the custom device to the system
definition file. It reads information from the
Custom Device XML file and uses the data to add
an instance of the custom device to System
Explorer. The instance runs in the execution
mode you specify and loads the correct
dependency files. If the operator adds multiple
instances of the device to the same system
definition file, this VI runs for each new
instance.
Main Page VI Runs when the operator selects the custom
device in System Explorer. The front panel of
this VI serves as the configuration page for the
VI Description
custom device. You can modify this VI to add
additional controls and indicators to the
configuration page, and to configure responses
to user events, such as when the operator
enters a new item property value.
Extra Page VIs Provides custom configuration pages for the
sections and channels that appear under the
custom device in System Explorer. You can
configure these VIs in the same way you
configure the Main Page VI. Every extra page you
configure must have an entry in the <Pages>
section of the Custom Device XML file.
If you do not specify an extra page for a section
or channel, VeriStand displays a default section
or channel page when you select the item. You
can use the Set Item GUID VI to change the page
associated with an item at run time.
Action VIs Allows the custom device to perform custom
actions when specific events occur, such as
when the system definition is loaded in System
Explorer.
Shortcut Menus Appears in a shortcut menu when a custom
device item is right-clicked in the System
Explorer. These may also appear as toolbar
buttons.
518 ni.com
VeriStand
VI name Description
RT Driver VI Runs after the operator deploys the system
definition file. You can add code to this VI to
handle any run-time requirements of the
custom device. Use this code to configure
initialization, steady-state, and shutdown
behavior for the custom device engine. This VI
handles timing information and the exchange of
data between the custom device and the rest of
the VeriStand system.
Related concepts:
■
Custom Device API Library
Related tasks:
■ Automating Responses to User Actions with Action VIs
■ Adding Custom Glyphs, Shortcut Menus, and Toolbar Buttons
Custom Device Build Specifications
The Build Specifications in a custom device LabVIEW project includes the
Configuration and Engine source distributions.
The Configuration source distribution contains the source files that specify the
configuration of the custom device when added to a VeriStand system definition. It
also defines the user interface for the custom device in System Explorer.
This build specification must include the following items:
■ Initialization VI
■ Main Page VI
■ Custom Device XML file
■ Any additional page VIs
■ Any VIs the custom device configuration calls dynamically
The Engine source distribution contains the source files that configure how the
custom device runs on the target. This build specification minimally includes the RT
Driver VI. This specification also can include additional driver VIs and a timing
source VI.
Both build specifications always include the Custom Device library, even though
they do not both include every VI within that library.
Component Description
Channels and waveforms The inputs and outputs of the custom device.
Properties Configuration data for the custom device.
Hierarchy The organization and appearance of the custom
device in System Explorer.
520 ni.com
VeriStand
Component Description
Pages The configuration pages that appear in System
Explorer.
Device Type The execution mode of the custom device in
terms of interaction with the rest of VeriStand.
After planning your custom device, you can implement the custom device.
Related concepts:
■
Custom Device Framework
■ Custom Device Channels and Waveforms
■ Custom Device Item Properties
■ Custom Device Hierarchy
■
Custom Device Pages
■ Custom Device Types
Related tasks:
■ Implementing a Custom Device
Custom Device Channels and Waveforms
A custom device uses channels and waveforms to exchange data with the rest of the
VeriStand system.
Waveforms differ from channels in that VeriStand always sends channel data to the
host computer, but VeriStand only streams waveform data upon request. You should
acquire signals as waveforms when you need to read at rates faster than the rate at
which the system runs.
Channels perform single-point acquisition, an immediate, non-buffered operation
that occurs at the rate at which the system runs. All channels are either 64-bit
floating point numbers (LabVIEW DBLs) or waveforms. No other data types are
currently supported. However, as you write code for a custom device, you can use
LabVIEW's various data conversion functions to convert other types of data to 64-bit
floating point numbers. For example, if the LabVIEW API for a third-party device calls
for Boolean data to enable a channel or filter, you can use a DBL channel with the
assumption that 0 = FALSE and !0 = TRUE.
Note You can also use the Register Custom Device Engine Events VI to
configure engine events and design a communication mechanism to
handle data of different types. Alternatively, you can use other remote
communication methods, such as TCP and UDP.
You can create input and output channels. Input channels get data from the rest of
the VeriStand system. Output channels send data to the rest of the system. An
operator can map each input channel to a single data source. However, an output
channel can map to any number of sinks, such as simulation model inputs.
There are three common use cases for a custom device channel:
1. Handling data generated by the custom device after deployment.
2. Handling data generated elsewhere in the VeriStand system and used by the
custom device after deployment.
3. Implementing dynamic properties.
Best practice is to implement channels with general use-cases in mind. For example,
if you are writing a custom device to interface with third-party hardware, consider
adding custom device channels for every physical channel of the hardware device
and give the custom device operator the ability to remove channels while
configuring the custom device in the system definition file.
Custom Device Item Properties
Custom device item properties store and communicate state information about a
custom device item, such as a section or channel.
A custom device item is anything that appears in System Explorer, such as a
channel within a custom device or the custom device itself. Use properties to
transfer configuration and state information from the configuration to the engine
after an operator deploys the system definition file to the target. After deployment,
the engine can read properties on the target, but it cannot write properties or
exchange properties with the host computer.
For example, if you are creating a custom device for third-party hardware and you
need to implement a range option for the channels you will use to communicate
with the hardware, you should implement the range setting as a property. You can
then customize the page VIs for those channels to accept a value for range, allowing
you to define the value when configuring the channels in System Explorer. When the
custom device is deployed, VeriStand will read the value for range and set the range
522 ni.com
VeriStand
of that channel when the system definition is deployed. After it is deployed, you can
no longer change the value for range.
Unlike a channel, which must be a 64-bit floating point number, a property can be
any standard LabVIEW data type. However, property names are case-sensitive
strings. VeriStand saves property names and values with the system definition file. If
you save and close the file or project, VeriStand retains the properties the next time
you access the system definition file.
Custom Device Pages
In a custom device, pages are the configuration pages that appear when you select
the custom device or various sub-items of the device in System Explorer.
The configuration page that an operator sees is simply the front panel of a page VI.
Every custom device must include a Main Page VI that runs when the operator
selects the top-level custom device item in the configuration tree. Sub-items of the
custom device, such as sections and channels, appear with simple default
configuration pages that allow a user to set descriptions for the associated items.
Extra Pages
You can create additional pages with extended functionality and use those pages in
place of the default pages.
Plan an extra page for each item in a custom device that you want to customize
differently. For example, if you want to use the same custom configuration page for
all channels in a custom device, you only need to create one extra page.
The following table displays the items VeriStand requires to override a default page
with an extra page in the custom device.
524 ni.com
VeriStand
Note Timing and sync devices are the same as regular custom devices,
but you can configure them as the hardware synchronization master to
drive RTSI0. They appear in System Explorer under Hardware » Chassis »
Timing and Sync.
The following table displays the pre-defined custom device types that are included
in VeriStand.
526 ni.com
VeriStand
Note Both inline and asynchronous custom devices have advantages and
limitations. Consider launching asynchronous loop(s) within an inline
custom device to take advantage of the best features of both while
overcoming many of their limitations.
528 ni.com
VeriStand
a While Loop, meaning your asynchronous custom device will execute as fast as
possible. You can change the default While Loop to a Timed Loop, and then
configure the Timed Loop to use a specific timing source, such as the timing source
for a hardware device.
You can synchronize an asynchronous custom device with the Primary Control Loop
by using the Device Clock control as the timing source of your Timed Loop. Device
Clock is a timing sourced ticked for every iteration of the Primary Control Loop after
custom device FIFOs have been updated. If you synchronize your device with the
PCL, the dt of your Timed Loop will be in ticks of the PCL. So if you set the dt as 3,
your Timed Loop will execute every 3 ticks of the PCL.
An asynchronous custom device uses a two-loop architecture, one loop for receiving
commands and one for transferring data, with sections of code for initialization and
cleanup before and after the loops, respectively. The template VI uses a While Loop
for data transfer, but you also can use a Timed Loop.
In general, you use a While Loop if timing is not important or if you want the loop to
run as fast as it can. You use a Timed Loop if you need the loop to execute
deterministically or run pseudo-synchronously with the Primary Control Loop.
530 ni.com
VeriStand
532 ni.com
VeriStand
The inline hardware interface custom device is similar to the inline model interface
custom device. An inline hardware interface custom device has two cases, or steps,
that execute within an iteration of the PCL. An inline model interface custom device
has only one step that executes within a PCL iteration.
Related concepts:
■ Custom Device API Library
Related tasks:
534 ni.com
VeriStand
Note Because the Initialize case executes before the PCL starts, you
cannot read or write channel values in this case.
3. Modify the Start case that executes after initialization but before the PCL starts
running.
If necessary, you can use this case to start device tasks, such as DAQ tasks, or
to wait for start triggers. Because the Start case executes before the PCL starts,
you cannot read or write channel values in this case.
Note If you use a start trigger in the Start case, you should specify a
timeout for waiting on the trigger. Failing to specify a timeout can
cause your system to wait indefinitely if the start trigger does not
occur as expected.
4. Modify the following code to set up a the Read Data from HW case that
executes at the beginning of each iteration of the PCL before other
components such as faults, alarms, and procedures.
536 ni.com
VeriStand
538 ni.com
VeriStand
The following image displays the execution order of those cases with respect to the
Primary Control Loop (PCL).
Note Because the Initialize case executes before the PCL starts, you
cannot read or write channel values in this case.
3. Modify the Start case that executes after initialization but before the PCL starts
running.
If necessary, you can use this case to start device tasks, such as DAQ tasks, or
to wait for start triggers. Because the Start case executes before the PCL starts,
you cannot read or write channel values in this case.
Note If you use a start trigger in the Start case, you should specify a
timeout for waiting on the trigger. Failing to specify a timeout can
cause your system to wait indefinitely if the start trigger does not
occur as expected.
4. Modify the following code to set up the Execution case that executes in the
middle of the PCL iteration.
This case reads input data, executes the model, and then writes output data
to the rest of VeriStand. Model refers to a mathematical function. You may
need to average channel data, or you can execute a LabVIEW or other model
using the LabVIEW Model Interface Toolkit.
540 ni.com
VeriStand
5. Modify the Close case that executes after the PCL finishes executing.
Use this case to close references and release resources. Because the close
case executes after the PCL terminates, you cannot read or write channel
values in this case.
If your custom device needs to read or write channel data for multiple channels at a
time, consider using block data references in your code.
Related tasks:
■
Implementing Channel Block Reading and Writing in Inline Custom Devices
Implementing Channel Block Reading and Writing in Inline Custom Devices
Modify an inline model interface custom device to use block data references to read
and write channel data.
Before you begin, create an inline model interface custom device.
In an inline custom device, you can read or write channel data for multiple channels
at a time using block data references. Block reading and writing is useful for custom
devices with a large number of channels, as this technique runs faster than channel-
by-channel access. Block reading and writing also simplifies your code, as
referencing, reading and writing to a large number of channels individually can
become large and complex.
Use the following VIs from the Custom Device API library to work with block
references:
■ Get Channel Block Data References VI
■ Get Channel Values by Block Data Reference VI
■ Set Channel Values by Block Data Reference VI
542 ni.com
VeriStand
Related concepts:
■ Inline Model Interface Custom Devices
■ Custom Device API Library
Timing and Sync Custom Devices
A timing and sync custom device is any device that has the capability to drive the
RTSI 0 line to serve as the chassis master hardware synchronization device for a
system.
The RTSI 0 line is a digital line that sends a clock signal to synchronize all hardware
I/O devices in the system. You can plan and build a timing and sync custom device
from a LabVIEW project. You must modify the VIs of the project to conform to the
custom device framework and build the device for distribution to VeriStand.
When you distribute the device, operators can add the device to VeriStand by
copying the contents of the Build directory you create into the <Common
Data>\Timing and Sync directory on their host computer. VeriStand parses this
directory for timing and sync devices when it launches.
After an operator has added the custom timing and sync device to the directory,
they can add the device to the system definition file and configure the device as the
chassis master hardware synchronization device. Timing and sync devices appear in
System Explorer under Hardware » Chassis » Timing and Sync.
Related concepts:
■ Custom Device Framework
544 ni.com
VeriStand
Related tasks:
■ Adding and Configuring Timing and Sync Devices
Inline Custom Devices with Asynchronous Loops
The RT Driver VI of an inline custom device can communicate channel data with
VeriStand while launching an asynchronous loop(s) to handle nondeterministic
operations.
One example of a nondeterministic operation is writing data to a log file. The RT
Driver VI of the inline custom device communicates with the asynchronous loop(s)
using RT FIFOs.
The following table displays the advantages and limitations of using this
architecture when compared to inline and asynchronous custom devices.
Note You can find the Embedded Data Logger source code in the
VeriStand Embedded Data Logger Custom Device repository on GitHub.
Action Description
Initializing RT FIFOs and launching an The Initialize case of the Embedded Data Logger
asynchronous loop RT Driver VI creates two RT FIFOs and launches
an asynchronous loop. One RT FIFO
communicates channel data from the
Embedded Data Logger RT Driver VI to the
asynchronous loop. The other RT FIFO
communicates state information from the
asynchronous loop to the Embedded Data
Logger RT Driver VI.
The following diagram illustrates how the
Embedded Data Logger and asynchronous loop
execute with respect to the PCL and how the
Embedded Data Logger communicates to the
asynchronous loop via RT FIFOs.
546 ni.com
VeriStand
Action Description
Reading the status of the asynchronous loop in One of the RT FIFOs created in the Initialize case
the inline custom device passes status information from the
asynchronous loop to the Embedded Data
Logger RT Driver VI. You can see how the
Embedded Data Logger RT Driver VI reads data
from the RT FIFO by examining the Read Data
from HW case. In this case, the Embedded Data
Logger checks the RT FIFO for a change in the
error value.
Sending channel data from the inline custom The other RT FIFO sends channel data from the
device to the asynchronous loop Embedded Data Logger RT Driver VI to the
asynchronous loop. This communication takes
place in the Write Data to HW case, specifically
in the Sample Group Data VI that executes in
this case. This VI is responsible for getting the
values of the channels to log from the PCL and
writing them to the RT FIFO so the
asynchronous loop can access them.
Related tasks:
■ Synchronizing an Asynchronous Custom Device with the Primary Control
Loop
■ Logging Target Data with the Embedded Data Logger
Related information:
■ VeriStand Embedded Data Logger Custom Device
1. Depending on your goal, complete any of the following tasks to configure the
appearance and components of your custom device.
Goal Task
Add custom device channels and waveforms Add channels and waveforms to a custom
device by using the appropriate VI within a
Custom Device Library VI that runs on the
host computer.
Add custom device item properties Use VIs on the Item Properties palette to get
and set properties of custom device items.
Add custom device pages Add pages to a custom device by creating
the extra page VIs and GUIDs, adding the
extra pages to the custom device build
specifications, and defining the pages in the
Custom Device XML file.
Implement a custom device hierarchy Implement a flat or nested hierarchy for
your custom device.
Add custom glyphs, shortcut menus, and Use elements in the Custom Device XML to
toolbar buttons configure custom user interface
components, such as glyphs, toolbar
buttons, and shortcut menus.
Add custom error codes Build custom error codes for your custom
device using the General Error Handler VI or
the Error Code File Editor.
Automate responses to user actions Use action VI templates with the custom
device XML file to automate responses to
user actions.
2. Depending on your goal, complete any of the following tasks to customize the
custom device engine by completing the following tasks.
Goal Task
Sync an asynchronous custom device with Configure an asynchronous custom device
the PCL to run synchronously with VeriStand by
configuring the custom device to use the
548 ni.com
VeriStand
Goal Task
same timing source as the Primary Control
Loop (PCL).
Read and write waveforms in the custom Use waveforms in custom devices to publish
device engine waveform data or read waveform data from
other sources in the VeriStand Engine.
3. Use tools to benchmark and debug the custom device.
Note Channels can also be added when an operator takes an action, such
as using a shortcut menu or toolbar button.
Mechanism VI Type
Channel Add Custom Device Channel VI
Waveform Add Custom Device Waveform VI
3. Modify the following code in the VI.
Note The following image displays the Add Custom Device Channel
VI customized to add two input channels and one output channel.
The customizing process for the Add Custom Device Waveform VI is
very similar.
550 ni.com
VeriStand
This custom device contains several hardware input channels, each with two item
properties. They are Filter Setting and Input Range. The custom device has the
following functionality regarding its properties:
■ When a user selects a channel from the system definition, the configuration
page for that channel initializes Filter Setting and Input Range. However, if the
properties already have set values, the configuration page displays the values
of the properties.
■ The configuration page allows operators to enter new values for each
property.
■ When an operator deploys the custom device, the RT Driver VI gets the value
for each item property so the RT Driver VI can use the values.
To implement this functionality, you have to modify your custom device code.
1. Modify the following code to set up the Initialization case to initialize the item
properties Filter Setting and Input Range in a page VI for a selected channel.
When an operator selects a custom device channel in System Explorer, the
page VI associated with that channel or section runs. The page VI then uses a
reference to the selected channel or section to get and set the properties for
that channel. If the properties are already initialized, the page VI gets the
current values for the properties and displays them on the front panel.
552 ni.com
VeriStand
3. Modify the following code to set up a RT Driver VI to get the property values of
Filter Setting and Input Range for each channel.
554 ni.com
VeriStand
1. Create a page VI with the required reference using the template VI included in
the Custom Device API library.
a. Open the LabVIEW project for your custom device.
b. In Project Explorer, browse to My Computer » Custom Device
API.lvlib » Templates » Subpanel Page VI » Page Template.vit.
c. Right-click Page Template.vit and select New from Template.
d. From the front panel of the new VI, save the VI in the folder containing
the other VIs for your custom device, such as RT Driver VI and Main Page
VI.
e. Close the VI.
f. In Project Explorer, drag the new VI to the Custom Device library.
2. Declare the page in the XML file of the custom device.
a. Open the LabVIEW project for your custom device.
b. In Project Explorer, browse to My Computer » Custom Device
<Name>.xml and open the XML file of your custom device.
c. Under the Pages section of the XML file, locate the Page section for the
main page of your custom device.
The declarations for the main page should be the first listed under the
Pages section. The name of the main page corresponds to the name of
the custom device.
d. Copy the information between the Page tags, including the <Page> and
</Page> declarations, and paste it between the <Pages> and </Pages>
declarations.
e. Replace the information between the <eng> and <loc> decelerations
with the name of the new page.
For example, if you saved your page VI as ExtraPage.vi, enter ExtraPage.
f. Replace the information between the Path tags with the file path to the
new page.
Note You should only need to replace the last token in the
path, <Name> Main Page.vi, with your page VI.
Note Every item with a unique page VI must have a page entry in
the Custom Device XML file and a unique GUID. However, items with
different GUIDs can reference the same page VI. If you want to create
several configuration pages that are only slightly different, you can
use the same page VI for each item by configuring the VI to check the
associated item GUID at run time. For example, you can add a Case
structure to the page VI with a case for each GUID.
556 ni.com
VeriStand
h. Select the new page VI, and from the Destination drop down box, select
<Name> Configuration LLB.
i. Click OK to close the build specification.
j. Save the LabVIEW project.
4. Restart VeriStand.
If your new page is not created properly, you will receive a custom device page error
when adding your custom device to the system definition:
Implementing a Custom Device Hierarchy
Implement a flat or nested hierarchy for your custom device.
Before you begin, you should understand custom device hierarchies.
A flat hierarchy is a hierarchy in which all of the channels appear under one section
in the configuration tree. A nested hierarchy includes additional sections under the
main section, allowing you to organize your channels.
1. Use the following table to determine the type of hierarchy you want in your
custom device.
558 ni.com
VeriStand
Related concepts:
■
Custom Device Hierarchy
Adding Custom Glyphs, Shortcut Menus, and Toolbar Buttons
Use elements in the Custom Device XML to configure custom user interface
components, such as glyphs, toolbar buttons, and shortcut menus.
Before you begin, you should understand the custom device XML and the custom
device specific XML tags.
560 ni.com
VeriStand
Adding shortcut menus A shortcut menu for an item Within the <Page> tags for an
is the menu that appears item, you can use the
when you right-click the item <RunTimeMenu> tag to
in System Explorer. configure the shortcut menu
for the item. Each
<MenuItem> you add under
<RunTimeMenu> includes an
<Item2Launch> section that
specifies a VI to run when an
operator selects the menu
item.
The Custom Device API
library includes a template
for this VI, RunTimeMenu
Custom Item 2 Launch.vit, in
the labview\vi.lib\NI
VeriStand\Custom Device API
directory.
The following is an example
framework you can use to
implement a shortcut menu.
562 ni.com
VeriStand
If VeriStand encounters your custom error code, it will display the message you
defined in the file.
Automating Responses to User Actions with Action VIs
Use action VI templates with the custom device XML file to automate responses to
user actions.
Before you begin, you should understand the action VI templates and the custom
device XML file.
Action VIs are dynamically called VIs that execute when a user performs a specific
action in a custom device. For example, you can use an action VI to notify a user of
the implications of removing a specific custom device item before they delete it.
c. Save the new action VI to the same directory as the custom device
project.
2. Declare the action VI in the Custom Device XML.
You declare the action VI within the declaration for a specific page. The action
VI executes when a user performs the triggering action on that page.
a. From the custom device LabVIEW project, open the custom device XML
file.
b. Locate the <Page> tags for the custom device item from which you want
to call the action VI.
c. Declare the action VI anywhere beneath the <Item2Launch> tag.
The following image gives an example of how to declare the action VI.
564 ni.com
VeriStand
f. From the Destination pull-down menu, select the Configuration .llb file.
g. Click OK to save the new settings.
Action VI Templates
VeriStand contains eight action VI templates that are triggered by different actions.
The following table displays the action VI templates provided by VeriStand in the
Custom Device API library.
Action VI Description
ActionVIOnLoad Executes when VeriStand loads a custom device
item into memory. This template helps create
action VIs that launch background processes.
For example, if your custom device requires
large amounts of data, you can customize this
template to start a daemon that runs processes
or gathers data in the background.
ActionVIOnDeleteRequest Executes when a user tries to delete an item
from the custom device. This template helps
create action VIs that prevent a user from
deleting a custom device item or warn a user of
the implications of deleting a custom device
item.
The template has the following unique
parameters.
■ Item Ref—The reference to the custom
device item whose XML declaration calls
this action VI.
■ Refs that are about to get deleted—A 1D
array of references to the items to be
deleted. However, the 1D array will only
contain one reference, as users can only
delete one item at a time in the System
Explorer window.
■ Discard reason—An output you can use
to capture the user's reason for deleting
the item.
■ Discard delete request?—Allows you to
discard the delete request. After the
Action VI Description
action VI finishes executing, VeriStand will
evaluate this output to determine
whether or not to delete the item. If True,
VeriStand will not delete the item. If False,
VeriStand will delete the item.
■ Additional items to delete—An array of
references to additional items you want
to delete. For example, if other custom
device items depend on the item the user
wants to delete, you can use this output
to automatically delete those items.
566 ni.com
VeriStand
Action VI Description
■ Path—Path on disk to the system
definition file.
■ System Explorer Shutdown?—Indicates
whether or not System Explorer closed.
This parameter is always True.
Action VI Description
■ ftp session out—Open FTP session used
to download the system definition file to
the target.
568 ni.com
VeriStand
Action VI Description
You can customize this template to finish
configuring your hardware. The system
definition file compiles when a user deploys the
system definition, so you can configure your
hardware based on the final settings from the
system definition.
You can also customize the template to quickly
gather host-side settings. For example, often the
custom device RT Engine VI uses properties set
in the system definition. You can customize this
template to read the values on the host side,
which is much faster than reading them from
the real-time target. You can then gather the
properties into a single cluster, convert that
cluster to a data variant, and write the variant
as a single item property.
add and configure the Set Loop Type VI in the Main Page VI of the custom
device.
570 ni.com
VeriStand
Related concepts:
■
Asynchronous Custom Devices
■ VeriStand Engine
Related tasks:
■ Using the Asynchronous Custom Device Driver Template
Reading and Writing Waveforms in the Custom Device Engine
Use waveforms in custom devices to publish waveform data or read waveform data
from other sources in the VeriStand Engine.
Before you begin, add a waveform to your custom device.
VI Description
Get Waveform Data Reference Generates a data reference to a specific
waveform. If you want to write multiple
waveforms, call this VI once per waveform
and build an array of data references.
Open Waveform Session Opens a write session for one or multiple
waveforms. You should specify the delta t
(dt), or time interval in seconds between any
two points in the signal. For example, the dt
of a 10 kHz waveform is 0.0001 seconds.
Start Waveform(s) Provides a start time (t0) that defines when
the first sample is written. Readers of the
waveform in the VeriStand Engine and on
the host computer will receive this value. If
you want to read data from another
waveform or from the DAQmx API, the t0 is
provided. However, if you want to read
waveform data from an FPGA, you must
calculate the t0 yourself.
572 ni.com
VeriStand
VI Description
Write Waveform(s) Writes an array of waveform samples. Call
this VI repeatedly as you generate data for
the waveform. You can write as much or as
little data at a time as you want. If you
opened a write session for multiple
waveforms, this VI writes to each waveform
simultaneously.
Close Waveform Session Closes the write session.
3. Use the VIs on the Waveform Data palette to implement a read session from
the waveform in the RT Driver VI of your custom device.
VI Description
Get Waveform Data Reference Generates a data reference to a specific
waveform. If you want to read multiple
waveforms, call this VI once per waveform
and build an array of data references.
Open Waveform Session Opens a read streaming session for one or
multiple waveforms.
Read Waveform(s) Returns an array of values from the
waveform whenever any waveform source
publishes data. Call this VI repeatedly to
read data as it is published.
Close Waveform Session Closes the waveform streaming session.
For an example of a custom device that reads and writes waveforms, on a computer
with LabVIEW installed, browse to the labview\examples\NI Veristand\Custom
Devices\Waveform Analysis and Generation directory and open Waveform Analysis
and Generation Custom Device Project.lvproj.
After you have set up your custom device, review the other considerations for
reading and writing waveforms in a custom device engine.
Related concepts:
■Other Considerations for Reading and Writing Waveforms in a Custom
Device Engine
Related tasks:
574 ni.com
VeriStand
output called Properties. Compare the Data reference to the data references you
generated before you opened the waveform session.
Note The Read Waveform(s) VI returns dt, offset from start (samples), and
t0 at start in a cluster output.
576 ni.com
VeriStand
Related concepts:
■ Custom Device Framework
■
Custom Device XML File
Related tasks:
■ Viewing Real-Time Target Logs
■ Adding and Configuring Alarms
578 ni.com
VeriStand
Note You must include the Custom Device XML file in the
Configuration source distribution.
Note This option can cause an error when you load the
custom device in VeriStand.
g. Click OK.
3. Create an Engine source distribution.
a. In Project Explorer, right-click Build Specifications and select New »
Source Distribution.
b. In the My Source Distribution Properties dialog box, click Information,
and enter the Build specification name as Engine.
c. Enter a Destination directory.
a. Click Source Files and determine which files to include and exclude.
b. Click Destinations and set the Destination type to LLB.
c. Click Additional Exclusions, and disable Modify project library file
after removing unused members.
d. Click OK.
4. Save the LabVIEW project.
5. Right-click Build Specifications and select Build All.
580 ni.com
VeriStand
You now can distribute the custom device ZIP file to any operator using a
corresponding version of VeriStand. The operator can add the custom device to
VeriStand by copying the contents of the Build directory into the <Common
Data>\Custom Devices directory or, for timing and sync devices, the <Common
Data>\Timing and Sync directory on their host computer. VeriStand parses these
directories for custom devices when it launches.
Note The path to the shared directory varies based on your operating
system.
To enable an operator with LabVIEW access to modify and rebuild the custom
device, you can provide the files in the Source directory.
Related tasks:
582 ni.com
VeriStand
Note The FPGA VI displays broken wires from any FPGA I/O
Nodes with undefined channels. For more information on
adding I/O to a project, refer to the LabVIEW FPGA Module
Help.
Related tasks:
■ Customizing an FPGA VI
Related reference:
■
VeriStand Directories and Aliases
Customizing an FPGA VI
Modify an FPGA VI to match your hardware device.
Before you begin, copy a sample FPGA VI and project and learn about FPGA
customization guidelines and defaults.
Note For FPGA targets with no analog inputs or outputs, you can
remove the analog I/O items from the project and the corresponding
FPGA I/O Nodes from the FPGA VI.
Similarly, the default sample FPGA VI defines the digital lines on connector 0
as 8 PWM inputs and 8 PWM outputs. You may need more or fewer PWM
channels. You can add other custom I/O not defined in the sample FPGA VI.
3. Optional: If the FPGA VI displays broken wires to FPGA I/O nodes, update the
corresponding I/O nodes with the correct pins available on the target.
4. Optional: If the number of packets in either the DMA_READ or DMA_WRITE
FIFO is greater than 15, update the FIFO size.
a. In Project Explorer window, right-click a FIFO I/O item and select
Properties.
b. In the FPGA FIFO Properties dialog box under General, change the
Number of Elements, and click OK.
584 ni.com
VeriStand
Guidelines
Use the following guidelines to avoid creating errors.
■ Do not modify, remove, or rename block diagram objects in the gray areas
of the sample FPGA VI.
■ Do not modify the read or write code except to change the number of
packets or to change the size of the array constant for the DMA read operation
of the DMA_WRITE FIFO.
■ Ensure that the name of each control is unique within the VI.
■ Do not use the following control/indicator names: Loop Rate (usec), Write to
RTSI, Use External Timing, Reset, Start, or Generate IRQ.
Note For more information on creating FPGA VIs and bitfiles for an FPGA
target, refer to the LabVIEW Help by selecting Help » LabVIEW Help in
LabVIEW.
Defaults
The process of creating a custom FPGA VI differs depending on the hardware devices
you are using. The default project defines the following FPGA I/O items for the
PXI-7854R device:
Related tasks:
■
Copying the Sample FPGA VI and Project
Note For more information on compiling FPGA VIs, refer to the LabVIEW
Help by selecting Help » LabVIEW Help in LabVIEW.
1. Open LabVIEW.
2. In Project Explorer, right-click the FPGA VI, and select Compile.
586 ni.com
VeriStand
The compiler places the bitfile in an FPGA Bitfiles subdirectory relative to the project
file directory. By default, the bitfile name is <name of project>_<name of FPGA
VI>.lvbitx.
After creating a bitfile, create an FPGA configuration file.
Related tasks:
■
Customizing an FPGA VI
■ Creating a Custom FPGA Configuration File
Note FPGA configuration files must have at least one space in the
file name.
Related tasks:
■ Compiling a Custom FPGA VI into a Bitfile
Related reference:
XML schema files (.xsd) are definition files that constrain an XML file to a certain
format. You can add a schema file to most XML editing tools when writing an XML
file. Use the NI VeriStand FPGA DMA.xsd schema file in the <Common Data>\FPGA
directory to minimize syntax and formatting errors when you create an FPGA
configuration file.
The following table displays the XML tags you can use in the FPGA configuration file.
To see how to implement these tags, refer to the example FPGA Configuration File
Structure.
588 ni.com
VeriStand
590 ni.com
VeriStand
592 ni.com
VeriStand
594 ni.com
VeriStand
596 ni.com
VeriStand
598 ni.com
VeriStand
Related concepts:
■ DMA Scale and Offset
Related reference:
600 ni.com
VeriStand
<?xml version='1.0'>
<?xml-stylesheet type="text/xsl" href='NI VeriStand FPGA DMA.xsl'?>
<FPGADMAChannelData xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation = "NI VeriStand FPGA DMA.xsd">
<Version>2.0</Version>
<Bitfile>FPGADMABitfile.lvbitx</Bitfile>
<Categories>
<Category>
<Name>TopLevel1</Name>
<Description>Description</Description>
<Symbol>Default</Symbol>
<Category>
<Name>NestedCategory1</Name>
<Description>Category with AI Symbol contained in TopLevel1</
Description>
<Symbol>AI</Symbol>
</Category>
<Category>
<Name>NestedCategory2</Name>
<Description>Category with DI Symbol contained in TopLevel1</
Description>
<Symbol>DI</Symbol>
</Category>
</Category>
</Categories>
<DMA_Read>
<Packets>5</Packets>
<Packet/>
<Packet>
<I8>
<Name>Signed8Channel</Name>
<Description>Description of channel</Description>
<Category>TopLevel1\NestedCategory1</Category>
<InitialValue>25</InitialValue>
<Scale>128</Scale>
<Offset>5</Offset>
<Unit>Volts</Unit>
<Symbol>AI</Symbol>
</I8>
<U8>
<Name>Unsigned8Channel</Name>
602 ni.com
VeriStand
<Description>Description of channel</Description>
<Category>TopLevel1\NestedCategory2</Category>
<InitialValue>25</InitialValue>
<Scale>128</Scale>
<Offset>5</Offset>
<Unit>Volts</Unit>
<Symbol>AI</Symbol>
</U8>
<I16>
<Name>Signed16Channel</Name>
</I16>
<Boolean>
<Name>BooleanChannel</Name>
</Boolean>
<Void>
<Size>7</Size>
</Void>
</Packet>
<Packet>
<FXPI32>
<Name>Fixed Point Channel 1</Name>
<Scale>2</Scale>
<Offset>5</Offset>
<Unit>Volts</Unit>
<Symbol>AI</Symbol>
<FXPWL>20</FXPWL>
<FXPIWL>5</FXPIWL>
</FXPI32>
</Packet>
<Packet>
<PWM>
<Name>PWM In 0</Name>
<Description>PWM input</Description>
<Category>Input\PWM</Category>
<Scale>100</Scale>
<Unit>%</Unit>
<Symbol>PWM In</Symbol>
<PWMPeriod>40000</PWMPeriod>
</PWM>
</Packet>
<Packet>
<U8>
<Name>Channel with one parameter</Name>
<Parameters>
<I16>
<Name>UI Parameter name</Name>
<ControlName>Name of Control</ControlName>
<InitialValue>25</InitialValue>
<Scale>100</Scale>
<Offset>0</Offset>
</I16>
</Parameters>
</U8>
</Packet>
</DMA_Read>
<DMA_Write>
<Packets>4</Packets>
<Packet>
<U8>
<Name>Unsigned8Out</Name>
<Category>TopLevel2</Category>
<Symbol>DO</Symbol>
</U8>
</Packet>
</DMA_Write>
</FPGADMAChannelData>
Related reference:
■
FPGA Configuration File XML Tags
604 ni.com
VeriStand
Glossary
VeriStand uses unique terms for completing tasks while creating a project.
Use the following table to learn more about a term used in VeriStand.
606 ni.com
VeriStand
608 ni.com
VeriStand
610 ni.com
VeriStand
612 ni.com
VeriStand
614 ni.com
VeriStand