Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

How to store acquired data within while loop

Hi!,

I have a while loop with AI Read inside it (AI Config and AI Start are outside). The loop runs until the user aborts it. I would like the data read from each iteration to be stored and made available on loop abortion.

Thus, if in each iteration AI Read gives me 1000 samples and the loop has run 12 times, I want the 12000 data samples to be available for processing after loop abortion.

Also, since it is a simple acquisition (1000 samples/sec from 3 channels) should I consider using a different AI vi instead of config+start+read ?

I am using NI-DAQ 6.2 and LVPDS 6.1

Thanks!

- Gurdas
gurdas@qagetech.com
Gurdas Sandhu, Ph.D.
ORISE Research Fellow at US EPA
0 Kudos
Message 1 of 3
(2,543 Views)
Hi Gurdas,

unless Excel has a limitation concerning the number of data it can accumulate, I way have a correct answer.

If you are working with Labview, choose the VI"create a tab" and put it just after your while loop. You can modify this VI according to the number of columns you would like.

Then,you link the entries of this VI to all the measurements you want to collect. After that, you jsut have to choose the VI"store in a file" with extension for the file ".xls" (since Excel file). Be careful to choose the VI which meets the data you want to store (number or text).

I hope it will help you to continue. One more thing: If you are using Labview 5.0.1, there is a bug. Create first a "for loop" with all the things you need. And only at the end you replace
this loop by a "while loop". This is the manner to do if you want to collect data in tabs.

Onde.
0 Kudos
Message 2 of 3
(2,543 Views)
Thanks Onde!

Storing data into a file is not what I wanted. I just wanted a temp storage from which to read relevant data after the loop. Managed to do that by using a build array function inside the loop.

Thanks anyway and wish you an inspiring week ahead.

- Gurdas
Gurdas Sandhu, Ph.D.
ORISE Research Fellow at US EPA
0 Kudos
Message 3 of 3
(2,543 Views)