NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Step limits expression evaluation

Solved!
Go to solution

I'm just trying to understand the point at which the step limits expression is evaluated. I'm trying to set the limits of a numeric limit test based upon an expression. I'm passing the sequence context to the LabVIEW code module so that the VI can determine the limits to set the colours of pass/fail regions on an indicator and for some other purposes.

 

The problem I have is that it looks like the step limits expression hasn't been evaluated by the time the sequence context is passed to the VI, meaning the calculated limits aren't available. Is this correct? If so, does anyone have any suggestions as to how I might be able to get around this?

 

Thanks.


Adam


0 Kudos
Message 1 of 11
(6,387 Views)

I've found what appears to be an acceptable solution to this issue.

 

By adding a pre-expression to the numeric limit test step of:

 

Step.Limits.Low = Evaluate(Step.Limits.LowExpr), Step.Limits.High = Evaluate(Step.Limits.HighExpr)

This ensures the limit expressions are evaluated before the LabVIEW code module is called which then means the calculated limits are available through the Step.Limits.Low and Step.Limits.High properities accessed in LabVIEW using the sequence context.

 

I'd still welcome any thoughts anyone might have as to whether this is the best approach.


Message 2 of 11
(6,377 Views)
Solution
Accepted by topic author adambro

Hi Adam,

 

The following graphic shows the execution order of the teststand steps.

 

step limit execution order.JPG

 

I believe that the limit expression evaluation on "numeric limit test steps" occurs during the status expression evaluation (so, the final part of the step).

 

An alternative would be to create your own custom step type, and include a bespoke "pre-step substep for your step in the custom step" (I think I have just broken the world record for most uses of the word "step" in a single sentance Robot Happy)

 

However, I genuinely believe you have already found the most workable/simple/elegant solution. So, kudos to you!

 

Thanks for your time. I hope this provides a little clarification.

Best wishes,

Rich Roberts
Senior Marketing Engineer, National Instruments
Connect on LinkedIn: https://www.linkedin.com/in/richard-roberts-4176a27b/
Message 3 of 11
(6,366 Views)

Thanks for your help with this Rich. I did wonder if creating a custom step type might be possible solution but that is getting into unfamiliar territory for me so I was pleased to find a more simple solution that seems to do the job.


Message 4 of 11
(6,343 Views)

If you want a more detailed description of step execution then look in the TestStand reference manual under chapter 3 section Step Execution. 

 

Start>>All Programs>>National Instruments>>TestStand>>Documentation>>Manuals>>NI TestStand Reference Manual

 

It shows all 33 actions and the order in which they are performed.

 

The exception to this is the Multiple Numeric Limit Test.  Because it has to evaluate an entire array it happens in a Post-Step substep.

 

Hope this helps,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
Message 5 of 11
(6,330 Views)

FYI, as of TestStand 2012, this table is available in the Fundamentals book of the TestStand help, as well as other information previously in the reference manual:

 

http://zone.ni.com/reference/en-XX/help/370052K-01/tsfundamentals/infotopics/step_execution/

 

 

Al B.
Staff Software Engineer - TestStand
CTA/CLD
Message 6 of 11
(6,320 Views)

Hi Rich,

This helped me with one of the issues I was facing in my application! Thanks.

 

Regarding your statement:

"I believe that the limit expression evaluation on "numeric limit test steps" occurs during the status expression evaluation (so, the final part of the step)."

 

Do you remember how you figured this out? Is this level of detail regarding the execution of a step available in any Teststand documentation or did you just work it out based on what you observed?

 

I know this will be a long trip down your memory lane, but just want to make sure I haven't missed any obvious documentation

 

Thanks and Regards,

Supreeth

Thanks and Regards,
Supreeth.K

0 Kudos
Message 7 of 11
(5,605 Views)
0 Kudos
Message 8 of 11
(5,599 Views)
0 Kudos
Message 9 of 11
(5,597 Views)

Hi Jigg,

 

Thanks for the reply.

 

I have seen this document. From that you can say that the Status - expression is evaluated after the Post- Expression. But, how would we be able to say that the Step.Limits.LowExpr is actually evaluated only during the Status-expression and not before that?

 

Thanks and Regards,

Supreeth

Thanks and Regards,
Supreeth.K

0 Kudos
Message 10 of 11
(5,594 Views)