LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Pass/Fail counter question. [Help]

Solved!
Go to solution

I guess I posted my question too soon. I''ve just found out that within the table I should expect random number of test procedure. Meaning "Sample A" is going to be tested 3X while "Sample Z" will be tested 5X" and so on,, so using "3" as a control to change the number of testing instead of constant will not work.. It's getting more confusing because it seems like I needed to know how many times the sample was tested and look to its results..

 

Again, thank you guys!!!

______________
KowdTek
LabVIEW 2009

One Step At A Time, Maybe Two...
0 Kudos
Message 21 of 33
(1,572 Views)

I guess if you can array of just the first column and remove the duplicates.  Then use that to search the original array and see if a Fail ever shows up in the 2nd column.

 

It is safe to assume that if a sample doesn't have a failed test, that it must have passed?  Or is there a possibility that a sample was scheduled for 5 tests, 4 of them ran and passed, but the 5th test never ran and thus has no entry in the array?  Would that be passed, failed, or just incomplete?

0 Kudos
Message 22 of 33
(1,563 Views)

Let say " Sample A" is done to its series of test (assuming 5 number of test), an operator will enter all the test results (pass/fail) all at ones so this particular sample is not be hanging for the final call.

 

There's a little mixed up on the informations I'm getting, I also found out that there are multiple part number being processed in each machine and that explains why number of test procedures are not uniform. I think one of the example on this thread will just do fine but I still have to do some work to sort the serial numbers to their respected part numbers OR I can just send a seperate SQL Query with their part numbers and work my way up though it may take up extra time because the test data I'm reading is so filed up...

 

Thanks!

______________
KowdTek
LabVIEW 2009

One Step At A Time, Maybe Two...
0 Kudos
Message 23 of 33
(1,558 Views)

Here's a simple example if the number of tests per sample is variable.

 

 

(Still, you would think we should have more informative output, e.g. listing the failed and passed samples).

Message 24 of 33
(1,551 Views)

 


altenbach wrote:

(Still, you would think we should have more informative output, e.g. listing the failed and passed samples).


 

OK, here's an example for that. Please verify correct operation. 😉

 

(Still assumes that samples with the same name are adjacent in the input. If this is not true, we could sort first by the sample column).

Message 25 of 33
(1,547 Views)

Thank you all for helping me. Smiley Happy

______________
KowdTek
LabVIEW 2009

One Step At A Time, Maybe Two...
0 Kudos
Message 26 of 33
(1,540 Views)

Actually, Jim posted a solution for varying number of tests back on page 2, using Open-G functions.  Looks a little more elegant to me.  Sorry Altenbach.

- tbob

Inventor of the WORM Global
0 Kudos
Message 27 of 33
(1,494 Views)

 


@tbob wrote:

Looks a little more elegant to me.


 

Well, I currently don't have the opeg stuff installed, so it will not work out-of-the-box on my rig. Assuming that tests for the same sample are adjacent, mine is much more efficient, because it touches each line exactly once and does things in place. No repeated array allocations for intermediary results!

 

(Not even considering what is happening inside the opeg tools, Jim's main diagram allocates 5 intermediary (possibly large) arrays (integer, boolean, string, etc.), often just to reduce them to a single value one step later. For large inputs, this can mean the difference between "runs fine" and "out of memory". It would be interesting to do a performance comparison as a function of input size).

 

This is a LabVIEW board, not an openG board, so I strongly believe we should not rely on external tools, modules, and toolkits. Besides, if we just used canned tools, we won't learn much. 😉 (Still, the openG tools are of course great! :D)

 

"Elegance" has many definitions. I would argue that my solution is quite elegant by some of them. 😉 If you would flatten all subVIs of Jim's code to the main diagram and see all the things it actually does to get the same job done, you'd be shocked! :o.

 

Personally, I prefer to keep things simple. Similarly, all I need in the kitchen is a big knife. Others might prefer a collection of specialized tools, from food processors to very specialized gadgets that only do one thing (garlic press, tomato slicer, etc.). While they make a specific process more convenient, there is associated cost, such as setup (=download and install the openg tools), cleanup and storage (=palette bloat). Just MHO. 😄

0 Kudos
Message 28 of 33
(1,480 Views)

@altenbach wrote:

 

[...] Others might prefer a collection of specialized tools, from food processors to very specialized gadgets that only do one thing (garlic press, tomato slicer, etc.). [...]


I'd NEVER use a garlic press. I PROMISE!!!
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 29 of 33
(1,465 Views)

I just tried the examples with the actual data I'm receiving from the our database but it seems to be counting incorrectly...  All I did from the actual data is index the column I needed, build an array and transpose the array.

Note that the examples I've tried from this thread returns the same number of Passed/Failed samples. I'm thinking it's the array that I'm passing through...

Can you "please" check the attached vi and see what's wrong?

 

Thanks again...

______________
KowdTek
LabVIEW 2009

One Step At A Time, Maybe Two...
0 Kudos
Message 30 of 33
(1,444 Views)