LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

acquire channels sequentially

Hello,

I'm using a PXI-6229 M Series DAQ to read 12 analog signals.   What I need to do is read the signal and determine the RMS voltage on each AI - I don't care about frequency.  Signals will be anywhere in the 20Hz-30kHz range.

The problem is that the 6229 can't sample 12 channels simultaneously at the nyquist frequency - it only does 250 kS/s max for one channel, which leaves me with a max sample rate of 20.8 kHz when using 12 channels.   My first question, is if I'm only interested in voltage, is it still a requirement to sample at the nyquist frequency, or can I choose something lower?  How low?

If that's not an option, I've considered just going through these 12 channels one at a time.  The problem with this is that in DAQmx, the channels are all grouped together in one task, and if I remember correctly, LabVIEW will complain if I try to make multiple tasks, each with the same device.  Is there a way to set my task up so that I can selectively start only a certain channel?  I would really like to avoid having to sequentially configure, start, and clear a task everytime I want to read only a certain channel, especially as I may need to rescan the AI channels more than once.
0 Kudos
Message 1 of 3
(2,642 Views)
Well, yes, maybe. If you sample below the nyquist rate and the signal has energy at frequencies above the nyquist rate you will get aliasing. That means, for example, that the component at 30 kHz when sampled at 20 kHz will appear as though it is a 10 kHz signal. It will be added to any signal that really may be at 10 kHz and you cannot distinguish between the two components. If they happen to be out of phase (after sampling), they may cancel.

Sub-nyquist sampling may work, but it carries some risk of getting bad data. If your signal meets all of the following conditions, it might be worth running some experiments to see if you can get useful results:
1. The signal contains most of its energy in a single freqeuncy component,
2. The signal is band limited within the analog bandwidth of the A/D converter, and
3. No interfering signals exist within the analog bandwidth of the A/D converter.

I have not tried this, but theoretically you could get the magnitude this way.

Good rms measurements are best performed by averaging over whole cycles of the input signal. If you do not know the frequency, this can be a problem, especially for short data sets.

Lynn
0 Kudos
Message 2 of 3
(2,631 Views)
There are different things you might try, each with pros and cons.
 
1. If the signals being measured are repetitive over time and you don't need to repeat your 12 measurements at a rapid rate, you could choose to create, run, and stop 12 separate tasks in a loop.  Each task would contain only 1 channel at a time.  This method will have significant overhead, but you can get there from here pretty easily.
 
2. If the signals are periodic or repetitive, you can use aliasing to your advantage by purposely undersampling.  Ideally, you want a "mutually prime" type of relationship between the sampling rate and the signal frequency -- this way when you take lots of samples across many cycles of your signal, the samples will be spread across different phase points of the repeating signal.  With this method, you'll collect samples at a lower rate so you'll need more total sampling time.
 
-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 3
(2,624 Views)