Understanding the VeriStand Engine

NI VeriStand 2018 Help

Edition Date: May 2018

Part Number: 372846M-01

»View Product Info
Download Help (Windows Only)

The VeriStand Engine is the non-visible execution mechanism that controls the timing of the entire system as well as the communication between the target and the host computer. The VeriStand Engine consists of multiple timed loops that use real-time (RT) FIFOs to transfer data between the loops. Each loop performs certain designated tasks and has an assigned priority. Although you cannot change the priority or primary tasks of the engine loops, you can customize certain operations of the loops, such as the execution rate. The system definition file contains the configuration settings for the VeriStand Engine.

Note  The VeriStand Engine determines which system definition file to run by communicating over the network with the VeriStand Gateway.

The VeriStand Engine is responsible for executing hardware I/O and running models, procedures, alarms, and tests. The VeriStand Engine computes the values in the channel table based on the results of model execution and hardware I/O. This engine can run on either a desktop PC in simulation mode, or as an embedded application on an RT system.

The following table displays the priority and default execution rate for the loops of the VeriStand Engine.

VeriStand Engine Loop Priority Default Execution Rate
Primary Control Loop H 100 Hz
Model Execution Loop(s) M a decimation of the Primary Control Loop rate
Asynchronous Custom Device Loop(s) H/M/L user-defined
Waveform Processing Loop L Event driven
DAQmx Waveform Producer Loops L 10 Hz. Can also be defined by users.
Data Processing Loop M a decimation of the Primary Control Loop rate
Communication Send Loop L 15 Hz
Communication Receive Loop L event driven
XNET Loop L 100 Hz
DIO Loop L a decimation of the Primary Control Loop rate
Model Interface Loop L event driven

The following figure shows the operation of the VeriStand Engine.

Primary Control Loop

The Primary Control Loop controls the timing for the VeriStand Engine, and maintains the most up-to-date table of channel values. Per iteration, the Primary Control Loop (PCL) executes the following tasks:

  • Reads and writes high-speed FPGA I/O, analog and counter DAQ I/O, and Asynchronous Custom Device Loop data.
  • Applies scaling to the data.
  • Executes one step of the real-time sequence, if a test is currently running.
  • Sends data to the Data Processing Loop in order to synchronize the table of channel values.
  • Sends data to the Model Execution Loops.
  • Prompts the Data Processing Loop, Model Execution Loop(s), and Asynchronous Custom Device Loop(s) to execute.
  • Performs software fault insertion.
  • Creates mapping connections.
  • Executes inline custom devices.
  • Reads status information from the Waveform Processing Loop and DAQmx Waveform Producer Loop(s).

Related Link

List of PCL Execution Steps—A complete, ordered list of the actions the PCL takes.

Model Execution Loop(s)

Each Model Execution Loop executes a corresponding compiled model. The number of Model Execution Loops is determined by the number of models specified in the system definition file. Per iteration, each Model Execution Loop executes the following tasks:

  • Reads the data sent by the Primary Control Loop and maps this data to model inports.
  • Executes one step of the model.
  • Reads model outport values and sends this data to the Primary Control Loop.

Note that Model Execution Loops handle the high-speed, dynamic data associated with model inports and outports, while a separate Model Interface Loop reads and applies the lower-speed, asynchronous updates to model parameter values.

Asynchronous Custom Device Loop(s)

You can determine the number, behavior, and priority of Asynchronous Custom Device Loops. The VeriStand Engine only is responsible for initiating the Asynchronous Custom Device Loop execution and for transmitting the custom device input data values per iteration of the Primary Control Loop.

Waveform Processing Loop

The Waveform Processing Loop performs the following actions to transfer waveform data through the system:

  • Reads waveform data from DAQmx Waveform Producer Loops.
  • Sends waveform data to the VeriStand Gateway.
  • Reads waveform data from custom devices.
  • Sends waveform data to custom devices.

DAQmx Waveform Producer Loop(s)

DAQmx Waveform Producer Loops acquire waveforms from DAQ devices. Each waveform task in the system definition has a corresponding DAQmx Waveform Producer Loop that performs the following actions:

  • Reads waveform data from analog input channels on DAQ devices using the timing and triggering settings you define in the task.
  • Sends waveform data to the Waveform Processing Loop.
  • Logs acquired data to .tdms files, if you enable logging.

Data Processing Loop

Like the Primary Control Loop, the Data Processing Loop maintains a complete copy of the channel values table. The Data Processing Loop executes procedures, alarms, and calculated channels, as well as distributes among the loops of the engine the execution commands received by the Communication Receive Loop. Per iteration, the Data Processing Loop executes the following tasks:

  • Receives the table of channel values from the Primary Control Loop.
  • Executes procedures, alarms, and calculated channels.
  • Transmits updated table of channel values to the Primary Control Loop.
  • Sends data values to the Communication Send Loop

Communication Loops

The Communication Loops maintain TCP/IP communication with the VeriStand Gateway. There are two Communication Loops:

  • Communication Send Loop—Transmits channel values to the VeriStand Gateway.
  • Communication Receive Loop—Listens for execution commands sent by the VeriStand Gateway.


Reads and writes XNET data.

DIO Loop

Reads and writes low-speed digital DAQ I/O data.

Model Interface Loop

Updates model parameter values. Note that Model Execution Loops handle the high-speed, dynamic data associated with model inports and outports, while the Model Interface Loop reads and applies the lower-speed, asynchronous updates to model parameter values.


Not Helpful