LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Pass/Fail counter question. [Help]

Solved!
Go to solution

Again, turn the "3" into a control if a run has a settable number of tests, or you can calculate it automatically from the number of unique test or the number of elements having the same sample name, for example.

Message 11 of 33
(1,450 Views)

@altenbach wrote:

 

 

How do you tell the difference betweeen:

 

  • One sample failing all three tests
  • Three different samples failing one test each? 

 


In the testing world that I live in, if a sample fails any test or number of tests, it is a failed unit.  If three samples fail one test each, then I have three failed units.  We usually store measurements, limits, pass/fail flag, and such in a database.  We have tools to extract data from the database to do in depth analysis.

- tbob

Inventor of the WORM Global
Message 12 of 33
(1,448 Views)

I had come up with this code but didn't post it because Jim beat me to the punch, and his code seemed more elegent.  There are so many ways to skin a cat (knife, razor blade, hatchet, axe, hydrocholric acid, etc...)

 

20271iBFC72EF957F93851

 

 

- tbob

Inventor of the WORM Global
Message 13 of 33
(1,440 Views)

Sorry, I wasn't clear. I was wondering how your program can tell the difference. 😉

 

(Sorry, I don't have the "oktk" installed on the current rig, so I cannot test...)

0 Kudos
Message 14 of 33
(1,433 Views)

Here's a new approach.  It doesn't assume anything about the structure of the array.  The only assumptions are that each TSample will have the same name in each test and that a pass will be exactly "Pass".  The OpenG array tools make this much easier.  🙂

 

20275i59F5371F816CAEC4

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

Message 15 of 33
(1,430 Views)

@altenbach wrote:

Sorry, I wasn't clear. I was wondering how your program can tell the difference. 😉

 


It can't.  But it doesn't matter.  One test failure or three test failures is still a failed unit.

- tbob

Inventor of the WORM Global
0 Kudos
Message 16 of 33
(1,428 Views)

 


@tbob wrote:

@altenbach wrote:

Sorry, I wasn't clear. I was wondering how your program can tell the difference. 😉

 


It can't.  But it doesn't matter.  One test failure or three test failures is still a failed unit.


Yes, but three test failures could be anywhere from 1-3 failed units. Your new code is better. 😉

 

0 Kudos
Message 17 of 33
(1,426 Views)

Altenbach, I think you were looking at Jim's code that I had just added some more code at the end.  Yes this code is wrong.  I modified it without thingking.  The code I last published is my code.  It accurately gives the correct number of passed samples.

 

I think we got crossed up with the latency in posting.  I posted at a time when you had already posted and I didn't see it, and vice versa.

 

- tbob

Inventor of the WORM Global
0 Kudos
Message 18 of 33
(1,423 Views)

Yes, one of these race conditions ....

 

My code is very similar to yours, just maybe a little tighter. 😉

0 Kudos
Message 19 of 33
(1,409 Views)

 


@tbob wrote:

[...] It accurately gives the correct number of passed samples. [...}

 


Unless the rows per sample is not uniform, or if the array isn't properly sorted.

 

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 20 of 33
(1,401 Views)