NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Generating a test result without a module

Solved!
Go to solution

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

0 Kudos
Message 1 of 6
(3,733 Views)

Use the "None" Adapter.

0 Kudos
Message 2 of 6
(3,732 Views)

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.

0 Kudos
Message 3 of 6
(3,723 Views)

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.

0 Kudos
Message 4 of 6
(3,721 Views)
Solution
Accepted by topic author rimfire44

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.

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 5 of 6
(3,717 Views)

Thanks for your help. I can't believe I had missed this all this time.

0 Kudos
Message 6 of 6
(3,702 Views)