NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

preventing 2 instances of process model

Solved!
Go to solution

Hi,

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?

 

Thanks

David Jenkinson

0 Kudos
Message 1 of 10
(4,508 Views)

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,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 2 of 10
(4,499 Views)

Hi,

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 5.0.1.226 (2013).  Any way you can save-as?

 

Thanks

David J

 

0 Kudos
Message 3 of 10
(4,482 Views)
Solution
Accepted by topic author david_jenkinson

Try this one.

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
Message 4 of 10
(4,478 Views)

Hi

 

 

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 ?

0 Kudos
Message 5 of 10
(4,410 Views)

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

0 Kudos
Message 6 of 10
(4,403 Views)

Nikolaj,

 

On the get Num Executions step you  can just change the property to NumIncomplete.  Here is an example.

 

David,

Glad it is working for you.

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 7 of 10
(4,400 Views)

 

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 ?

0 Kudos
Message 8 of 10
(4,382 Views)

I have implemented this solution into the processmodel. It works

Looks like it was also suggested above. i just didn't get it !

 

https://decibel.ni.com/content/docs/DOC-25952

0 Kudos
Message 10 of 10
(3,971 Views)