Example Code

TestStand Status Monitor using Synchronization Objects - LabVIEW

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.


  • Teststand

Code and Documents




This example demonstrates the following TestStand concepts:

  • Implementing a status monitor VI that executes in parallel with the sequence
  • Accessing TestStand queues and notifications directly from a LabVIEW VI


In many test applications, it can be useful to implement a status monitor application which runs in parallel to the test.  This application can be used to display information about the current test, or send data to the test sequence throughout synchronization objects.  This approach is best suited to monitoring applications that are specific to a single test.  If the functionality of the status monitor applies more generally to all tests, consider instead implementing the functionality in a TestStand User Interface, and using TestStand UI Messages to communicate data.


This example demonstrates how to access TestStand queue and notification objects directly from a LabVIEW VI.   This approach is more effective than directly accessing the sequenceContext from the monitoring application, because it prevents dependencies between the monitoring application and the sequence.  Since each creates a separate reference to the synchronization object, neither application is dependent on properties existing in the other application.  TestStand notifiers can be created, accessed, and controlled in LabVIEW using the Synchronization Server API.  


This example provides wrapper VIs for the this API that you can use in other applications.  




These VIs show how you can utilize the TestStand Synchronization Server API in LabVIEW to access a TestStand synchronization object.  The code of the Create.vi is shown below.  Once the Synchronization manager reference is obtained, you muse type cast it to the ISyncManager class using the Variant to Data node.




Once obtained, use invoke nodes with the reference to access or modify the data in the synchronization object.


The application uses the following synchronization objects:


  • A notification with string data to send commands to an executing sequence
  • A queue to store the responses from the executing sequence

The Status Monitor VI is launched from a new thread at the beginning of the sequence execution so that it executes in parallel with the sequence.

Hardware and Software Requirements

TestStand Status Monitor Using Synchronization (LabVIEW) - TS2019.zip

TestStand 2019 or Compatible

LabVIEW 2020 or Compatible


TestStand Status Monitor Using Synchronization (LabVIEW) - TS2012 - NI Verified.zip

TestStand 2016 or Compatible

LabVIEW 2016 or Compatible

Steps to Implement or Execute Code

  1. Open the "Synchronization Example.seq" sequence file, and execute it using Execute » Single Pass
  2. Observe that the monitor application is launched. The sequence waits to receive a notification from the monitor
  3. Select a command and click the "Send Notification" Button.  Observe that the sequence executes a case based on your selection, and the result is en-queued in the results queue
  4. Click the "Dequeue Results" button to view the result.


Al B.
Staff Software Engineer - TestStand

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.