Synchronization Step Types - Notification and Wait

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 use the Notification and Wait synchronization steps in a sequence file to specify that one test socket waits to receive a notification from another step before continuing the execution. A Notification step can send messages between multiple test sockets and can optionally contain data.

Example File Location


Open Example

<TestStand Public>\Examples\Built-In Step Types\Synchronization Step Types\Synchronization Step Types - Notification & Wait.seq

Highlighted Features

Major API

None

Prerequisites

None

How to Use This Example

Complete the following steps to review the sequence functionality.

  1. On the Sequences pane, select the MainSequence.
  2. Complete the following steps to review the steps in the MainSequence.
    1. Select the Notification step. On the Notification Settings edit tab, notice that the Create operation is selected. This step creates a new notification and names it "Event 1".
    2. Select the Wait for Notification step. On the Notification Settings edit tab, notice that the Wait operation is selected. This step waits until TestStand calls the Set operation on the "Stimulus Started" notification from the "Start Stimulus" execution.

      On the Preconditions panel of the Properties tab of the Step Settings pane, the Precondition Expression control contains an expression that ensures that only Test Socket 1 waits for the notification. The other test socket skips this step.
    3. Open the Start Stimulus sequence. Select the Initialize Stimulus step. The Wait Settings edit tab specifies that the Wait step introduces a 2-second delay in the sequence to simulate starting the stimulus.
    4. Select the Set "Stimulus Starting" Notification step. On the Notification Settings edit tab, notice that the Set operation is selected. This step sends the notification. If another thread is waiting for the notification, that thread may now continue execution.

Complete the following steps to run this example.

  1. Select Execute»Single Pass to run the sequence.
  2. Notice that the main execution waits for the initialization to complete before entering the Main step group.
  3. 2.3. Notice that the Wait for "Stimulus Started" Notification step does not complete until the “Start Stimulus” sequence sets the notification indicating that the stimulus has started.

WAS THIS ARTICLE HELPFUL?

Not Helpful