11-09-2005 03:51 AM
11-09-2005 01:26 PM
11-10-2005 02:28 AM
11-10-2005 04:51 AM
11-10-2005 07:51 AM
Hi Ray,
the ApplicationMgr event PreCommand.... is not the problem.
What I need now is a possibility to abort that command that has fired this event!
Regards, Steffen
11-10-2005 09:01 AM
10-08-2007 12:49 PM
10-08-2007 05:58 PM
10-09-2007 02:07 AM
Hi Ryan,
you might use something similar to the CVI Callback ExecutionViewMgr_OnRunStateChanged to check whether the execution starts or has finished.
I solved the whole problem with the following workaround: I don't use a TS activeX entry point button any more but a normal CVI button with its callback. In this callback (when the button is hit) I first of all dim the button and then use the following functions to get the execution started:
- TSUI_SequenceFileViewMgrGetCommand (gMainWindow.sequenceFileViewMgr, &errorInfo, TSUIConst_CommandKind_ExecutionEntryPoints_Set, 0, &runTestUUTCommand);
- TSUI_CommandExecute (runTestUUTCommand, &errorInfo, VFALSE);
To reactivate the button I use the ExecutionViewMgr_OnRunStateChanged callback.
Maybe this is also an idea for you.
Regards, Steffen
10-10-2007 12:38 PM
Steffen,
Thank you so much for the help. You recommendations worked perfectly. Both of us implemented more or less the same behavior in our operator interfaces, although we used slightly different methods. Here is what I did:
I established a count variable in my operator interface that is initially set to 0. Each time the Test UUTs or Single Pass button is pressed, I increment the count by 1. I determine that the Test UUTs or Single Pass button is pressed by registering for and handling the Application Manager PreCommandExecute event. In my callback for this event, I examine the returned Command and look at its EntryPointIndex property to see if the index is 0 (Test UUTs) or 1 (Single Pass). If it is, I increment the count variable count by 1. If the index is not 0 or 1, I do nothing. Once execution has stopped, I reset the count variable back to 0. I do this by registering for and handling the ExecutionView Manager RunStateChanged event (as you recommended). In my callback for this event, I examine the returned newRunState to see if it stopped (numerical value of 3). If it is, I set the value of the count variable back to 0. If it isn't stopped, I do nothing.
This method is basically the same as the one you propose. This method allows you to use the built in TestStand buttons instead of having to use those found in your development environment. The only drawback is that they don't disable and gray out during execution; they just do nothing when an execution is in progress and the operator presses them.