Process Summary
Note: You can convert models that use only a fixed step-size ordinary differential equation (ODE) solver. Additionally, you must turn off data logging in The MathWorks, Inc. Simulink® software. Refer to the Simulink documentation for information about changing the ODE solver of a model and disabling data logging.
Note: If you do not have a compiler set up to compile the C code, or if you have set up an unsupported compiler, you must run mex -setup in the The MathWorks, Inc. MATLAB® software before compiling your model.
Launch Simulink and load the model that you want to convert. Follow the steps below to build a model dll for use in NI VeriStand.
- Select Simulation»Configuration Parameters to launch the Configuration Parameters dialog box.
- Click the Real-Time Workshop tab.
- Click the Browse button to launch the System Target File Browser dialog box.
- Select NIVeriStand.tlc—NI Real-Time Target from the list.
- Click the OK button.
- Click the Build button in the Category section to begin building the compiled model. The MATLAB command window displays the status of the build process.
- The following message in the MATLAB command window indicates that The MathWorks, Inc. Real-Time Workshop® software has completed building the compiled model: Successful completion of Real-Time Workshop build procedure for model: Model Name.
- After Real-Time Workshop builds a compiled model, NI VeriStand places the compiled model in a directory named <ModelName>_NIVeriStand_rtw, which is located in the current working directory.
Using the Model DLL
You can now import the Simulink® model into your system definition just as you would any other model. NI VeriStand Help and the NI VeriStand instructional video contain more information about importing models into the system definition.
Required Software
To use Simulink to build simulation models for NI VeriStand, you must have both The NI VeriStand Model Framework and Simulink® with the Real-Time Workshop® plugin software installed on your computer. The NI VeriStand Model Framework installs with NI VeriStand, and it can be used free of charge. You can activate the NI VeriStand Model Framework by installing the license file from here: NI VeriStand Model Generation Activation Utility.
Additional Resources
View the NI VeriStand Demonstration Videos
MATLAB®, Simulink®, and Real-Time Workshop® are registered trademarks of The MathWorks, Inc.
