Considerations for Integrating Models from MathWorks Simulink
- Updated2026-05-07
- 4 minute(s) read
Considerations for Integrating Models from MathWorks Simulink
The Model Interface API identifies and categorizes elements in MathWorks Simulink models.
The Model Interface API identifies the following elements in models you created and compiled in MathWorks Simulink according to their configuration in the Simulink:
- Inports
- Outports
- Parameters
- Signals
Case Study: Simple Models
When you load this model in an application, the Model Interface API categorizes its components as described in the following table:
| Component in Model | Type of Component in LabVIEW |
|---|---|
| Raw_Sine | Signal |
| Sine_Gain | Parameter |
| In1 | Inport |
| Out1 | Outport |
Inports and Outports
Parameters
Compiled models contain one of two types of parameters:
A Simulink model can contain only one type of parameter. However, an application can contain a model with global parameters and a model with block parameters.
Conditions Where Parameters Are Unavailable
The Model Interface API supports model references to submodels, but you cannot access parameters or signals in submodels. Submodels run in an application built with the Model Interface API, but their parameters and signals are not available for writing or reading.
In the Simulink, you can use inline parameters, but the Model Interface API cannot access inline parameters to get or set their values. If you use an inline parameter, you can still allow the Model Interface API to influence the parameter by configuring a variable that affects the parameter to be tuneable. For example, consider a model with the following characteristics:
- Contains a constant configured with the expression x + 3.
- Contains a sine wave block whose amplitude and frequency parameters are inlined, and therefore unavailable in the Model Interface API.
- Adds the result of the x + 3 constant to the output from the sine wave block.
Although the parameters of the sine wave block are unavailable, you can influence the operation by specifying that the x variable is tunable in the Simulink. When x is tunable, it will appear in the list of parameters of the model, so you can change the value of x like a parameter as the model runs.
Signals
Model signals are usually excluded when you convert a model into a compiled model. To include model signals you must define the signals as test points in the software you use to compile the model.
Conditions Where Signals Are Unavailable
Certain optimizations you enable in the Simulink can make a signal unavailable to the Model Interface API. You can disable these options for the entire model to make all signals available for probing, but the memory footprint of the model increases as a result. Alternatively, you can mark individual signals as test points in the Simulink to maintain a reduced memory footprint while keeping the test-point signals available for probing.
Bus Objects
In models compiled in Simulink R2010b or a later supported version, named components of bus objects, such as signals, are represented in the same hierarchy as in the uncompiled model. For models compiled in versions of the Simulink earlier than R2010b, bus objects are represented as a single vector of components.
Related Information
- Using Models from MathWorks Simulink
Integrate MathWorks Simulink models with the Model Interface API by compiling them into supported formats for real-time targets.