|Download Help (Windows Only)|
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 Model Interface Toolkit or NI VeriStand systems. You can convert LabVIEW VIs, or convert simulation subsystems you create using the LabVIEW Control Design and Simulation Module. The following sections describe how the Model Interface API supports these models.
|Note 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, visit the NI website.|
Before you can compile models in LabVIEW, you must install the LabVIEW Model Support feature, available on the NI VeriStand DVD you receive with your purchase. More information.
Before you convert a LabVIEW VI into a compiled .lvmodel or .lvmodelso, answer the following questions to determine whether your target supports these models:
In the source VI to be compiled, you must assign front panel controls and indicators in VIs to the connector pane so the Model Interface API can identify them as inports, outports, and parameters when it loads the compiled .lvmodel or .lvmodelso. Build the VI connector pane according to how you want each control or indicator to work NI VeriStand, as the following table describes.
|Desired component in test application||VI connector pane assignment||Is default value maintained?|
|Parameter||Optional or Recommended input||Yes|
Ensure that front panel controls or indicators assigned to the VI connector pane have only the following 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. Note controls and indicators not assigned to the connector pane can have other data types because these objects are not part of the compiled model.
A compiled .lvmodel or .lvmodelso can contain two types of parameters, global parameters and block parameters:
|Tip To determine whether a parameter is global or block based on its path, use the Get Paths VI to return the paths of model parameters in a model.|
A .lvmodel or .lvmodelso can contain both local and global parameters.
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 Data Operations»Make Current Value Default. Otherwise, the array becomes a single scalar value when the Model Interface API loads the model.