03-11-2022 04:07 AM
Hello
I have a sequence file in Teststand 2019 using the batch process model running a burnin test system.
When i start the sequence file, first the ventilation is check in the sub sequence "Start Burin" (see picture in the attachment).
This Start Burin sequence run "One thread only". When the ventilation runs fine every thing is good, but when this sequence detects an error in the ventilation it make a fileglobal true (like FileGlobals.IsBurninFailing == True).
When this happens the burnin has to stop immediately. This is done in the next step "Instantly stop" by executing RunState.Engine.TerminateAll().
When i simulate a ventilation error, 6 out of 10 times everything works fine and all 7 threads are terminated, but 4 out of 10 times it doesn't work. I get a message saying "You have incompleet executions. Do you want to continue shutdown". I have to kill all threads eventually to stop the burnin.
Is RunState.Engine.TerminateAll() the best way to kill all threads immediatly ?
If not what is the best solution in stead of RunState.Engine.TerminateAll() ?
Solved! Go to Solution.
03-13-2022 09:47 AM
TerminateAll()
is IMHO a good idea in such a situation.
03-14-2022 04:41 AM
Hello Michal
I hope i found the problem that i have stopping all threads in case of te ventialtion error.
I used a Statement step which called RunState.Engine.TerminateAll(). This approche gave me the 4 out of 10 errors that i mentioned in my previous mail.
Now i have replaced the step type with a Action step type and a Active X/COM adapter (see picture ).
In this steptype i call TerminateAll(). I tested this approche 20 time with no failures.
So probably there is a difference between calling RunState.Engine.TerminateAll() in a Statement step and in a Action step with a ActiveX/COM adapter.
03-14-2022 04:59 AM - edited 03-14-2022 05:00 AM
There should be no difference between Statement and ActiveX action. If there is, it should be reported to NI as a bug.
I recommend performing more trials since normally there is no difference between those two approaches.
03-14-2022 06:41 AM
Hello Michal
Next Thursday i will perform more test to be sure that the action step with ActiveX/COM is the solution.
Thanks for you help