Determining the Execution Order of Models

NI VeriStand 2018 Help

Edition Date: May 2018

Part Number: 372846M-01

»View Product Info
Download Help (Windows Only)

The Primary Control Loop (PCL) controls the timing of models. If the system contains multiple models, the order in which the PCL executes them depends on whether you define an execution order for the models. To define a model execution order, browse to the Execution Order configuration page in the System Explorer configuration tree.

Note  The execution order of multiple models is not affected by the PCL execution mode (Parallel or Low Latency) for the system. This topic describes how to control the order in which models execute in relation to each other.

Related Links

Understanding PCL Execution and Model Latency

Understanding the VeriStand Engine

Executing Models in Parallel

By default, models read data from the previous PCL iteration and execute in parallel. Consider a system where you map an outport from one model to an inport of a second model. The second, dependent model always receives data the first model generated during the previous iteration of the Model Execution Loop, not the data the first model generates during the current iteration.

The following illustration shows one iteration of the PCL, where two parallel models have no defined execution order. Even if an outport from Model 1 is mapped to an inport of Model 2, the data from Model 1 transfers to the PCL each iteration rather than to Model 2.

Executing Models in Series

Instead of executing models in parallel, you can define an execution order that determines when your models execute relative to each other. If you map one model to another, defining an execution order allows you to ensure that the second, dependent model receives data the first model generates during the same iteration.

The following illustration shows the order of execution of two models assigned to execute in series, where an outport from Model 1 is mapped to an inport of Model 2, and where Model 1 is configured to execute prior to Model 2.

WAS THIS ARTICLE HELPFUL?

Not Helpful