02-12-2009 01:34 PM
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 ! |
Solved! Go to Solution.
02-13-2009 06:50 AM
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
02-13-2009 09:46 AM
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?
02-13-2009 04:14 PM
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...