LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Count the Pass/ Fail in a DAQ reading testing ?

I want to write the while loop to read the DAQ signal. Each time, the DAQ input signal is compared with the spec. limit. The signal that is within the limit will be recorded as " Pass " while the signal out of spec. will be recorded as " Fail ". At the end of the testing ( I break the program), the testing result will be displayed on the testing panel.
I believe my question is similar to the programming of " A=A+1 ". Can anybody help me to resolve the problem ?
0 Kudos
Message 1 of 2
(2,711 Views)
Tian,
Are you looking for just the number of passed and number failed measurements or a record of each individual test. If you are only concerned with the number of passed/failed tests then use a shift register. Right-click on the border of the loop and choose Add Shift Register. Then use a case structure. If it passed the test (true case) then increment the value. If it did not pass the test (false case) then just wire the value straight through the case structure. To get the number that failed simply subtract the number that passed from the iteration count.
0 Kudos
Message 2 of 2
(2,711 Views)