Generating Models from The MathWorks, Inc. Simulink® Software for Deployment on NI Linux Real-Time Systems

Updated Jul 8, 2020

Reported In


  • CompactRIO Chassis
  • PXI Controller


  • VeriStand
  • Simulink

Operating System

  • LabVIEW Real-Time (NI Linux Real-Time)

Issue Details

I have a Simulink® model that I would like to compile for my NI PXIe Controller or NI CompactRIO running NI Linux Real-Time. How can I properly configure my modeling environment to build my models?


Before following these configuration steps, make sure you have installed versions of MATLAB®, Simulink®, and Real-Time Workshop® onto your development machine that are compatible with your NI VeriStand Version.

In order to build a .so file, you will need the appropriate compilation tools. 

For VeriStand 2019R3 and later:
1. Download the compatible VeriStand Version or install it from the NI Package Manager which is recommended.
2. Run the Veristand installation and make sure that the VeriStand Model Framework is selected:
Note: Since VeriStand 2019R3 the C/C++ Development Tools for NI Linux Real-Time is included into the VeriStand Model Framework installer so you do not need to install any additional compiler Toolchain to compile models for Linux-RT Targets. Simply ensure that on the additional items to install that the C/C++ Development Tools box is Checked, and it will be included in the install. 
4. Now to compile your Simulink® Model make sure to select the appropriate Toolchain for your Linux-RT Target in the Code Generation Tab as shown below: 
For VeriStand 2019R2 and earlier:

Download and install the version of C/C++ Development Tools for NI Linux Real-Time that matches your version of LabVIEW Real-Time: Before attempting to compile your model, please use an installer disc or a downloaded installer  to install NI Veristand and the NI VeriStand Model Framework.

With the NI VeriStand Model Framework and C/C++ Development Tools for NI Linux Real-Time, Eclipse Edition prepared, you can now build the .so file for your model using The Mathworks, Inc. Real-Time Workshop® software:
  1. Open Simulink®. From within your model, go to Simulation»Configuration Parameters.
  2. In the Solver tab, please ensure the Stop Time is set to inf and the Type is set to Fixed-step.
  3. Under the Real-Time Workshop® category select the NIVeriStand_Linux_ARM_32.tlc (For ARM-based targets) or NIVeriStand_Linux_64.tlc (For Intel x64-based targets) file click Apply
  4. Click Apply and then click Build to compile the model.

Additional Information

  • LabVIEW 2014 Model Interface Toolkit added support for compiling Simulink® models into shared objects that can run on ARM-based NI Linux Real-Time targets.
  • VeriStand 2015 and LabVIEW 2015 Model Interface Toolkit added support for compiling models for both ARM-based and Intel x64-based NI Linux Real-Time targets. 
  • VeriStand 2019R3 and higher has now the C/C++ Development Tools for NI Linux Real-Time included into the VeriStand Model Framework installer so you do not need to install any additional compiler Toolchain to compile Simulink® models for your Linux-RT Targets.

Simulink® and Real-Time Workshop® are registered trademarks of The MathWorks, Inc. All other trademarks are the property of their respective owners.