NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

What is the best method to have multiple string limits in a single test

Hello All,

 

I need a little advice I have two strings that need to be evaluated as a pass criteria for a single test test step (Numeric String limit test). What would be the best approach to this?

 

The strings are "00000000 00000010" and  "00000000 00000000"

0 Kudos
Message 1 of 3
(3,994 Views)
If you want to use the multiple numeric test, you will obviously have to convert to numbers unless you create a Multiple String Limit Test. If you are using a code module, convert to a numeric in the code If you want to use TestStand to convert the strings, use Val("0b" + Locals.StringVar) and remove all spaces in the string.
0 Kudos
Message 2 of 3
(3,988 Views)

A couple of ideas:

 

1) Concatenate the strings. Both when storing them in the data source and in your limits for the values you expect.

 

2) Use arrays for both the data source and limit and loop on the step requiring all iterations to pass and using the loop index variable in your expressions for your string limit test. For example, for the limit expression you would have:

 

Locals.expectedValues[RunState.LoopIndex]

 

and for the data source expression you would have:

 

Locals.stringMeasurements[RunState.LoopIndex]

 

Then you would set the loop options on the step to loop the required number of times. You can even use the expression function GetNumElements(Locals.expectedValue) in your loop while expression to set the number of iterations dynamically.

 

Hope this helps,

-Doug

0 Kudos
Message 3 of 3
(3,967 Views)