Table Of Contents

Using Models from LabVIEW VIs

Last Modified: March 24, 2021

Convert LabVIEW VIs into compiled .lvmodel or .lvmodelso files.

Before you begin, verify VeriStand supports your hardware target, prepare your LabVIEW VIs for conversion, and choose your compiler tools.
In order to generate compiled models from LabVIEW VIs, you need the following products:
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.
  1. In LabVIEW, select Tools»NI VeriStand»Generate Model from VI.
  2. On the Generate NI VeriStand Model from VI dialog box, enter the Source VI Path where you saved the source file.
  3. Enter a Destination Folder where you want to save the generated model.
  4. Optional: If your source file is a simulation subsystem, click Next.
    1. Specify a model time step (sec) that indicates the interval between the times the ODE Solver evaluates the model and updates the model output.

      For your compiled model to run in real-time, the model time step (sec) value must equal the controller period multiplied by the model Decimation, or the model Decimation divided by the Target Rate. These two methods are represented by the following equations.

      • model time step (sec) = Controller Period * Decimation where Controller Period = 1/Target Rate
      • model time step (sec) = Decimation/Target Rate

      In System Explorer, use the Controller Configuration page to specify the Target Rate and the Model Configuration page to specify the Decimation.

    2. Specify the ODE Solver.
  5. Click Build.

    If you experience errors when converting a VI, refer to LabVIEW VI Model Conversion Preparation.

If you deploy the compiled .lvmodel or .lvmodelso to a real-time target, VeriStand automatically copies required .dlls to the target. However, if you manually copy the file to a new location, such as a different host computer, you must move the following support files to maintain relative paths:
  • A .depvs file that LabVIEW creates to reference the dependencies.
  • Any LabVIEW .dll located in a subdirectory named data in the destination folder where LabVIEW generates the compiled model.

You must install additional software to enable LabVIEW models for targets running a Linux Real-Time OS (.lvmodelso files). For more information about how to use LabVIEW models with Linux, see Creating Models in NI LabVIEW for Use in NI VeriStand.

Recently Viewed Topics