LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Data Output Rate to Spreadsheet

Hello,

I am attempting to output array data at a recording rate slower than the rate I am sampling.  The while loop I am using is running every second, however, I need to record values every ten seconds or so.  How would I accomplish recording and sampling at different rates?  I tried using a second while loop with a different sample rate, but it doesn't seem that two loops can run simultaneously.  Is it better to try to cut out samples from the final array (with all of the samples), and create a subarray (with just the samples of interest)?  Any input would be greatly appreciated.  Thanks
0 Kudos
Message 1 of 2
(2,260 Views)
Two loops can run simultaneously if there is no data dependency between them. My guess is that you have a wire going from one loop to another. This establishes data dependency because the loop that is receiving the wire cannot run until there's a value on that wire, and the value on that wire is not placed until the first loop finishes.

That said if you still want to use 2 loops you can pump your data into some "container" and the other loop just read it out. For example, you could use a queue. You can also do this in one loop. If your data acquisition loop is running once a second, then you just need to save the data every 10th iteration. You can simply look at the "i" terminal, which is the iteration count (which starts at zero).
0 Kudos
Message 2 of 2
(2,257 Views)