Compiling a Plant Model for NI HIL Real-Time Target - CPU

Pre-requisite

  • Install VeriStand Model Generation Support in Simulink
  • Open the Vehicle Model from the Simulink simulation

Procedure

  1. On the Modeling tab, select Model Settings from the menu.
    ../image/model-settings-menu-highlighted.svg

  2. Click Solver in the left-side navigation tree and verify the settings for model compilation. ../image/model-settings-menu-solver-example.png

  3. click Hardware Implementation in the left-side navigation tree and verify the settings. ../image/model-settings-menu-hardware-implementation-example.png

  4. Click Code Generation in the left-side navigation tree and select veristand.tlc for the System target file. The option appears only after installation of the VeriStand Model Generation Support Add-on for MATLAB. ../image/model-settings-menu-system-target-file.png

  5. On the Code Generation tab select GCC Compiler for VeriStand NI Linux Real-Time targets from the Toolchain drop-down menu. ../image/model-settings-menu-toolchaing.png

  6. Click OK to close the Configuration Parameters dialog box.

  7. In the Model Browser, right-click the vehicle dynamics model and select C/C++ Code»Build This Subsystem from the menu. ../image/model-build-this-subsystem.png

../image/diagnostic-viewer-code-generated.png

Post-requisite

  • Note the location of the resulting compilation file for import into VeriStand.
  • ../image/veristand-model-files-from-simulink-highlighted.png
  • Import the model files into VeriStand