NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Terminated Status and execute once a sequence

Solved!
Go to solution

hey guys,

In my sequence, I launch a Labiew VI with a button continue but also a button 'cancel'. I want this button when press to stop the execution and go directly to cleanup with the status 'Terminated'.

 

my VI, when the cancel button is pushed send into the Status the String "Terminated", but after I don't know how to interface it with Teststand and the property of the step.

 

can someone help me on the subject ?

 

second subject : I got a loop and inside I want some sub sequence to be executed only once, is there any property that can allow me to control that ?

 

 

thanks in advance !

Kudos!
0 Kudos
Message 1 of 4
(3,588 Views)
Solution
Accepted by pfhenry21

Hi pfhenry,

 

I'm not quite sure what you meant by your first point, but I've linked a KB which tells you how you are able to implement a functionality similar to that which you described.

 

With regards to your second point, to pass data from LabVIEW to TestStand you can create a variable, and then under the Module tab of the step which calls the VI you can load the value from the VI into the variable you created. I have attached a screenshot showing an implementation of this.

 

Just for clarification on your looping query, is it that you have a TestStand Sub-Sequence that you wish to call once, and then ignore the Sub-Sequence for every iteration of the loop after the first call?

 

Regards,

 

Steve

0 Kudos
Message 2 of 4
(3,571 Views)

I think StevenH has got the right idea. just two things to add

 

if you want just one step to terminate... rather than going through the potentially system-wide customization of setting up the callback, make your dialog return a boolean(T/F) wire for "not canceled" and apply the step property "PostAction" to your logic.  If you use a Passfail steptype to invoke your dialog, it could be as simple as "On Fail, go to terminate"  (just select it from the menu for the logical state that makes sense) .  If you don't want to use a 'test' for your dialog, you can just create a local variable and set the post action to "custom expression" and set the same 'terminate' flag on the condition you want to be your exit.

 

For your second question, it sounds like you're looping in TS on a series of steps, but for some of the steps you only want to run on loop-iteration 0?

Your loop is going to have a counter variable somewhere (ie. Locals.count)  so you can either add a precondition to each step you want to skip, or if you have a lot of them, use the If/End steps to define the block.  Your expression would just be "Locals.count == 0"  or whatever index you want the steps to execute with... If I've missunderstood, please feel free to provide more info?

Cheers,
Elaine R.
www.bloomy.com
0 Kudos
Message 3 of 4
(3,563 Views)

thanks a lot guys,

well that's it a loop and inside many sub sequence and some that I only want to execute once.  I though there's a special flag who can tell me that rather than put a variable and a condition. For the Terminated I will try your solution: what I wanted to do is the minimum of action on my sequence but being able to quit properly my sequence with the "Terminated' Status in the PostUUT when I click on the cancel button from my VI...

0 Kudos
Message 4 of 4
(3,549 Views)