11-22-2012 10:18 AM
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
Solved! Go to Solution.
11-23-2012 03:29 AM
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.
11-23-2012 06:19 AM - edited 11-23-2012 06:21 AM
Hi Adam,
The following graphic shows the execution order of the teststand steps.
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 )
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,
11-26-2012 03:35 AM
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.
11-26-2012 02:05 PM
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,
11-27-2012
12:25 AM
- last edited on
11-04-2024
02:02 PM
by
Content Cleaner
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/
08-10-2016 06:10 AM
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
08-10-2016
06:24 AM
- last edited on
11-04-2024
02:02 PM
by
Content Cleaner
08-10-2016
06:26 AM
- last edited on
11-04-2024
02:03 PM
by
Content Cleaner
This is more current:
https://www.ni.com/docs/en-US/bundle/teststand/page/step-execution.html
08-10-2016 06:32 AM
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