NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

OR statement for Limits

Hello.

 

I am using Teststand 2014 and a Multiple Numeric Limit Module to compare results. However I am trying to figure out a way to compare a single value to two different limits. Basically:

 

If(StepReturn.Fruit == Limit.FruitBasket.Apple) OR (Fruit == Limit.Fruitbasket.Orange)

  PASS

Else

Fail

 

So far I have found no way to do this without doing a Post Action Conditional Pass statement.

 

Help would be appreciated.

0 Kudos
Message 1 of 3
(2,246 Views)

Set the Comparison type to == then set your Low Limit to something like this:

 

Step.NumericArray[0] == Limit.FruitBasket.Apple ? Limit.FruitBasket.Apple : Limit.FruitBasket.Orange

 

Other option is to create a custom step type.

 

Hope this helps,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
Message 2 of 3
(2,225 Views)

An alternative might be to set the comparison to == 1:

multi1.PNG

 

And set the datasource to the following:

 

 

Contains({Locals.Apple, Locals.Orange}, Locals.Fruit) == True ? 1 : 0

 

 

multi2.PNG

 

Regards,

Charlie Rodway | Principal Software Engineer | Certified TestStand Architect (CTA)

Computer Controlled Solutions Ltd | NI Silver Alliance Partner | GDevCon#1 Sponsor

Message 3 of 3
(2,215 Views)