NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Note for one-sided numeric comparisions (LE,LT)

Just thought I would point out something about single-sided comparisons that was not intuitive to me (but clearly documented in the TS manual, page 10-8). When using the LE (<=) and LT (<) comparison types, the comparison is to the LOWER limit, not the upper limit as I guessed. If you are using the sequence editor to enter your limits, the dialog will only show the lower limit. But if you are loading limits with Property Loader, you may load the wrong limit and wonder why the step is failing.
0 Kudos
Message 1 of 4
(3,829 Views)
Hi,

A useful solution to generating the limit file or database is to use the Import/Export tool and export your initial settings for each of your test sequences. This does ensure the limit values are in the correct positon for the comp type being used.

Regards
Ray Farmer
Regards
Ray Farmer
0 Kudos
Message 2 of 4
(3,829 Views)
The use of the LOWER limit (Step.Limits.Low) for “less than” (LT,LE or <, <=) comparisons also has implications for data logging and report generation. For a specification like "noise less than 1 mV", I would want the report to show no lower limit and an upper limit of 1 mV. Since TestStand uses Step.Limits.Low for the comparison, it is necessary to add some expressions to the database logging “Columns/Parameters” configuration in order log this limit as an upper limit in the case of LT,LE comparisons. Here are the expressions I added.

lower limit:
Expected Properties: Logging.StepResult.Limits.Low
Precondition: (Logging.StepResult.Comp != "LE") && (Logging.StepResult.Comp != "LT")
Expression: Logging.StepResult.Limits.Low

upper l
imit:
Expected Properties: Logging.StepResult.Limits
Precondition: (Logging.StepResult.Comp != "GE") && (Logging.StepResult.Comp != "GT")
Expression: ((Logging.StepResult.Comp == "LE") || (Logging.StepResult.Comp == "LT")) ? Logging.StepResult.Limits.Low : Logging.StepResult.Limits.High

For the lower limit, I added a precondition so that no lower limit would be logged in the case of a “less than” comparison. If you are using a stored procedure call here, the precondition will set the parameter to a SQL NULL if there is not a lower limit.

For the upper limit, I added a similar precondition so that no upper limit would be logged in the case of “greater than” comparisons. The key change is the expression, which logs the lower limit as the upper limit in the case of “less than” comparisons. Again, this is because of the backwards way that TestStand uses the lower limit for “less than” comparisons. Another note is that I omitted t
he “.High” in the expected properties. This is because in the case of “less than” comparisons, the “Limits.High” property does not even exist in the Results container.
0 Kudos
Message 3 of 4
(3,829 Views)

Hi,

I could not understand completely. Could you explain it more clearly, what i have to add in post-expression? At the end i would like to see in the XML report that it logging as high limit not as LOW.

 

Thanks in advance.

Krishna.

Test engineer
0 Kudos
Message 4 of 4
(3,273 Views)