NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

precondition for sequence and tests within

I noticed that if a precondition is applied to a sequence (step), that precondition is not appllied to the steps within.  I guess you don't always want this behavior, but is there an option anywhere, that if checked, sets the precondition of the sequence to all the steps within it?
0 Kudos
Message 1 of 7
(4,276 Views)

Hi,

You could pass the property Step.TS.PreCond as a parameter to the sub Sequence.

Regards

Ray Farmer

Regards
Ray Farmer
Message 2 of 7
(4,271 Views)

 

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?

0 Kudos
Message 3 of 7
(3,941 Views)

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

0 Kudos
Message 4 of 7
(3,936 Views)

 


@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

0 Kudos
Message 5 of 7
(3,935 Views)

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

 

0 Kudos
Message 6 of 7
(3,927 Views)

 


@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

0 Kudos
Message 7 of 7
(3,912 Views)