Executing Code Modules in Parallel

TestStand 2017 Help

Edition Date: November 2017

Part Number: 370052W-01

»View Product Info

Download Help (Windows Only)
NI TestStand 2014 Help
NI TestStand 2014 SP1 Help
TestStand 2016 Help
TestStand 2016 SP1 Help
TestStand 2017 Help

Purpose

This example demonstrates how to run code modules in parallel. This sequence uses two Sequence Call steps that each call a subsequence in a new execution. Each subsequence calls a LabWindows/CVI code module to display a panel, which is updated by a loop in the MainSequence asynchronous from the original execution.

Example File Location


Open Example

<TestStand Public>\Examples\Parallel Testing\Executing Code Modules In Parallel\Executing Code Modules In Parallel.seq

Highlighted Features

Major API

None

Prerequisites

None

How to Use This Example

Complete the following steps to use this example.

  1. On the Steps pane, select the Launch Display Panel 1 step, which is a Sequence Call step.
  2. On the Step Settings pane, click the Sequence Call Module tab. The Execution Options ring control specifies the Use New Execution option.
  3. Click the Sequence Call Advanced Settings button, located to the right of the Execution Options ring control, to launch the Sequence Call Advanced Settings window, in which the options change depending on the execution option you select.

    The Wait for Execution to Complete ring control specifies the Do not wait option. This sequence uses the Do not wait option and a set of Wait steps at the end of the MainSequence to collect results from each subsequence.
  4. On the Steps pane, select the Wait on Panel 1 for Results step, which is a Wait step.
  5. On the Step Settings pane, click the Wait Settings edit tab. The Specify by Sequence Call option specifies that the step waits for the Launch Display Panel 1 sequence call to finish executing. Similarly, the Wait on Panel 2 for Results step waits for the Launch Display Panel 2 sequence call to finish executing.
  6. On the Sequences pane, select the Display 1 sequence.
  7. On the Steps pane, select the Display Panel 1 step, which is an Action step that uses the LabWindows/CVI Adapter.
  8. On the Step Settings pane, click the LabWindows/CVI Module tab. This step calls a DLL that polls the Counter1 file global variable and displays the content. Similarly, the Display Panel 2 step in the Display 2 sequence polls the Counter2 file global variable and displays the content.
  9. On the Sequences pane, select the MainSequence and select Execute»Single Pass to run the sequence. TestStand begins three executions: one execution updates the Counter1 and Counter2 variables, and the other executions polls the values of the variables.
  10. Click Stop for both Display Panel 1 and Display Panel 2. Scroll to the bottom of the report, which displays results for the Display Panel 1 and Display Panel 2 steps under the Wait steps for each new execution. If the sequence did not use Wait steps, TestStand would not log results for the steps run in new executions.

WAS THIS ARTICLE HELPFUL?

Not Helpful