LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I collect a signal at 10 Hz, and every 3 min at 2000 Hz, and continue?

Hello all,
I have a specific application where I need to collect signal from a channel at two different rates.
One measurement is supposed to take data continuously, say at 5 Hz, and every few minutes I need to collect data at really high frequency approximately 0.5 MHz, and continue this process for a while (~20 times). The data source is same. I use LabView 8.2, and the acquisition card is PCI 6251.
 
I tried to split the signal into two wires and then collect from two different channels making a case structure, however the DAQ assistant (that I use) shows an error message saying that the resource is reserved.
 
 
How do I solve this problem ? Is there really a way to do it?
 
Any help would be greatly appreciated.
With thanks,
Gaire
0 Kudos
Message 1 of 4
(2,899 Views)

You will take data at 5 Hz, then every few minutes you will switch to 0.5MHz...

To keep taking data at 5 Hz you will select the data you need from the 500.000 samples/sec that you take.

0 Kudos
Message 2 of 4
(2,882 Views)

Well, it depends.  (Doesn't it always?)  In addition to the earlier suggestion which implied stopping, reconfiguring, and restarting the task, here are a couple ideas for gathering continuous data:  

1. Always sample at 500 kHz.  Most of the time, use decimation (without averaging) to retain only 5 Hz of info (1 out of 100k samples), but every 3 min you can retain all the data for some desired # of samples.  If you do this, I would aim to accumulate enough data that I was only servicing the DAQmx Read call about 1-5 times a second during the slow sampling times.

2. Use an onboard counter to generate a continuous pulsetrain at 5 Hz which the AI task uses as its sample clock.  Every 3 min, change the pulse specs on the fly to be 500 kHz.  This will automatically change the AI sample rate.  Drawback: can't control exact # of pulses generated at 500 kHz.  AI task won't have built-in knowledge about change in sample rate.   There *is* a way to track this stuff with the other onboard counter, but it starts to get complicated compared with the earlier options.

(Note: since your slow sampling periods only require 5 Hz, you may be fine with the simpler implementation of stop/reconfig/restart.  Just presenting some alternatives for consideration.)

-Kevin P.

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 3 of 4
(2,873 Views)
Thanks to all of you.
I will try the different options, and see if I get what I want.
0 Kudos
Message 4 of 4
(2,856 Views)