NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Implementing interrupt-like funtionality in the process model

My application requires testing high-power semiconductor devices.  These devices are water-cooled to keep from exceeding operational temperatures.  I am considering developing my process model to handle the water-cooling which entails monitoring water flow, temperature, and pressure and, if any of these parameters leaves an acceptable range, throw an error the test sequence.

I know that TS can run a sequence in the process model after each step in the sequence file but I don't think that it will be acceptable if my step is longer than it takes for a fault condition to be generated.  For that reason, I am trying to understand if there is a means to terminate the test sequence if any fault in the process model occurs.

What is the best way to implement this kind of behavior?
0 Kudos
Message 1 of 5
(3,594 Views)
Hi kc64,

You are right, editing the process model to check the current state your system after each step would not be the best approach.

I would recommend running a separate sequence in a new thread within your execution.  This standalone thread would check the state of your system and throw the error you desire upon your system going out of desirable ranges. This will run concurrently during your entire test.

I hope this helps!



Message Edited by evanp on 11-09-2007 01:16 PM



Evan Prothro
RF Systems Engineer | NI

0 Kudos
Message 2 of 5
(3,556 Views)
evanp--

Thanks for your response.

Re. interrupt-like capability, will the new thread set a variable that must be checked by my main sequence (polled) or will it actually asynchronously stop (interrupt) the main sequence?

kc64
0 Kudos
Message 3 of 5
(3,525 Views)
As with just about anything in TestStand, there are multiple ways to accomplish this functionality.

I would recommend, if the undesired status is reached, that you execute an expression step that sets Step.Result.Error.Occurred = True, and Step.Result.Error.Msg = "<Your desired error message here>".

This should give you exactly what you need as efficiently as possible.




Evan Prothro
RF Systems Engineer | NI

0 Kudos
Message 4 of 5
(3,509 Views)
kc64,
 
Something else you might try is the Engine.TerminateAll method.  This will stop all running executions, while still allowing them to run their cleanup step groups.
Josh W.
Certified TestStand Architect
Formerly blue
0 Kudos
Message 5 of 5
(3,500 Views)