Using the VeriStand Model Framework for Simulink

Run Simulink models written in C/C++ with the VeriStand Model Framework.

Before you begin, install the VeriStand Model Framework on the computer you are compiling the model. The framework adds tools you will use during the compile process. You should also install a supported version of Simulink. For more information, refer to VeriStand Model Generation Support and MathWorks Simulink® Compatibility.
Note The Simulink user interface differs between versions of the software. For more information on how to implement the following steps, refer to Simulink Coder in the Simulink documentation.
  1. Launch Simulink and load the model you want to convert.
  2. Configure the model parameters with the following settings.
    • Stop time: inf
    • Type: Fixed-step
  3. Generate the model code.
  4. Optional: If the model specifies any .c or .h files, include the locations of the source files and directories.
  5. Based on your target’s operating system, select the correct TLC file and compiler.
    OS TLC File Compiler
    Windows NIVeriStand.tlc

    Microsoft Visual C++

    Note NI recommends installing Microsoft Visual Studio 2017 with C++ Development option enabled.
    NI Linux Real-Time Intel x64-based targets NIVeriStand_Linux_64.tlc

    C/C++ Development Tools for NI Linux Real-Time, Eclipse Edition

  6. Build the model.
The MATLAB software command window displays the status of the build process and indicates when the Simulink Coder software has completed compiling the model.
After compiling, add the model to the system definition.