02-20-2007 06:58 AM
02-20-2007 08:19 AM
Hi,
You could pass the property Step.TS.PreCond as a parameter to the sub Sequence.
Regards
Ray Farmer
02-25-2011 11:34 AM
TestStand 4.1.1, LabVIEW 8.6.1, WinXP
I have two subsequence calls A and B with preconditions. The precondition for A is "!MyBoolean" and the precondition for B is "MyBoolean." If MyBoolean is false, then I should run the subsequence call A but not subsequence call B, right? That doesn't seem to be the case. A and B both run. Am I misunderstanding how preconditions work?
02-25-2011 12:28 PM
I don't understand what you are getting at. If the precondition for a sequence call returns false, none of the steps in the sequence are run anyway because the sequence is not called. Thus I don't understand the need for the functionality you are asking for. Please explain why such a feature would be needed.
Thanks,
-Doug
02-25-2011 12:30 PM - edited 02-25-2011 12:33 PM
@Neurotikart wrote:
TestStand 4.1.1, LabVIEW 8.6.1, WinXP
I have two subsequence calls A and B with preconditions. The precondition for A is "!MyBoolean" and the precondition for B is "MyBoolean." If MyBoolean is false, then I should run the subsequence call A but not subsequence call B, right? That doesn't seem to be the case. A and B both run. Am I misunderstanding how preconditions work?
This is not how things should be working. I suspect there is additional code in your sequence leading to this unintended behavior. If a sequence call's precondition is false, the sequence should not be getting called. Can you attach an example sequence to illustrate the unexpected behavior you are seeing (ideally, one which doesn't require any code modules).
I created a simple test sequence with a sequence call with the precondition set to false and it did not call the subsequence, it was instead skipped as expected.
-Doug
02-25-2011 01:03 PM
I think I found the problem.
The precondition is evaluating a boolean. If the precondition is
MyBoolean
or
!MyBoolean
...it doesn't work correctly. Apparently, the precondition must be expressed as
MyBoolean == True
or
MyBoolean == False
-Mark
02-25-2011 04:14 PM - edited 02-25-2011 04:18 PM
@Neurotikart wrote:
I think I found the problem.
The precondition is evaluating a boolean. If the precondition is
MyBoolean
or
!MyBoolean
...it doesn't work correctly. Apparently, the precondition must be expressed as
MyBoolean == True
or
MyBoolean == False
-Mark
What you are describing is not expected behavior and not what I'm seeing.
I made a simple sequence with two sequence calls and a local variable, Locals.Foo set to false.
If i make one of the sequence calls have the precondition:
Locals.Foo
and one have:
!Locals.Foo
TestStand correctly only runs the one with the precondition !Locals.Foo.
Therefore I still think the cause of your problem is something else. Probably the easiest way to get to the bottom of this is if you can post an example sequence illustrating the behavior you are seeing.
Hope this helps,
-Doug