Using Models Created with LabVIEW in NI VeriStand

Publish Date: Nov 15, 2012 | 5 Ratings | 3.00 out of 5 |  PDF

Overview

This tutorial examines how to run models created with NI LabVIEW in NI VeriStand. The NI LabVIEW Control Design and Simulation Module can be used to create real-time model dlls for NI VeriStand that include ODE solvers. If an ODE solver is not required, LabVIEW 2010 can natively create real-time model dlls for NI VeriStand without any additional add-ons or toolkits. The dll can then be used on both Windows and real-time ETS targets such as NI PXI and NI Industrial controllers. Once you have built the user DLL, you can load it into NI VeriStand the same way as other model DLLs from other environments such as SimulationX and MapleSim.

Table of Contents

  1. Introduction
  2. System Requirements and Installation

1. Introduction

NI VeriStand provides a software framework for creating real-time testing applications using a configuration-based development approach. All of the common tasks or functionality of a real-time test system have been implemented and optimized inside the NI VeriStand Engine.  Users can quickly configure a variety of standard analog, digital, and communication bus interfaces in NI VeriStand. These interfaces are often used in conjunction with simulation models, which can be created natively in LabVIEW 2010.

 

Back to Top

2. System Requirements and Installation

Software Required

• LabVIEW 2010 or Later
• LabVIEW 2010 Application Builder or later 
• (Optional) LabVIEW 2010 Control Design and Simulation Module or later
• In addition to the software above, you need to install NI VeriStand LabVIEW Model Support from the NI VeriStand installer.  

 

Model Creation Process


1. Create a VI or simulation subsystem that performs the actions you require from your simulation model.

2. Configure the connector pane for your VI or subsystem. Only inputs and outputs you add to the connector pane appear when you load the generated model in NI VeriStand. Required inputs appear as model inports, optional inputs appear as model parameters, and all outputs appear as model outports.

3. Save the VI or subsystem.

4. Select Tools»NI VeriStand»Generate NI VeriStand Model From VI to display the Generate NI VeriStand Model From VI dialog box.

5. In the Source VI Path field, enter the path where you saved the source file.

6. In the Destination Folder field, enter the path where you want to save the generated model.

7. (Control Design and Simulation) If your source file is a simulation subsystem, click the Next button and complete the following steps.

a. Specify a value for the model time step (sec), which is the interval between the times the ODE Solver evaluates the model and updates the model output, in seconds. For your compiled model to run in real-time, the model time step (sec) value must equal the controller period, or Target Rate, multiplied by the model Decimation:

     model time step (sec) = Decimation/(Target Rate)

You specify the Target Rate on the Controller Configuration page of the System Explorer window. You specify the Decimation on the Model Configuration page of the System Explorer window.

b. Specify the ODE Solver.

8. Click the Build button. The Generate NI VeriStand Model From VI dialog box displays the progress of the model   generation.

The NI VeriStand LabVIEW Model Generator saves the generated compiled model (.lvmodel file) in the specified destination folder. This folder also contains associated support files. If your source file depends on any LabVIEW DLLs, such as NILVSim.dll for a simulation subsystem, LabVIEW creates a data subdirectory in the Destination Folder to store the DLLs and a .depvs file to reference the dependencies. If you move the .lvmodel file, you also must move the data subdirectory and .depvs file to maintain relative paths.

9. The compiled model can now be added to the system definition file.

 

Inputs, Parameters, or Outputs?


NI VeriStand makes a distinction between inports and parameters.  The model VI's connector pane determines whether a VI input is a model inport or a parameter.



    • Required control terminals on the connector pane are NI VeriStand inputs.
    • Any other control terminals on the connector pane are NI VeriStand parameters.
    • All indicators on the connector pane are outputs.

Supported Data types

The supported data types include the following:
    • Numeric
    • Boolean
    • 1-dimensional array of numerics or booleans
    • Cluster of arrays of numerics or booleans

More Resources

NI VeriStand
NI LabVIEW
LabVIEW Control Design and Simulation Module
Customizing the NI VeriStand Engine

Back to Top

Language

Bookmark & Share

Ratings

Rate this document

Answered Your Question?
Yes No

Submit