NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

LV6.1, TS2.0.1, how do I wait for a frontend callback called from LV to complete? WaitForEndEx does not seem to wait.

I need to run a TS sequence just before exiting my operator interface (a modified version of the full featured OI). I use InvokeNode to call it in my "Exit" case, using the CallFrontEndCallbackEx method. I wire the Execution output from the method to invoke Execution.WaitForEndEx, with a timeout of -1 (no timeout), and I expect for it not to come back before the callback completes. But it does come back before completion, apparently, and since the next thing I do is request a shutdown, I get a message 'Cannot exit while a sequence is running' and the application hangs. If I force a delay or simply remove the code that calls the callback, I don't get
the same problem.
(In the attached code example, ignore the fact that we're getting the Execution.Id and not using it - we know that should be removed.)
So, if I'm using the wrong code to wait for completion, do you have an example of something that would wait for the callback to complete? If it's the right code, then what is going wrong?
0 Kudos
Message 1 of 2
(2,477 Views)
Hi gizmogal,

Please refer to the e-mail I just sent you.

Regards,

Sarah Miracle
National Instruments
0 Kudos
Message 2 of 2
(2,477 Views)