08-09-2011 08:17 AM
I have a basic question about generating a test result without calling a module in TestStand.
For example, I do a pair of read operations from a product and return the results to a pair of numeric local variables. Now I want to do a sequence pass/fail or numeric limit test based on these two values. The results are already available and I can do a function step to test a result, say from a basic math operation. But I can't create a pass/fail result from a function step. I've gotten around the issue by creating a dummy module that has no function other than to allow me use the expression builder to assign a result to one of the step result items, but this sure seems stupid.
What am I missing?
Thanks,
Dave
Solved! Go to Solution.
08-09-2011 08:36 AM
Use the "None" Adapter.
08-09-2011 03:24 PM
Thanks for the suggestion, but I don't quite understand. By default, a function statement has no adapter, but it also has no way to attach pass/fail criteria to it. So how do I get from say a match function C = A-B to a step.result.passfail without using a module? I'm really looking for a way to do math on two local variables and then determine a sequence pass/fail result.
08-09-2011 03:46 PM
Insert Step>Tests>Numeric Limit Test (or Pass/Fail Test). Haven't you used the exact same thing for other tests? The only difference is the <None> adapter.
08-09-2011 03:50 PM - edited 08-09-2011 03:52 PM
Do it in the Pre-expression.
Use the <none> adapter as suggested and place down a Numeric Limit Test step. Then in the Pre-Expression put something like this:
Step.Result.Numeric = Locals.A - Locals.B
If you look at the Data Source tab you will see the variable which gets evaluated and compared against the limits.
In fact if you wanted to you could avoid the Pre-Expression and just put your calculation in the Data Source Expression:
Locals.A - Locals.B
You can set up the Limits on the Limits tab for that step.
08-10-2011 08:04 AM
Thanks for your help. I can't believe I had missed this all this time.