该内容不适用于您选择的语言

该内容将以另一种语言显示出来。 您可使用浏览器的翻译功能查看内容。

Getting Started With NI VeriStand 2020

Updated Jul 26, 2023

Environment

Software

  • VeriStand

VeriStand is a software tool that provides a framework for real-time testing applications such as embedded software validation and real-time control and monitoring of mechanical test cell applications. The framework enables you to perform real-time or PC-based test configuration and execution that can be easily customized and extended with LabVIEW, TestStand, and other software tools. VeriStand’s features will help you get started with running HIL simulations. Review this article to learn more about getting started with VeriStand 2020.If using a later version, refer to Getting Started with Veristand 2021. If using a previous version of VeriStand, refer to Getting Started with NI VeriStand 2018 SP1 and Previous.

Software Installation

Before you begin, install VeriStand and associated driver software onto your Windows computer. You must also install the VeriStand Engine software on all real-time targets you will deploy to.
 

Host PC Software Installation

  1. Install VeriStand from the VeriStand DVD, NI Package Manager, or VeriStand Web Download.

  2. Select the components needed for your application, including Add-Ons and Drivers.
     

Note: For machines that do not need the VeriStand environment, select only the VeriStand Model Framework for installation. The VeriStand Model Framework can be installed independently and licensed for free. Once you have installed the VeriStand Model Framework, you can license it for free by using the serial number S14X86758.
 

  • Application Software: VeriStand

  • Add-Ons (Optional):

  • VeriStand Model Framework: Adds support for building simulation models in third-party environments such as MathWorks Simulink®* simulation software and ANSI C.

  • VeriStand Model Generation Support for LabVIEW: Converts a LabVIEW VI into a simulation model for VeriStand.

  • ASAM XIL TestStand Steps: Sets of custom steps that allow you to reuse test sequences developed for other hardware-in-the-loop (HIL) systems that use the ASAM XIL API.

  • VeriStand Custom Devices: Includes various custom devices that NI supports.

  • Drivers: Drivers needed to interface with hardware.
     

Figure 1. Installing VeriStand and Drivers
 

  1. After all installations are complete on the host PC, open NI Measurement & Automation Explorer (MAX) to confirm the installed software by expanding the My System » Software item within the tree structure as shown in Figure 2.
     

Figure 2. NI MAX 
 

Software Installation on the Real-Time Target 

Once you have the necessary software installed on your host computer, you need to install software on the real-time target computer. There are two methods of installing software to a target.
 

  1. In Measurement & Automation Explorer, select your VeriStand real-time target under Remote Systems.

  2. The type of installation is dependent on the operating system (Phar Lap vs NI Linux Real-Time).

 
  • Phar Lap
  1. Select the Software item for your real-time target and choose Add/Remove Software.

 

Figure 3. Installing software to Phar Lap target

 

  1. Choose to install the VeriStand Engine. This installs the VeriStand Engine as well as the software components required to run it.  

  1. Optional: To implement a distributed real-time test system that uses GE reflective memory interfaces, select the GE reflective memory software on the target to install.

  1. Optional: If you are using a CompactRIO device and want to install the Scan Engine Custom device, select the NI-Industrial Communications for EtherCAT and I/O Variable Remote Configuration Web Service to install.

  1. Complete the software installation process and reboot your real-time target. You can see a list of currently installed software on your target by looking under Remote Systems»Real-Time Target»Software within the MAX tree structure as highlighted in Figure 3.

 
  • NI Linux Real-Time
  1. If the controller does not have internet access, install NI Linux Real-Time Offline Installation Support on the host computer, and follow the steps in Installing Software to Offline NI Linux Real-Time Targets.

  2. If the controller has internet access:

    1. Select your target, right-click it, and select Format Disk.

    2. Select your target and choose Add/Remove Software. Apply the Base System Image that corresponds to your VeriStand version.

      For example, the minimum Linux RT System Image that can be used with VeriStand 2020 R6 is 21.0.

rtaImage.jpg

Figure 4. Installing Linux RT System Image

 

  1. Select LabVIEW as the programming environment. The LabVIEW functionality in VeriStand always requires like-numbered versions. For instance, if using VeriStand 2020 R6, LabVIEW 2020 must be selected. 

 rtaImage2.jpg

