02-17-2016 05:32 PM
We have several testers in operation. There is a particular test that we run, that has some idle time involved on the UUT, and it appears there is no test running. Then a person may come up and try to execute another instance of a sequence, thus re-executing the process model, trying to initialize hardware that's already in use and causing a cascade of errors, also screwing up the test that was currently under execution.
Is there a property I can check right off the bat in the process model, in which I can program in a prompt to warn the person "there is already another test in progress here, abort?", and cleanly terminate? Or better yet, is there an option somewhere in teststand like "prevent concurrent execution of process model" or such?
Solved! Go to Solution.
02-17-2016 11:59 PM
It kind of depends on how you want to do it. Do you want to prevent it in the UI? Or would it be something in your sequence file?
Here are 3 options:
1- Whenever they start an execution in the UI Message Callback you can disable the execute buttons on the UI so they cannot push them.
2- Use the ApplicationMgr.Executions.Count or NumRunning properties and when they click execut pop up a dialog warning them and then stop the execution from running.
3- This would be done in the sequence file. Most likely in the ProcessSetup callback. I've attached a simple example. You could modify it to see if the executions are aborted or still running, etc... through the API.
Hope this helps,
02-18-2016 12:42 PM
Not using the UI, so it would be something from the sequence file, namely very early in the process model ProcessSetup, because there is some station hardware initialization stuff there that I dont' want to execute again if there's already a sequence launched/running.
I couldn't open your example, I'm running teststand 22.214.171.124 (2013). Any way you can save-as?
02-18-2016 01:29 PM
Try this one.
02-25-2016 10:07 AM
I tried the attached example.
It's working perfectly as instended when i use it directly in the development environment.
However if i use the "simple operator interface" provided with Teststand, the executions are not "closed" untill i press "Close Executions".
That means even if the sequence is done, the execution is keept alive, hence i can't start a new one.
How i can (per sequence) make sure that the execution is completely closed imidiately after the "PASSED - FAILED - TERMINATED" sign ?
02-25-2016 12:27 PM
Forgot to post back, thanks for this. Works perfectly, I've got it as the first thing that happens in ProcessSetup/setup. Thanks for the prompt response
02-25-2016 12:31 PM
On the get Num Executions step you can just change the property to NumIncomplete. Here is an example.
Glad it is working for you.
02-26-2016 02:21 AM - edited 02-26-2016 02:27 AM
i'm not sure it's the solution to my problem.
the part about not starting a new execution when there is already one running is working fine.
My problem is that the "simple operator interface" keeps previous executions alive, untill i press "close execution" in the UI.
Is there a way to make sure that each execution closes it self after the reporting is done ?
that way i would be able to start a new execution without having to press the "close execution" button.
Alternatively: can i remove the
"this.axExecutionsComboBox" from the "simple operator interface", to remove the "memory of already finished executions ?
02-26-2016 02:55 AM
Or is this the way to go ?
05-13-2016 09:12 AM - edited 05-13-2016 09:16 AM
I have implemented this solution into the processmodel. It works
Looks like it was also suggested above. i just didn't get it !