NI TestStand

Showing results for 
Search instead for 
Did you mean: 

Getting sequence main group steps via LabVIEW



I don't think there is a way to do multiple lines.  However, if you put a \n in the expression, it shows them all on one line.  Then, if you mouseover, it shows them on separate lines for the mouseover.


With regards to your error, I believe that's because you haven't created measurements yet.  You can try using the expression PropertyExists() so that it won't evaluate if the limit doesn't exist.  Just remember that you will have to be careful when continuing to develop your sequence for all of the limits.

Jesse S.
Applications Engineer
National Instruments
0 Kudos
Message 11 of 13

To expand on Jesse's answer, it is possible, but only when you mouseover the low limit column. However, the advantage to doing it this way is that it keeps the main sequence view from becoming cluttered. You can simply hover over a step to see the limits.


I initially thought it would be challenging to make the value expression dynamic so that it could handle any number of measurements, but it turns out it is possible to write recursive TestStand expressions (albeit in a slightly roundabout way). I worked from this example, which you may have seen since your screenshot looks similar. 


Basically, I created two File Globals as follows:


FileGlobals.LimitExpression: A string which defines the recursive expression. It is: 

(GetNumElements(Step.Result.Measurement) == 0) ? 0 :
((FileGlobals.LimitRecursiveVariable == GetNumElements(Step.Result.Measurement)) ? RunState.Step.Result.Measurement[FileGlobals.LimitRecursiveVariable - 1].Limits.Low :
(FileGlobals.LimitRecursiveVariable = FileGlobals.LimitRecursiveVariable + 1, Str(RunState.Step.Result.Measurement[FileGlobals.LimitRecursiveVariable - 2].Limits.Low) + ",\n" + Str(Evaluate


FileGlobals.LimitRecursiveVariable: A number which contains the current index of recursion. This can be initialized to 0.



Then, in the Step List Configuration dialog, I set the custom expression to: 

PropertyExists("FileGlobals.LimitRecursiveVariable")?FileGlobals.LimitRecursiveVariable = 1,
(TypeOf(RunState.Step) == "NumericLimitTest") ? Step.Limits.Low :
(((TypeOf(RunState.Step)) == "NI_MultipleNumericLimitTest") ? Evaluate(FileGlobals.LimitExpression) : ""):""



With all of these expressions set, I see the behavior we're looking for. I used the PropertyExists() function Jesse mentioned to cause this expression to only be evaluated for sequence files which contain the two File Globals mentioned previously. So you'd need to set both of the globals before you will be able to view the limits.


I hope this helps, and let us know how it works for you!

Daniel E.
TestStand Staff Product Support Engineer
National Instruments
0 Kudos
Message 12 of 13

Hi Jesse and Daniel,


I used proposed method and during testing we found that this indication too frustrated for operators. I reorganized test sequence for Numeric Limit test, so indication became more easy. Thanks for help.



Best regards, Sergii

0 Kudos
Message 13 of 13