Figure 5. Selecting programming environment
 

  1. Select the specific software components to install on the target. Review Changes and then click Continue

rtaImage3.jpg

Figure 6. Select software components to install

 

VeriStand Project Setup 

For an example of a configured VeriStand Project, click Engine Demo under New.
 

To open a new VeriStand Project, click Default Project under New. Choose your project name and directory path from the window that appears.
 

Note: NI recommends keeping all project dependencies relative to the project file location and placing them in the same folder or subfolder. This includes items such as Workspace files (.nivsscren), System Definition files (.nivssdf), Stimulus Profile files (.nivsstimprof), Real-Time sequence files (.nivsseq), models, and FPGA bitfiles or configuration files.
 

Figure 7. VeriStand Launch Screen
 

Select Deployment Targets

Note: The Operating System drop down has the choice for Phar Lap*, Windows, Linux_32_ARM, and Linux_x64 as of VeriStand 2020. The choices for VeriStand will match the Real-Time Controllers and RTOS Compatibility documentation.

There are 2 ways you can select and configure a deployment target:
 

  1. Follow the Specifying a Target section in the VeriStand Manual.

  2. In System Explorer by:

  1. Highlight Controller in the tree

  2. Select target operating system for the OS

  • If running VeriStand Engine on the Localhost Windows Computer, select Windows for the OS. The automatic selection for IP address is localhost, which indicates that the System Definition runs on the host PC. Skip to step 4.
  1. Use the same IP address displayed for the target system in MAX

  2. Rename the controller Name to a unique name of your choosing

 

*NI removed support for Phar Lap for CompactRIO in the NI 2020 Software Release and for PXI in the NI 2022 Software Release. For more information, please see the Phar Lap RT OS EOL Road Map .

 

Configuring the VeriStand Engine Using System Explorer 

Once a new VeriStand Project is open, press the Configure button to open the System Explorer so you can edit the System Definition.
 

Figure 8. Configure to Open System Explorer
 

  1. Once in the System Explorer, navigate to the Controller section.

  2. The setting for Target Rate underneath the Timing Source Settings section sets the Primary Control Loop rate on your target. The Primary Control Loop controls the timing for the VeriStand Engine and keeps updated channel values. Find more information on the Primary Control Loop and other individual loops running on the VeriStand Engine in VeriStand Engine Architecture .

  3. Expand Controller in the tree and note the various items you can add to your System Definition.

 

Figure 9. System Explorer
 

  • Hardware: Expand Hardware » Chassis to identify your NI-DAQ, Data Sharing (Reflective Memory), NI-FPGA, NI-XNET, or Timing and Sync devices. You can add multiple chassis.

  • Custom Devices: Customize and extend VeriStand out-of-box functionality using devices that you can add to a system definition file and deploy to a real-time target. See the VeriStand Add-Ons Community  to view other existing custom devices and Creating Custom Devices  when considering building your own custom device.

  • Simulation Models: Add your compiled models from one of the supported modeling environments listed in Using Simulation Models With NI VeriStand. If you have multiple models, you can set the order in which models execute on the VeriStand Engine. In VeriStand 2020, you can use the Mapping Diagram to insert Simulation Models.

  • User Channels: User channels store a single value and can function as variables to be used in other areas of your system definition.

  • Calculated Channels: Calculated channels are created to perform calculations on other channels in the system. You can create your own formula or perform built-in operations such as Lowpass Filter, Average, or Peak and Valley. In VeriStand 2020, you can use the Mapping Diagram to insert Calculated Channels.

  • Stimulus: View and configure the stimulus generators in the Legacy Stimulus Profile Editor, which simulate real-world signals to perform tests on a system. If you’re starting a new project without any legacy VeriStand dependencies, ignore this section.

  • Alarms: Configure an alarm to warn the user that the value of a channel has gone outside a specified range of values. Alarms can also trigger a procedure to execute.

  • Procedure: Configure a procedure to execute a set of actions on the VeriStand Engine. A procedure can be signaled to begin at startup or trigger off an alarm or another procedure.

  • NI-XNET Databases: Add any NI-XNET databases to your system. Databases can be CANdb (.dbc), NI-CAN (.ncd), LDF (.ldf), or FIBEX (.xml) files.

  • System Channels: Expand System Channels to view the channels that monitor the state or condition of various system items. These are often used for troubleshooting system behavior.

  • System Mappings: This section displays all defined system mappings, which are connections between source and destination channels. As of VeriStand 2019, you can use the Mapping Diagram to connect channels to each other to visualize mappings.

  • Data Sharing Network: Add and configure a reflective memory network. 

  • System Initialization: If you have multiple targets, you can use this section to set the order that targets deploy relative to each other and determine target reboot action.

  • Aliases: Configure an alias to give a channel or group of channels a unique name in your system definition.

  1. Right-click on Alias and select Add Alias.

  2. Type in the desired alias Name and Description

  3. Click the Browse button next to the Channel to select the channel to rename.
     

