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) - TS2012 - NI Verified.zip
TestStand 2012 or Compatible
LabVIEW 2012 or Compatible
Steps to Implement or Execute Code
Open the "Synchronization Example.seq" sequence file, and execute it using Execute » Single Pass
Observe that the monitor application is launched. The sequence waits to receive a notification from the monitor
Select a command and click the "Send Notification" Button. Observe that the sequene executes a case based on your selection, and the result is enqueued in the results queue
Click the "Dequeue Results" button to view the result.