Integrating and Executing Models

NI VeriStand 2018 Help

Edition Date: May 2018

Part Number: 372846M-01

»View Product Info
Download Help (Windows Only)

A model is a mathematical representation of a real-world system. As you develop the plant and controller for your closed-loop control system, you might find value in creating software models that simulate one or both of these components. Models run on hardware targets and are typically used to respond to stimuli from other parts of the system by producing outputs in a way that simulates the modeled item. Models also can serve the functions of signal generation, signal analysis, and control.

Models can contain the following components that connect to other parts of the system or allow you to interact with the model:

  • Inports and Outports—To communicate with other parts of the control system, models contain inputs and outputs, called inports and outports. You can map inports and outports directly to hardware inputs and outputs, other models in the system, system channels, and so on. Inports and outports are dynamic values the simulation updates each time the model executes.
  • Parameters—Parameters act like variables in the model. Unlike inports, whose values come from elsewhere in the system and change frequently, users typically manipulate parameters infrequently to tune the behavior of the simulation. For example, an operator might set a parameter before the model starts executing or update its value between the execution of discrete tests.
  • Signals—Signals serve as probes, or test points, of a model as it executes.

Consider a system that contains a physical motor controller and a model that represents a DC motor. The model runs on a hardware target. Such a model might contain the following components:

  • An inport that accepts the motor command from the motor controller.
  • An outport that returns the motor speed from the model.
  • Parameters that adjust the load on the motor. You might set parameter values once per test rather than updating them frequently during the test.
  • A signal that returns internal data that aids in debugging.

The remainder of this topic describes tasks you typically perform to create and integrate a model into an NI VeriStand system.

Building and Preparing Models for Use in NI VeriStand

You can build models using several different modeling environments. You typically must compile a model in the modeling environment before it can run on an RT target in your NI VeriStand system. The exact process for preparing a model to execute in NI VeriStand depends on the modeling environment you use to build it. Refer to the appropriate resource for your specific modeling environment for information about preparing the model for use in NI VeriStand:

If you build the model in some other modeling environment, refer to the modeling environment documentation for information on how to convert your model into a compiled model.

Related Link

Developer Zone: List of supported modeling environments

Adding and Configuring Models in a System Definition

You add models to a system definition file to include them in an NI VeriStand system. When you add the model, you also configure its timing and choose how to import its inports, outports, parameters, and signals.

Related Links

Adding and Configuring Models

Recommendations for Configuring Models

Connecting the Model with Other Parts of the System

After you add a model, you map parts of the model to channels in other parts of the system to create connections between them. For example, you might map a hardware channel to a model inport so the model receives and operates on data from the hardware device.

Related Link

Mapping Channels

Controlling and Monitoring Models While They Execute

Use UI Manager or workspace objects and other tools to control the execution of models, monitor their status and timing, configure their parameters, and read from their signals.

Related Links

Controlling and Monitoring the Execution of Models

Setting Model Parameters at Run Time


Not Helpful