Using LabVIEW VIs as Models
- Updated2026-05-07
- 3 minute(s) read
Convert LabVIEW VIs into compiled models for use with the LabVIEW Model Interface Toolkit or VeriStand systems.
You can convert other LabVIEW VIs into compiled .lvmodel or .lvmodelso files that the Model Interface API can run. This might be useful if you want to distribute the .lvmodel or .lvmodelso to other users to work with in the LabVIEW Model Interface Toolkit or VeriStand systems. You can convert LabVIEW VIs and simulation subsystems you create using the LabVIEW Control Design and Simulation Module. The following sections describe how the Model Interface API supports these models.
Verifying That LabView Model Support is Installed
To compile models in LabVIEW, you must install the LabVIEW Model Support feature, available from VeriStand.
Verifying Support for Your Hardware Target
Before you convert a LabVIEW VI into a compiled .lvmodel or .lvmodelso, answer the following questions to determine whether your target supports these models:
Preparing VIs to be Converted to Models
In the source VI to be compiled, you must assign front panel controls and indicators in VIs to the connector pane. Then, the Model Interface API can identify panel controls when it loads the compiled .lvmodel or .lvmodelso files as the following elements:
- Inports
- Outports
- Parameters
The following table describes how to build the VI connector pane with custom controls and indicators to work with VeriStand:
| Desired Component in Test Application | VI Connector Pane Assignment | Is Default Value Maintained? |
|---|---|---|
| Inport | Required input | No |
| Outport | Any output | No |
| Parameter | Optional or Recommended input | Yes |
Supported Data Types
Ensure that front panel controls or indicators assigned to the VI connector pane have only the following data types:
- Numerics
- Booleans
- 1D arrays of numerics
- 1D arrays of Booleans
- Clusters containing the previous data types
If you use an unsupported data type, LabVIEW returns an error when you try to convert the VI to a compiled .lvmodel or .lvmodelso file. Controls and indicators that are not assigned to the connector pane might have other data types because these objects are not part of the compiled model.
Configuring Global and Local Parameters
A compiled .lvmodel or .lvmodelso might contain two types of parameters:
A .lvmodel or .lvmodelso file can contain both local and global parameters.
Considerations for VIs with Array Terminals
If a VI contains an array control or indicator you want to include in the .lvmodel or .lvmodelso, enter a value in the nth element of the array, where n is the desired number of elements. Then, right-click the array control and select . Otherwise, the array becomes a single scalar value when the Model Interface API loads the model.
Related Information
- Compiling Models
Compile models compatible with the LabVIEW Model Interface Toolkit.
- Generating Compiled Models from VIs
Convert LabVIEW VIs or simulation subsystems into compiled models for use with the Model Interface API and Linux Real-Time OS targets.
- Real-Time Controllers and Real-Time Operating System Compatibility