Very briefly ... what I'm doing is having my NI-6031E DAQ card continuously sample four different channels at 1 kHz and populate around 30 seconds of data in its buffer (but not writing this data, at least yet). Then, at the same time, I'm sampling these four inputs at about 10 Hz and writing an average for each second (averaging these ten values per second) to a file.
Then, on occasion (eg operator sees an anomaly) a button is clicked and the 30 seconds of 1kHz data is dumped out of the card's buffer into a spreadsheet. This feature works extremely well, at least in what it outputs.
My problem, though, is that writing this large file (30,000 samples of 4 channels, plus a column for time) takes approximately 3.5 seconds.
From above, you can see that my program is still supposed to be sampling the input stream at 10 Hz and writing the average to a file. But writing this large file temporarily halts execution of my loop.
Does anybody know of any way to kick this spreadsheet writing out of the loop, or somehow have it do some fancy parallel computing to get this done? I'm limited here, I know, since I can't halt the buffer population ... basically the show must go on without delay!
Thanks for any help.
Brett