Conversion Process for Models from MathWorks Simulink
- Updated2026-05-07
- 2 minute(s) read
Conversion Process for Models from MathWorks Simulink
Convert MathWorks Simulink models into compiled models using MathWorks Real-Time Workshop and compatible tools for use with the Model Interface API.
Before you can run a model you created in MathWorks Simulink with the Model Interface API, you must use Simulink to convert the model file to a compiled model. Simulink performs the following process:
- When you build the compiled model, MathWorks Real-Time Workshop converts your model and any submodels into a C/C++ code version of the same model. The resulting C/C++ code version of your model is the same Simulink block diagram model, just in a different form.
- A compiler, such as Microsoft Visual C++, compiles the C/C++ code model into the appropriate
file type. For example, the Microsoft Visual C++ compiler creates the following
files:
- ModelName.dll
- ModelName.out
- ModelName.so
Note Shared libraries used by LabVIEW VIs must exist in either the ni-rt/ or the ni-rt/system/ directory. LabVIEW ignores paths that are specified in the Call Library Node. - The MathWorks Real-Time Workshop places the compiled model file in one of the following
directories located in the current working directory:
- (NI Linux Real-Time) <ModelName>_NIVeriStand_Linux_ARM_32_rtw
- ModelName>_NIVeriStand_Linux_64_rtw
Note Real-Time Workshop also generates the <ModelName>_portsReadme.txt text file, which specifies the lengths and positions of all model inport and outport array data.
The following figure shows this conversion process:
The tools you use to convert a Simulink model, such as Microsoft Visual C++ and the GNU Toolchain, differ according to the type of target that runs the model. However, the previous conversion process is generally the same across targets. For more information on the versions of the LabVIEW, Windows, model compiler, and MathWorks you can use with the LabVIEW Model Interface Toolkit, see the VeriStand Model Generation Support and MathWorks Simulink Compatibility knowledge base article at ni.com.
To compile a Simulink model, the VeriStand Model Framework must be installed on the computer with Simulink. The VeriStand Model Framework adds tools to Simulink that allow you to compile models that work with the Model Interface API.
Related Information
- Compiling a Model from MathWorks Simulink
Convert MathWorks Simulink models into compiled models compatible with the Model Interface API.
- Compiling Models
Compile models compatible with the LabVIEW Model Interface Toolkit.
- VeriStand Model Generation Support and MathWorks Simulink Compatibility