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
-
On the Modeling tab, select Model Settings from the menu.
-
Click Solver in the left-side navigation tree and verify the settings for model compilation.
-
Click Hardware Implementation in the left-side navigation tree and verify the settings.
-
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.
-
On the Code Generation tab select GCC Compiler for VeriStand NI Linux Real-Time targets from the Toolchain drop-down menu.
-
Click OK to close the Configuration Parameters dialog box.
-
In the Model Browser, right-click the vehicle dynamics model and select C/C++ Code»Build This Subsystem from the menu.
-
View the log file from the building process in the Diagnostic Viewer.
Post-requisite
-
Note the location of the resulting compilation file for import into VeriStand.
-
Import the model files into VeriStand
How to interface with I/Os and Parameters of Simulink® Models in VeriStand
How to interface with 1D-Array Parameters of Simulink® Models in VeriStand