NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to close a pop up opened running in new thread in Teststand without manual intervention?

Solved!
Go to solution

Hi,

 

I am doing keycycle in infinite while loop. There are two ways of coming out of the loop

1. Click the 'OK' button on the pop up which says "Terminate the test". The pop up is running in a new thread.

2. Increase the value of parameter 'Reset_Count'.

 

If I choose the first way the sequence executes completely but If I choose the second way then execution gets stuck in cleanup and waits for me to click on 'OK' button on popup.

 

So my question is, Is there any way by which I can close the popup without manual intervention?   

 

I have attached the seq, in case you want to see what exactly is happening.

 

Thanks,

0 Kudos
Message 1 of 5
(4,848 Views)
Solution
Accepted by topic author Hruti

Hi.

 

Yes, replace the TestStand popup with a custom LabVIEW dialog.  Here is my first thoughts on a simple method.....

 

a.) Replace the TS popup with a LabVIEW dialog.  The LabVIEW dialog contains an OK button and a loop that is waiting on a LV Notifier.  Simply wait on the LV Notifier ( with a timeout of 100ms) along with the OK.button.

 

Then when you get your external reset to terminate the test, create another VI to SET the Notifier ( with the data as a boolean ) to stop the dialog.

 

Let me know if that may work.  I could put something togther as an example if needed.

 

Thanks,
PH

 

 

 

 

Message 2 of 5
(4,839 Views)

You call close the message popup programmatically by launching the subsequence containing it in a new execution, rather than a new thread.  You can then call the execution.terminate() method from the main sequence to close the message popup.  You can get a reference to the new execution through the Sequence call advanced settings dialog for the sequence call step.  This example shows a possible implementation:

 

https://decibel.ni.com/content/docs/DOC-3801

 

Note that the example uses a model entry point to launch the dialog.  You can alternatively select to not use a model in the Process Model Option in the sequence call advanced settings dialog.

Al B.
Staff Software Engineer - TestStand
CTA/CLD
Message 3 of 5
(4,835 Views)

Thanks for the suggestion it works....

0 Kudos
Message 4 of 5
(4,820 Views)

I realize this is an old thread, but is one of the first hits coming up on a Google search for such a topic.

 

Good suggestions, both the 'new thread' approach and the 'new execution' approach. One 'gotcha' for a TestStand newbie like me on the latter...

 

The 'new execution' approach will trigger an 'End Execution' event. So, one has to handle this accordingly in the Operator Interface if monitoring for it.

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