NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Handling an E-STOP in Teststand

Solved!
Go to solution

We are using LabVIEW with TestStand and need to continually read an E-Stop input when running the main test sequence. The E-Stop removes power from the UUT but the second set of contacts we would like to use to force the sequence to go to the Cleanup state. What would be the best method to use in this situation.

Thanks

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

First, let's assume that you have the means to know that the E-stop has been pressed (perhaps by a digital input or maybe you read the current to the DUT).  In your sequence, you could use a SequenceFilePostStep callback and check the E-stop.  If the e-stop has been pressed, you use the Execution.Terminate method.  

 

And of course, there are a number of other ways to implement an e-stop; this is just one way.

 

Pulido Technologies LLC

0 Kudos
Message 2 of 10
(4,393 Views)
Solution
Accepted by topic author sdrochek3

Here's a little example I threw together.  Let me know if it works for you and if you have any questions.

 

Cheers,

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

Jigg, Thanks this works great on our test!

0 Kudos
Message 4 of 10
(4,292 Views)

Hi! Jigg,
I am using your example to implement ESTOP using parallel model, thank you!!

 

I have 6 sockets. How do I launch the ESTOP thread only once and not for each socket?

Any socket can be run first or operator may choose to run less than 6 sockets as well so I can't use precondition on ESTOP subsequence to check if RunState.TestSockets.MyIndex==1 (or any socket index).

0 Kudos
Message 5 of 10
(1,027 Views)

If you are using the parallel model then do it in the PreUUTLoop

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

Thank you, that make sense to place in PreUUTLoop so its called only once for all socket.

 

How will the Estop variables be set such that when digital signal for estop is received, main sequence can get notified and close cleanly?

I did remove the while loop with the condition !RunState.Caller.Locals.KillEStopMonitor

and its now reading the digital signal continuously.

0 Kudos
Message 7 of 10
(1,010 Views)

Move the local variables to fileglobal variables.  In general I hate fileglobals but in this case it makes sense because you cannot control the prototype of the PreUUTLoop.  

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

Hi! Jigg,

Thank you for the quick reply.

I moved the Estop to PreUUTLoop but on doing it keeps looping in PreUUTLoop and never starts the main sequence?

In my case default for Estop is true but on changing that the message box step into infinite loop. Have left it to original for now (estop default false).

Attached is the updated sequence. Please advice.

0 Kudos
Message 9 of 10
(963 Views)

I cleaned it up a bit and made it much simpler.  I didn't realize PreUUTLoop happens for each socket in the parallel model.  I moved stuff to process setup and cleanup. 

 

Let me know what you think,

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