LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Counting Events

I am needing to take data points in the following way: take the average of pressure readings 1 through 5, 6 through 10, 11 through 15, etc. My current method is taking shift registers and inserting into a compound arithmetic and then dividing by 5. However, this results in averages of 1 through 5, 2 through 6, 3 through 7.  Any solutions on how to utilize a counting vi to accomplish this task?
0 Kudos
Message 1 of 6
(2,585 Views)
Decimate your array by 5 outside a for loop. This will split it into 5 arrays. Wire these arrays into a for loop. Do the averaging inside the loop. Wire the averages to the right edge of the foor loop with indexing enabled. Output will be an array of averages for each dataset.
0 Kudos
Message 2 of 6
(2,582 Views)
I appreciate your response. Could you please clarify on how to decimate the arrays?
0 Kudos
Message 3 of 6
(2,577 Views)

Try this link. I don't have labview on this computer.

http://zone.ni.com/reference/en-XX/help/lv/71/glang/Decimate_1D_Array/

Resize the block until it includes 5 output terminals.

0 Kudos
Message 4 of 6
(2,570 Views)

Unclebump,

I tried your instructions with the decimating the array but I still cannot get it to work because the array system would be cyclic. I attached my file if anyone knows how ti change it. Much appreciated.

0 Kudos
Message 5 of 6
(2,542 Views)
Hello UTPBChemistry:
 
Please see attached vi if it works.
I hope this helps.
 
0 Kudos
Message 6 of 6
(2,530 Views)