NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Safely end a teststand thread

Solved!
Go to solution

Hi,

I have created a vi using the sound and vibration assisstant. It simpply plays a 1KHz tone. I start this using a new thread execution in TestStand (generate audio thread)

I then proceed to route the audio of my UUT to Speaker R - the operator must then select pass/fail if the hear sound out from the speaker.

Next I continue to route the sound to Speaker L and provide another pass/fail dialog popup.

I am wondering how can I kill the "generate audio thread" without including a timeout routine in my vi?

Not sure if this is possible or safe??

Thanks & regards,

Shane.

0 Kudos
Message 1 of 5
(3,812 Views)

Hey Don1,

I want to make your question a little bit clearer by asking if it is possible for you to post an example of how you are spawning the seperate thread, and why this thread is continually executing. There are quite a few ways to spawn a new thread for a vi to run in ( run VI async, sequenceCall, etc) and I just want to be sure we are on the same page. I am sure you are aware that the thread will continue to run as long as the VI continues to execute, so that is where we need to look at options of making the VI stop.

Thanks again and I look forward to hearing from you soon!

Nick

National Instruments
Applications Engineer
0 Kudos
Message 2 of 5
(3,790 Views)

Hi Nick,

Thanks for the reply.

Please find attached a cut down version of my test sequence and how I am spawning a new thread (I call a new sequence that calls a VI to turn on the audio card). I understand the thread will run as long as the VI is executing. I want to play a tone using my audio card for as long as it takes the operator hit a pass/fail button. I am not sure how to do this to be honest know I can make the VI stop by adding a timeout, but this is not an ideal solution for me. I am worried and operator might walk off and come back with no audio on!!

Thanks for your help in advance.

regards,

Shane.

 

 

0 Kudos
Message 3 of 5
(3,768 Views)
Solution
Accepted by ShaneDonn

Hey Don1,

It seems that this might be an easy fix if I understand your problem correctly. The idea is to have the operator hit go, and then a tone is played out of the right side, they confirm/deny hearing it and then it moves to the left side and confirm/deny. The easiest way to take care of this would be to just use a step for each audio side, or one total if you like, but the idea is to have LabVIEW hold the user popup until the operator interacts with it. This could be accomplished with seperate vi's by have a popup dialog in a while loop when the right audio is running, once the user confirms the audio, it stops the loop and passes the result back to TestStand. They can then move on to left audio in the same way. If you prefer this in one step you could use consecutive while loops to hold the user dialog until operator interaction, and then move to the next audio side and then pass the results back as needed.

Thanks again,

Nick

National Instruments
Applications Engineer
0 Kudos
Message 4 of 5
(3,731 Views)

Hi,

Thanks for the tip - this does exactly what I am looking for.

Regards,

Shane.

0 Kudos
Message 5 of 5
(3,703 Views)