This widget could not be displayed.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

how to set TS pass/fail status for numeric limit test

Solved!
Go to solution

Hi,

I have 16 measurements all of which use the same limits. I have tried to put a single test within a loop as follows

 

 

I change the step.name based on the loop count so that the report gives the correct channel number for a failure as follows;

 

Inside post-expression

Step.name = "PXI-6704 test 20mA Channel ao"+Str(Locals.LocalNumber/3+16),

 

(I am using Locals.LocalNumber as my loop counter)

 

The problem I have is that the final pass/fail status in the trace window always shows the result of the last test so if an earlier test fails but the last test passes it shows a pass. I think if this was a PassFail test I could manipulate step.result.passFail to change the status in the trace but I don't see how to do this with a numeric limit test.

 

I tried using the loop facility within a step but this always gives a header in the report file thast makes it look as if the last test failed when it didn't as shown below;

 

(couldn't post as message got too big)

 

The above shows fail but it should show pass as 9 is GT 4. In fact it is trying to show a summary of the loops. Is there a way to surpress this summary output or any other way to do what I want. As a workaround I am jumping out of the loop on first fail but then I miss reporting any further failures.

 

Thanks

 

Andy

0 Kudos
Message 1 of 7
(5,258 Views)

Hi Andy

 

Typically, if any step fails the UUT fails. Is this not what you want to have reported?

 

 I have attached a sequence file that uses a For Loop and runs a Numeric Limit Test. The VI that is called in this step fails a little under half of the time, and the step name is changed using the same expression that is listed above. In the report that is generated, I am able to see all of the results that pass and the ones that fail. Is this what you want to see?

 

As TestStand traces through a loop, it will show only the latest result, but it is not overwriting the results for the report. If this is not the information you are looking for, could you expand on what you are currently seeing and what you wish to see?

 

Regards,

 

Jason D

Applications Engineer

National Instruments

0 Kudos
Message 2 of 7
(5,232 Views)

Hi Jason,

 

Thank you for the reply. I have attached a zip file with examples of the issue. The attached seq file has two loops, one uses an external for loop and the other uses the loop function within a step. Both loops use the loop counter as the data for the numeric limit test which must be > 2 to pass. The first 3 loops (0,1,2) will fail and the last two will pass.

 

The report generated by the external FOR loop is perfect (see externalLoopReport.htm). However, the trace shows a pass even though it has failed (see externalLoopTrace.jpg). We cannot use it like this in our environment. Whenever we are debugging we always scroll up and down the test step looking for the red fail indicators which in this case we would not find. Our customer would get really confused if he sees a trace full of green but with a fail message in the report. This is why I posted the original question asking how to control the pass/fail status display programatically.

 

The trace generated by the internal loop is exactly what I need with the step showing a red fail. However, the report (internalLoopReport.htm) is really confusing. It shows the last iteration of the loop as failing even though it passed.

 

Thanks

 

Andy

0 Kudos
Message 3 of 7
(5,215 Views)
Solution
Accepted by topic author Andrew_Quick

Hi Andy,

 

I believe that the issue here may be cleared up with an explanation of why the step results are showing Pass or Fail.

 

In the external loop, the step executes 5 times and reports the result of that iteration at the end of each step, the last iteration passes, so that is what is shown.

 

The internal loop runs through the same process, which can be seen by stepping through the code. It shows some failures, and the later steps pass. The result of that step is a failure, however, because some steps failed. This causes the status to show “Failed” because it is the end result of the step.

 

If you wanted to show the failure in the trace, you could put a Pass/Fail Test step after the External loop that will fail if any step fails within the loop.

 

Regards,

 

Jason D

Applications Engineer

National Instruments

Message 4 of 7
(5,198 Views)

Hi Jason,

 

Thank you for the explanation. I have marked this as a solution. I will stick to my current work around of jumping out of the loop as soon as a failure is seen. I am sure that a Pass/Fail test step to show the loop status will work but it is just making the sequence that much harder to understand for other people when maintaining the code in the future.

 

Regards

 

Andy

0 Kudos
Message 5 of 7
(5,177 Views)

 

Your schematic shows the LED directly across the 24V rail.  I assume there's a resistor in series with it.

 

 

______________________________

Enjoy high quality http://www.sutradvd.ca Buy Discount DVD and fast delivery.

0 Kudos
Message 6 of 7
(5,138 Views)

It looks like this post was created in error. If not, could you clarify what you're referring to?

0 Kudos
Message 7 of 7
(5,118 Views)