Figure 10. Aliases
 

  1. Use the Browse dialog box to select your channel.
     

Figure 11. Browse for linked channel
 

  1. Selecting an alias instead of its linked channel path will decrease the frequency of link errors. Updates to the linked channel path will not affect the alias name.
     

Mapping and Inserting Channels with the Mapping Diagram

Figure 12. Mapping Diagram

 

Connecting Channels

As of VeriStand 2019, you can use the Mapping Diagram to connect channels to each other to visualize mappings. To connect channels:
 

  1. If the Node is collapsed (i.e. User Channels and Engine Demo Simulation Model in Figure 12), right-click the node.
 

Figure 13. Menu when right-clicking a Node
 

  1. Click Show All Channels expand channels

 

Figure 14. Menu after channels are expanded
 

  1. Wire and map to other channels in your system

     

Inserting Simulation and Calculated Channels

In VeriStand 2020, you can use the Mapping Diagram to insert Simulation Models and Calculated Channels. To do so, click the doc icon on the left to give the options and click on the desired channel to be inserted into the Mapping Diagram.

 

Figure 15. Channels List for Inserting into Mapping Diagram

 

Deploy VeriStand Projects

Once you have configured your system definition, save and close System Explorer. You can deploy your system definition.
 

Figure 16. Deploy VeriStand Project
 

Build Simulation Models for Use with VeriStand 

You can use VeriStand with a wide variety of simulation modeling environments and programming languages. Model subsystems can be built independently and integrated within the VeriStand environment, so you can easily replace simulated components with real components as they become available.  
 

  • Generating Models from MathWorks Simulink® Software*


    If you are using an NI real-time target and you don't know which OS is running on the target, see What Operating System Is My Real-Time Controller Running and Why? To learn more about compatibility and software requirements, see VeriStand Version Compatibility.

    To learn how to compile, add, and control a model, see the VeriStand manual .

  • Additional Modeling Environments


    For more information on interacting with models from other modeling environments and programming languages in VeriStand, see Using Simulation Models With NI VeriStand. This document has a complete list of supported modeling environments that have been tested and verified to create compiled models that can be imported into VeriStand.

Use the EtherCAT and Scan Engine Add-On for VeriStand

With the Scan Engine and EtherCAT custom device, you can read scanned I/O from C Series modules located in a CompactRIO or NI 9144 EtherCAT chassis. The add-on also supports the use of custom FPGA personalities with an NI 9144 chassis.
 

Note: The EtherCAT and NI Scan Engine add-on for VeriStand is compatible with CompactRIO targets and the NI 9144 EtherCAT expansion chassis.
 

You can install the Scan Engine and EtherCAT Add-On in the VeriStand installer. Otherwise, you can download and install from GitHub.
 

To add the Scan Engine and EtherCAT Add-On to your VeriStand system, follow these steps:
 

  1. Launch the VeriStand Editor.

  2. In the Project Files pane, double-click a system definition file (.nivssdf). System Explorer opens.

  3. Expand Targets » Controller » Custom Devices in the configuration tree.

  4. Right-click Custom Devices and select Scan Engine and EtherCAT.

  5. Select Auto-Detect Modules. Alternatively, right-click and select Add Local Chassis to use CompactRIO chassis and manually choose the appropriate module for each slot and correct settings for each module.

 

Figure 17. Scan Engine and EtherCAT Custom Device
 

*MATLAB® and Simulink® are registered trademarks of MathWorks. All other trademarks are the property of their respective owners.