Table Of Contents

Using Models from C and C++

Last Modified: November 16, 2020

Create a model in C or C++ that NI software can load and execute through the VeriStand Model Framework.

Before you begin, you should understand the VeriStand Model Framework.
  1. Choose a compilerDownload compiler tools to convert models made in other modeling environments.
  2. Create a model header fileCreate a model.h header file that contains the type definitions for model properties and all user-visible parameters in your model.
  3. Adapt the template to model codeUse the template.c file that the VeriStand Model Framework installs as a starting point for your model code.
  4. Create a makefile to compile model codeCreate a makefile for the compiler and operating system your model will use.
Locate example .c and model.h files and makefiles in <RootDrive>\VeriStand\<xxxx>\ModelInterface\custom\examples.

<RootDrive> is the drive where NI software installs and <xxxx> is the VeriStand version number. If you have problems locating the files, check NI Package Manager to make sure that the VeriStand Model Framework was installed.

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 Help»LabVIEW Help. Click Contents and browse to Toolkits»Model Interface Toolkit.

Recently Viewed Topics