NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

RunState.CallingStep.datasource

Use RunState.CallingStep.Result.Numeric for the Measured Value. Oops, missed your first reply.

 

Like I mentioned before, re-evaluating the DataSource changes the context of the expression. I can't think of a good way off-hand to circumvent that issue.

0 Kudos
Message 11 of 13
(893 Views)

You might want to do something more like this:

 

Locals.MyMessage += ((PropertyExists("RunState.CallingStep.Limits.UseLowExpr") && RunState.CallingStep.Limits.UseLowExpr) ? "Minimum Value: " + RunState.CallingStep.Limits.LowExpr + "\n" : "")

 

Similarly for the measurement you could do:

Locals.MyMessage += (PropertyExists("RunState.CallingStep.Results.Numeric") ? "Measured Value: " + Str(RunState.CallingStep.Results.Numeric) : ""

 

Hope this helps,

-Doug

0 Kudos
Message 12 of 13
(868 Views)

Actually I just thought of something much simpler that you might prefer. You can let TestStand figure out the description for your as follows:

 

Locals.StepDescription = RunState.CallingStep.GetDescriptionEx(StepDescOption_Long)

 

The string you get back will include all of the details you see in the description column for the step if you had tracing turned on. For numeric limits this includes the limits and the measurement value.

 

Hope this helps,

-Doug

0 Kudos
Message 13 of 13
(866 Views)