NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to set TS Pass/Fail setting

Hi,

 

I am new to TS and would like to seek help as below:

 

I have a test step to call a VI and that VI will perform some diagnostics like Short to Gnd or Short to Battery.

I output all the data as a cluster with booleans. When the VI detects Short to Gnd it will turn the boolean to false and the false result is actually a Pass for my test step.

How can I set the TS to achieve this?

 

Please advise.

 

Regards,

Alfred Tan

0 Kudos
Message 1 of 11
(5,988 Views)

Hi,

 

Are you using a Pass/Fail Test Step type?

 

Checkout the Example "Computer Motherboard Test Sequence.seq" in the TestStand examples folder under Demo as this using Pass/Fail Test step types.

 

 

Regards
Ray Farmer
0 Kudos
Message 2 of 11
(5,988 Views)

Hi,

 

FYI. I only manage to attend TS1 only.

I had viewed through the example but I am not able to create the PASS/FAIL in resultlist.

0 Kudos
Message 3 of 11
(5,986 Views)

Can you post a small example highlighting your problem.

 

Check that you have enable Record Result in the Run Options of the Step property.

 

 

Regards
Ray Farmer
0 Kudos
Message 4 of 11
(5,980 Views)

Hi Alfred,

 

You have a number of options for how you determine whether a step passes of fails, but the place you need to be focusing on is the Data Source tab of the step settings because this property is what determines whether a step passes or fails. By default, it is set to Step.Result.PassFail (for a Pass/Fail step). If you want a False from your VI to return a result of Passed, you can either save the output of the boolean you care about (Short to Gnd) to either a local variable or Step.Result.PassFail. Then change the Data Source to either "!Locals.MyVariable" or "!Step.Result.PassFail" depending on what option you took. The most important thing to note is the exclamation point before the variable, which servces as a logical NOT. That means if your VI returns a False, the step will Pass and if the VI returns a True, the step will Fail.

 

Hopefully that helps. If I am missing something, just let us know to further help.

0 Kudos
Message 5 of 11
(5,974 Views)

Hi CorbinH,

 

Thanks for the suggestion now I can return a result of pass for my False Boolean.

BTW,

1) If the VI has multiple Booleans, how can I set in TS to check the condition individually? Please refer to the .png file,

if I want the Power_in_range(T) show fail status when the Boolean is true,

                  HTR_SUPP_LOW_status show pass status when the boolean is true and

                  HTR_SUPP_HI_status show pass status when the Boolean is true 

 

2) I have attached my TS program and I found that for the first execution, when TS call my 5.11_xxx.vi, it run perfectly. but when come to 2nd execution, and 5.11_xxx.vi is called, it always set my power supply to 10V and remain the same for rest of the execution. This is totally different from the 1st execution.

Having said that, if I restart my TS program, the behavior resume perfectly for the 1st execution. Do you know what went wrong?

 

 

Regards,

Alfred Tan

0 Kudos
Message 6 of 11
(5,965 Views)

Hi Alfred,

 

1) I am assuming you are wanting the result collection to look more like the Multiple Numeric Limit Test where it would show "Pass/Fail" next to the measurement instead of just the tested value. The recommended way to do this is to create a custom step type, but this may take some work and a pretty good knowledge of TestStand. Simpler options would be to use custom Additional Results and use logic such as (Locals.Boolean1) ? "Failed" : "Passed" as the value to log or add your own custom Resource String for the status expression.

 

2) I don't have the hardware to run your code, but one guess would be the way you are using local variables. When TestStand runs a LabVIEW VI, it actually keeps that VI in memory until the sequence file is unloaded (by default). I would recommend modifying your code to limit local variables when possible. For the hp66xx calls you were making, I made a modification that you can see in the .png I've attached. As a secondary/temporary fix until the cause is located, you can also change the Unload Option under Run Options of your step settings from the default to "Unload after sequence executes."

0 Kudos
Message 7 of 11
(5,947 Views)

One thing I forgot to mention is that the TestStand Reference Manual is a great resource for many things, but in your case it would help you get on the right track with custom steps or resource strings. The following article is also great to learn more about resource strings:

 

http://zone.ni.com/devzone/cda/tut/p/id/3650

 

Hope that helps.

0 Kudos
Message 8 of 11
(5,945 Views)

Hi CorbinH,

 

Thanks for the prompt response. I really appreciate it.

For item 2, after i set it to "unload after sequence executes", the issue goes away and thanks.

 

For Item1, Could you be more specific by showing me with print screen?

Do you mean in pass/fail action, under the additional results, we can use logic to configure our test parameters?

I had tried out but not sucessful.

 

BTW, I am not a software programmer, where can I learn the operator symbols like what you had stated in the previous message like" (locals.Booleans1)?"failed":"Passed" ".

 

Regards,

Alfred Tan  

0 Kudos
Message 9 of 11
(5,921 Views)
Hi CorbinH,

I really hope that you,can reply my message ASAP. I am way behind my project schedule.
0 Kudos
Message 10 of 11
(5,912 Views)