NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Calling the cleanup of a Sequence File from the Procesmodel

Hi to all,

 

today, I've started to implement enforced routing, a check if a test may be started (after entering the barcode, etc).

 

I though I should make one sequence in our general procesmodel (named) so I can simply implement this one sequence call in each sequencefile and the behaviour would be identical everywhere.

 

When the sequence of the procesmodel (name is: EnforcedRouting) is called from the sequence file, this sequence will run and check (by DLL) is the product can pas (returntype is number). The return (a number) is check by an "if then" statement.

 

I would like to see that when the if statement in the sequence EnforcedRouting of the procesmodel (so, the test CANT be run), Teststand will go to the cleanup function of the sequence file (so, not the procesmodel cleanup, but the one from the sequence file).

 

It would be nice if someone could comment on this method (perhaps a different approach to this 'problem'). I'm open for any solution, but it would be nice to have a 'goto' to the cleanup of the original sequence file. Thank you all in advance!

 

Kind regards,

 

M. te Molder

0 Kudos
Message 1 of 2
(2,863 Views)

Hi M. te Molder,

 

I think I understand that you only want to run the test if the proper information has been entered for the test. Is that correct?

 

It's not entirely clear where you would be calling this EnforcedRouting sequence from - is it being called for the 'test' sequence file's MainSequence Setup or Main step groups? If so, then you can set a custom post action to go to the 'test' sequence's MainSequence Cleanup step group.

 

Or are you calling it from the process model or one of its callbacks (PreUUTLoop, PreUUT)? If so, I don't think you can just jump to the 'test' sequence files MainSequence Cleanup step group.

 

If validating the input data is what you're trying to do, you could add a validation routine to the PreUUT sequence (where the S/N is asked for) in your modified process model (make sure you're using the copy in the user's directory structure), and if the data's not right, either let them try again, or cancel the test altogether. You'd need to add this capability to the Single Pass entry point if allowing the user you're using that one as well.

 

Then if there's steps you need to run once the test is completed, you could add this to the PostUUTLoop Callback.

 

Hope this helps.

 

-Jack

Message 2 of 2
(2,797 Views)