TestStand 2017 Help
»View Product Info
Download Help (Windows Only)
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
<TestStand Public>\Examples\Built-In Step Types\Synchronization Step Types\Synchronization Step Types - Notification & Wait.seq
How to Use This Example
Complete the following steps to review the sequence functionality.
- On the Sequences pane, select the MainSequence.
- Complete the following steps to review the steps in the MainSequence.
- 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".
- 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.
- 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.
- 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.
- Select Execute»Single Pass to run the sequence.
- Notice that the main execution waits for the initialization to complete before entering the Main step group.
- 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.