NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Numeric Limit using a low and high range except for one specific value

Is there a way to have a Numeric Limit Test having a range from, say, 10 to 100, except for 77? That is, if the result being validated is 77, it should fail that limit.

 

E.g. if (result != 77 && result >= 10 && result <= 100)

 

The workaround was to use a Pass/Fail with the above as an expression. The problem with Pass/Fail is that the limits are not published in a report, just a Pass or Fail. We have a need for limits and the result itself to be included.

 

E.g. CodeId284, Low Limit = 10, High Limit = 100, Result = 77, Failed

CodeId284, Low Limit = 10, High Limit = 100, Result = 78, Passed

 

77 for this post is an arbitrary number, but we have a very highly specific hex value that is always a fail and we know what it means. Something like 0xFA17ED. That is always a fail, but all other hex values between, say, 0x00000A and 0xFFFFFF are passing hex values. Is it possible to do it with a Numeric Limit Test?

0 Kudos
Message 1 of 3
(77 Views)

If you need some weird / special numeric evaluations, you can always go and create your own StepType based on a NUmericLimitTest StepType.BUt this also implies, you can get the limits also in the report.... so this may be a rabbit hole.

 


@ChevyVolt1 wrote:

 

 

77 for this post is an arbitrary number, but we have a very highly specific hex value that is always a fail and we know what it means. Something like 0xFA17ED. That is always a fail, but all other hex values between, say, 0x00000A and 0xFFFFFF are passing hex values. Is it possible to do it with a Numeric Limit Test?


Is there a reason for not using Comparison Type NE (Not Equal)?

0 Kudos
Message 2 of 3
(63 Views)

For a Numeric Limit Test, there is not a way to do that.

 

What I usually do in that situation is a Mutli Numeric Limit Test, with two tests using the same result. Using your same values you could do:

Test 1: Result NE 77

Test 2: Result >= 10 && Result <= 100

 

Then if both Pass, the step will pass. If either one of them fail the step fails.

Message 3 of 3
(34 Views)