NI TestStand

Showing results for 
Search instead for 
Did you mean: 

Can I consume TestStand notification in LabVIEW module?

Go to solution



Can I consume a notification send from main TestStand thread within a VI which is fired up in the second TestStand thread?


The idea for the solution is that the main thread will have one loop in which one step will be continuously generating test data for report. The role of the VI running in the separate thread will be to sit and display the current data to the user as soon as it gets notified by the main thread.


So, can I consume TS notification in the LV modules?

0 Kudos
Message 1 of 7
  1. You can use SequenceContext, and take Engine or Thread references, pass it to the VI in the second thread, and retreive data from it.
  2. As for me, the easier way: send data to VI in the second thread by named queue, via additional code module. Code module from the first thread will take report data, and via named queue send it to the second VI in parallel thread.

You can try one of this variants and see, whether it works for you fine.


Sincerely, kosist90



0 Kudos
Message 2 of 7

It is possible. See the API help for Engine.GetSyncManager. The TestStand synchronization step types have an API to them that you can call from LabVIEW. Also the source code for the step types which uses this API ships with TestStand in the directory <TestStand>\Components\StepTypes\SyncSteps.


Another approach that might be a bit simpler is to use a LabVIEW notification or queue on both ends and thus LabVIEW VIs on both ends.


Hope this helps,


0 Kudos
Message 3 of 7

When I read the value returned by GetSyncManager it looks like a reference. What shall I do with it?






0 Kudos
Message 4 of 7
Accepted by MimiKLM

The LV functions for notifications do not work with the TS Notifications. You have to use the TS API similar to this:


CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 5 of 7

Hi Norbert,


I've changed my VI and now it looks like as below. However, I can't see the way I can get the notifier value.



0 Kudos
Message 6 of 7



you mistake the synchronization objects for an information technology between different software components outside of TS.

The TS synchronization objects are solely for TS internal synchronization stuff. In the first place at least.

But as the API is public, you can implement code to use them in most programming languages (like LV, C#, ...). But you still have to think like TS does.

When you use a notification internally in TS to pass data around, you configure your WAIT (on notification) step as such that the data is automatically parsed into a TS variable. And this is exactly what the Wait method exposes as parameters:

  • destinationPropObj: This is the TS variable the data is parsed into
  • timeoutInSeconds: Nothing to be said here i think
  • sequenceContextObj: The SequenceContext reference which holds the TS variable you refer to with the destinationPropObj
  • processMsgs: Enable/Disable Windows Message processing while waiting
  • waitRes: Result of wait step


What you essentially have to do:

  1. Create a variable (aka Property Object) in your SequenceContext and pass it as destination
  2. Pass the correct SequenceContext appropriately
  3. After Wait finishes read the variable using the GetVal PropObj methods to transfer the value to LV
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 7 of 7