NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Display Measurement Value(s) in SequenceView

Solved!
Go to solution
How does one display the measurment value(s) of a step in a SequenceView control connected to the ExecutionViewMgr? It would seem to be a reasonable thing to want to display as you are executing the test but I can't find any way to do it. Surely National Instruments is not so naive is to have overlooked this important functionality.
0 Kudos
Message 1 of 9
(4,782 Views)

The description field displays the measurement by default. See the attached screenshot. Also notice the Edit Step List Configurations menu item in the screenshot. You can you use it to add columns that display user defined information.

 

 

0 Kudos
Message 2 of 9
(4,777 Views)
Thanks for pointing out the measurement in the Description field. I had missed that. However, I was hoping for an exclusive field. I have tried adding a column but have not been successful at figuring out the correct expression to use to display just the measurement. If it isn't obvious, I am new to TestStand.
0 Kudos
Message 3 of 9
(4,773 Views)
Solution
Accepted by Skeptical

Try something like:

 

(Step.Result.Status == "" || Step.Result.Status == "Skipped") ? "" : PropertyExists("Step.Result.Numeric") ? Str(Step.Result.Numeric) : PropertyExists("Step.Result.String") ? Str(Step.Result.String) : ""

0 Kudos
Message 4 of 9
(4,768 Views)
Thanks. That should do it.
0 Kudos
Message 5 of 9
(4,759 Views)
how about to display a multiple numeric measurement results when UseIndividualDataSources in enabled.

i try somthing like this, but it only make sense when UseIndividualDataSources is not enabled.

(PropertyExists("Step.Result.Measurement") && Step.UseIndividualDataSources == False) ? Str(Step.NumericArray,"%$.3g",1,False,", ") :
(PropertyExists("Step.Result.Measurement") && Step.UseIndividualDataSources == True) ? (Str(Evaluate(Step.DataSourceArray[0]),"%$.3g") + /*PropertyExists("Step.DataSourceArray[1]") ? */", " + Str(Evaluate(Step.DataSourceArray[1]),"%$.3g") + /*PropertyExists("Step.DataSourceArray[2]") ? */", " + Str(Evaluate(Step.DataSourceArray[2]),"%$.3g") + /*PropertyExists("Step.DataSourceArray[3]") ? */", " + Str(Evaluate(Step.DataSourceArray[3]),"%$.3g") + "" ) :""
0 Kudos
Message 6 of 9
(4,518 Views)
It works right now using the follow expression

(PropertyExists("Step.Result.Measurement") && Step.UseIndividualDataSources == False) ? Str(Step.NumericArray,"%$.3g",1,False,", ") :
(PropertyExists("Step.Result.Measurement") && Step.UseIndividualDataSources == True) ? (Str(Evaluate(Step.DataSourceArray[0]),"%$.3g") + (PropertyExists("Step.DataSourceArray[1]") ? ", " + Str(Evaluate(Step.DataSourceArray[1]),"%$.3g") : "") + (PropertyExists("Step.DataSourceArray[2]") ? ", " + Str(Evaluate(Step.DataSourceArray[2]),"%$.3g") : "") + (PropertyExists("Step.DataSourceArray[3]") ? ", " + Str(Evaluate(Step.DataSourceArray[3]),"%$.3g") : "") + (PropertyExists("Step.DataSourceArray[4]") ? ", " + Str(Evaluate(Step.DataSourceArray[4]),"%$.3g") : "") + (PropertyExists("Step.DataSourceArray[5]") ? ", " + Str(Evaluate(Step.DataSourceArray[5]),"%$.3g") : "")) :""


But is it correct to display results for multiple numeric test like this? It is impossible to enumerate all the elements for DataSourceArray?
0 Kudos
Message 7 of 9
(4,513 Views)

Hello Bendy,

 

Since expressions cannot have loops, the best way to iterate through an array like this is using recursion. I think you will find the following community example quite helpful:

 

http://decibel.ni.com/content/docs/DOC-5826

 

One difference I would make is using StationGlobals instead of FileGlobals just in case you are using multiple sequence files. Here are the modifications I made to display the numeric array of a multiple numeric limit test.

 

Step List Configuration column expression:

 

StationGlobals.RecursiveNum = 1,

(TypeOf(RunState.Step) == "NumericLimitTest") ? Step.Result.Numeric :

(((TypeOf(RunState.Step)) == "NI_MultipleNumericLimitTest") ? Evaluate(StationGlobals.RecursiveExpr) : "")

 

StationGlobals.RecursiveExpr value:

 

(GetNumElements(Step.Result.Measurement) == 0) ? 0 :
    ((StationGlobals.RecursiveNum == GetNumElements(Step.NumericArray)) ? Str(RunState.Step.NumericArray[StationGlobals.RecursiveNum - 1],"%$.3g") :
    (StationGlobals.RecursiveNum = StationGlobals.RecursiveNum + 1, Str(RunState.Step.NumericArray[StationGlobals.RecursiveNum - 2],"%$.3g") + ", " + Str(Evaluate
     (StationGlobals.RecursiveExpr))
    )
)

 

As you noticed, I didn't implement the UseIndividualDataSources check, but it looks like you already have that figured out. Hopefully this helps!

Message 8 of 9
(4,484 Views)
Hello, Corbin

The example really help, it shows me another way that i can not reach, thank you very much.

Bendy
0 Kudos
Message 9 of 9
(4,466 Views)