1. Software Installation
The first step is to install NI VeriStand software and associated driver software on your Windows computer. Then install NI VeriStand Engine software on all real-time targets to which you are deploying.
Host PC Software Installation
Install NI VeriStand by using the NI VeriStand DVD or downloading NI VeriStand at
ni.com/veristand/download. When you run the installer, you have the option to select the components that you need for your application.
- LabVIEW support adds an NI VeriStand palette to LabVIEW for automated control of NI VeriStand from LabVIEW.
- The NI VeriStand Model Framework adds support for building simulation models in third-party environments such as The MathWorks, Inc. Simulink® simulation software and ANSI C.
- With NI VeriStand LabVIEW model support, you can convert a LabVIEW VI into a simulation model that can be used in NI VeriStand.
Note: The NI VeriStand Model Framework can be installed independently and licensed free of charge. For machines that do not need the NI VeriStand environment, select only the NI VeriStand Model Framework for installation. Once you have installed the NI VeriStand Model Framework, you can license it for free by using the NI VeriStand Model Generation Activation Utility found here: http://joule.ni.com/nidu/cds/view/p/id/2466/lang/en.
After you install the necessary NI VeriStand software components, install NI Device Drivers from either the Device Drivers DVD or from ni.com/drivers. Install the following drivers:
- Optional: NI-RIO (for CompactRIO or FPGA functionality)
- Optional: NI-XNET (for CAN, LIN, or FlexRay functionality)
- Optional: NI-Industrial Communications for EtherCAT (for CompactRIO Scan Engine and EtherCAT functionality)
After all installations are complete on the host PC, open NI Measurement & Automation Explorer to confirm the installed software by expanding the My System»Software item within the tree structure as shown below.
Software Installation on the Real-Time Target
Once you have all of the necessary software on your host computer, you need to install software on the real-time target computer by following the steps below.
In Measurement & Automation Explorer, select your NI VeriStand real-time target under the Remote Systems tree item.
Select the Software item for your real-time target and choose Add/Remove Software.
For CompactRIO targets only: Select the Custom Software Installation option.
Choose to install the NI VeriStand Engine. This installs the NI VeriStand Engine as well as the software components required to run it.
Optional: If you want to implement a distributed real-time test system that uses GE reflective memory interfaces, select the GE reflective memory software on the target for installation.
Optional: If you are using a CompactRIO device and you want to install the Scan Engine Custom device, select the NI-Industrial Communications for EtherCAT and I/O Variable Remote Configuration Web Service for installation as well.
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 the Remote Systems»Real-Time Target»Software item within the MAX tree structure as highlighted above.
2. NI VeriStand Project Setup
Open NI VeriStand (Start»Programs»National Instruments»NI VeriStand) and create a New NI VeriStand Project. Choose your project name and directory path from the window that appears.
Note: National Instruments recommends keeping all project dependencies relative to the project file location and placing them in the same folder or in a 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.
In the NI VeriStand Project Explorer window, expand the System Definition File tree item and open the *.nivssdf file found there by right-clicking on the file and selecting Launch System Explorer.
Selecting Deployment Targets
PXI Real-Time and cRIO-908x Targets
Configure the PXI target by highlighting Controller in the tree, selecting PharLap for the OS, and using the same IP address displayed for the PXI system in MAX. Rename the controller Name to a unique name of your choosing.
All Other CompactRIO Real-Time Targets
Configure the CompactRIO target by highlighting Controller in the tree, selecting VxWorks for the OS, and using the same IP address displayed for the CompactRIO system in MAX. Rename the controller Name to a unique name of your choosing.
Running the NI VeriStand Engine on the Localhost Windows Computer
Configure the Windows target by highlighting Controller in the tree and selecting Windows for the OS. Note localhost is the automatic selection for IP address, which indicates that the System Definition runs on the host PC. Rename the controller Name to a unique name of your choosing.
Configuring the NI VeriStand Engine Using the System Explorer
While in the Controller section, 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 NI VeriStand Engine and keeps updated channel values. Find more information on the Primary Control Loop and other individual loops running on the NI VeriStand Engine in NI VeriStand Engine Architecture.
Expand Controller in the tree and note the various items you can add to your System Definition.
- Hardware: Expand Hardware and then Chassis. This is where you identify your NI-DAQ, Data Sharing (Reflective Memory), NI-FPGA, NI-XNET, or Timing and Sync devices. You can also add multiple chassis.
- Custom Devices: Customize and extend the out-of-box functionality of NI VeriStand into a device that you can add to a system definition file and deploy to a real-time target. NI VeriStand includes three custom devices that you can add here as well as any custom devices you have created yourself. Check the NI VeriStand Add-Ons Community to view other existing custom devices and the NI VeriStand Custom Device Developer’s Guide when considering building your own custom device.
- Simulation Models: Expand Simulation Models. Add your compiled models from one of the supported modeling environments listed in the document Using Simulation Models With NI VeriStand. If you have multiple models, you also can set the order in which models execute on the NI VeriStand Engine.
- 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.
- 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 NI 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 NI 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. These are configured in the System Configuration Mappings window, which is examined in the next section.
- Data Sharing Network: Add and configure a reflective memory network. To learn more about using reflective memory with NI VeriStand, go to Creating a Distributed System With NI VeriStand.
- 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. Right-click on Alias and select Add Alias. Type in the desired alias Name and Description and then click the Browse button next to the Channel to select the channel to rename.
This opens the Browse window to select your channel from the system explorer tree.
Aliases are useful for many reasons, including sharing one Workspace with multiple system definitions and mapping Workspace objects to those aliases. Because of this, you can rename System Definition channels within an alias without the Workspace losing its mapping.
Mapping System Channels
You can easily connect channels to each other in NI VeriStand using a mapping tool. This tool helps you quickly connect simulation models to physical I/O as well as any other channel in your system. To configure mappings for your NI VeriStand system, select Tools»Edit Mappings or click on the Configure Mappings button, shown below, to connect channels to each other such as a model output to a physical channel or a calculated channel to an alias.
Select a channel in the tree under Sources in the System Configuration Mappings window that just opened.
Select a channel under Destinations and then click Connect to map the channels. Note that the Source and Destination channels now appear under Mappings.
System channel mappings can be exported and saved to file. You can then import this file to automate the system mapping process at a later time.
Deploying NI VeriStand Projects
Once you have configured your system definition, save and close the System Explorer. There are two options for running NI VeriStand projects.
Run: Launches the Workspace window. If you have configured the system to run on a PC, clicking the button begins running the project. If you have configured the system to run on an RT target, clicking the Run button deploys the system definition file if one is not already running. If a system definition file already is running on the RT target, clicking the Run button connects to the target and launches the Workspace window without re-deploying the system definition file.
Deploy: Pressing the button deploys the system definition to the target that you specified in the System Explorer. However, it does not open the Workspace Window. If a system definition file already is running on the RT target, deploying a new system definition will replace the system definition that is currently running.
3. Building Simulation Models for Use With NI VeriStand
You can use NI VeriStand with a wide variety of simulation modeling environments and programming languages. Model subsystems can be built independently and integrated within the NI VeriStand environment, so you can easily replace simulated components with real components as they become available.
Generating Models From The MathWorks, Inc. Simulink® Simulation Software
If you are using an NI real-time target and you don't know which OS is running on the target, view What Operating System Is My Real-Time Controller Running and Why?
- For model deployment on Windows and PharLap-based systems, view Setting Up The MathWorks, Inc. MATLAB® Environment to Work in NI VeriStand.
- For deployment on VxWorks-based NI CompactRIO systems, go to Developing Shared Libraries for the cRIO-901x and Other VxWorks Targets for Windows XP development computers and Generating Models From The MathWorks, Inc. Simulink® Simulation Software for Deployment on VxWorks Systems for Windows Vista and later.
Additional Modeling Environments
For more information on interacting with models from other modeling environments and programming languages in NI VeriStand, go to Using Simulation Models With NI VeriStand. This document has a complete list of supported modeling environments that have been tested and verified as being able to create compiled models that can be imported in NI VeriStand.
4. Using the EtherCAT and Scan Engine Add-On for NI VeriStand
With the Scan Engine and EtherCAT custom device, you can easily 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 NI VeriStand is compatible with CompactRIO targets and the NI 9144 EtherCAT expansion chassis.
Download NI VeriStand Add-On: Scan Engine and EtherCAT custom device from the NI VeriStand developer community and follow the installation instructions.
To add the Scan Engine and EtherCAT Custom Device to your NI VeriStand system, follow these steps:
- Open NI VeriStand and your System Definition.
- Right-click on Custom Devices and select Scan Engine and EtherCAT.
- Select Auto-Detect Modules or 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.
5. Additional NI VeriStand Environment Resources
NI VeriStand has many features you can use out of the box without programming. To see video demonstrations of some of these features, visit ni.com/veristand/demos.
For an in-depth walkthrough of the NI VeriStand environment, download the NI VeriStand Tutorial.
To learn more about creating add-ons for NI VeriStand, watch the NI VeriStand Add-Ons Webcast.
For instructor-led training on NI VeriStand features, take the NI VeriStand Fundamentals Training Course.
MATLAB®and Simulink® are registered trademarks of The MathWorks, Inc. All other trademarks are the property of their respective owners.