NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How best to halt an execution when the emergency stop is pressed or the door opens with TestStand?

Hi all,

I am creating a test set that needs to be halted when the emergency button is pressed or the door is opened (note: data about the door open status is read in via a door latch using a PXI-6514). The way that the sequence is going to be structured is that each test (approx. 11 tests) is going to be a step in a TestStand sequence. The steps that are going to run the tests are going to be of type Pass/Fail. These steps will call a DLL written in C# that will perform one entire test.

What I want to do is for some tests when the door opens, the step in the sequence is aborted and then when the door is closed the step is rerun. However, for a few tests the door needs to be opened for the operator to make changes and then once the operator closes it again then that test should continue testing.

As I am new to both TestStand and development of test equipment, I am unsure which method is better:

Method 1:
Let TestStand handle the door opening, thus TestStand would need to know which test to halt and which to abort. I don't know which callbacks are required to do this.

Method 2:
Let each DLL handle the software trigger that the PXI-6514 "throws" when the door opens. This would mean that for each test you can either halt it until the door close. Or for the necessary test you can abort the execution of that test by shutting in a safe manner and returning a bit to TestStand, which indicates that the test was aborted. Then is there a callback that will rerun the step or will I just use Goto statements.

Is there another method that would be more appropriate to use?

Thank you

Elnaz
0 Kudos
Message 1 of 2
(3,186 Views)
Hi Elnaz,

I have faced a very similar issue before. The best option is to have your code modules handle the signal. So when a test when someone open the doots, you code modules should be able to keep up that signal and be able to act on it. So essentially your code modules should have some sort of a signal handler that automatically executes code to halt the code module when it receives the external signal. You have to pass a parameter back into teststand informing that an external signal was received by the code modules. So you can use Post Actions for this. Every step in TestStand has Post Action in the Step Properties. So you can change the execution flow based on the parameter passed in.

For example, if your code module received the external signal then it will pass a flag. In your post Actions based on this flag you can either goto a differnt step or you can jump back to your current step, thus re-running itself.

I hope this helps

SijinK
National Instruments.
0 Kudos
Message 2 of 2
(3,164 Views)