Using Models from C and C++
- Updated2025-04-08
- 2 minute(s) read
Create a model in C or C++ that NI software can load and execute through the VeriStand Model Framework.
-
Based on the operating system (OS), choose a compiler.
OS Compiler Windows Microsoft Visual C++ NI Linux RT x64 C/C++ Development Tools for NI Linux Real-Time, Eclipse Edition - Create a model header file—Create a model.h header file that contains the type definitions for model properties and all user-visible parameters in your model.
- Adapt the template to model code—Use the template.c file that the VeriStand Model Framework installs as a starting point for your model code.
- Create a makefile to compile model code—Create a makefile for the compiler and operating system your model will use.
After compiling the model, add it to a system definition.
For more information on simulating models in LabVIEW with the Model Interface Toolkit, open LabVIEW and select Contents and browse to .
. ClickRelated Information
- VeriStand Model Framework
The VeriStand Model Framework is used to design and compile models created in third-party modeling environments and C/C++.
- Creating a Model Header File
Create a model.h header file that contains the type definitions for model properties and all user-visible parameters in your model.
- Adapting the C Template to Model Code
Use the template.c file that the VeriStand Model Framework installs as a starting point for your model code.
- Creating a Makefile and Compiling Model Code
Create a makefile for the compiler and operating system your model will use.
- Adding and Configuring a Model
Connect a model to other parts of the system and run the model on a hardware target.