01-28-2020 05:50 AM
Hi there.
Is there a way of setting limits during a test? What we want to do is take a measurement, read back the result, and based on this adjust the test limits later on in the test sequence.
TIA
Jim.
01-28-2020 10:08 AM - last edited on 11-04-2024 02:05 PM by Content Cleaner
You can set the limits to a variable and then modify the variable. Alternatively you can access the limits directly in the Step.Limits container. e.g.:
Step.Limits.Low = Step.Result.Numeric + 1
If you decide to modify the limits in one of the step expressions, be aware that the post expression happens before the status expression, which is where the pass/fail value is determined:
https://www.ni.com/docs/en-US/bundle/teststand/page/step-execution.html
Hope this helps!
Trent
01-29-2020 08:00 PM
I would create a local variable and in the post expression for the step where you take the measurement, add something like Locals.Variable=Step.Result.Numeric
Then, in your later step, make the limit utilize Locals.Variable