LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

CloseAllCompletedExecutions() doesn't work in my function?

I am trying to add a button on LabWindows-CVI. After I log on the LabWindows-CVI, the title of the first interface is "Sequence Display". I want to add a button F1 in this window. After you click F1 button, I don't want to load any sequence in the interface but the sequence can be executed. I don't need to see any result of the sequence. After the sequence is executed, the background should be still the "Sequence Display" window not the "Execution Display" window.

The function I coded is in the following but I can not get what I want.

CVICALLBACK SD_Function1 (int panel, int control, int event, void *callbackData, int eventData1, int eventData2)
{
switch (event)
{
case EVENT_COMMIT:


Eng_ExecuteSequence("MainSequence", "C:\\Exercises\\TestStand I\\Ex 1-1 Computer Test.seq");
CloseAllCompletedExecutions();

break;
}
return 0;
}

The function Eng_ExecuteSequence() can work. The sequence can be executed and the result can be reported on the "Execution Display" window. But CloseAllCompletedExecutions() does not work. Because if CloseAllCompletedExecutions() can work, the "Execution Display" window should be closed. I want to close the "Execution Display" window. I hope F1 button can have two functions (execute and close). I appreciate any help.
0 Kudos
Message 1 of 2
(2,808 Views)
Hello ning -

I believe we may have spoken about this topic via email. Be aware that functions like Eng_ExecuteSequence() are used only by the TestStand environment and so the TestStand Discussion Forum catagories may get faster responses to questions like this. In short, the CloseAllCompletedExecutions() function isn't really suited for your particular application (open, run, and close a particular file). This function is meant more for situations where the user has no sequences running and wants Ctrl-D style behavior to clean up all idle execution windows.

I strongly recommend you look into wherever in your code you are calling TS_EngineNewExecution and investigate the parameters available to you. There is a numeric field for 'Execution Type Mask' that
I believe in particular will be helpful. If you provide the hex value 0x10 for example, you will inform the new execution created to close itself when complete.

Please refer to the TestStand API (Programmers Help) for more information about NewExecution and it's options.

--Regards

Elaine R.
National Instruments
http://www.ni.com/support
0 Kudos
Message 2 of 2
(2,808 Views)