LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help! Need multiple samples from multiple channels in chuncks at a time

 
0 Kudos
Message 1 of 9
(2,848 Views)

Of course an explanation to go with this subject heading might help Smiley Very Happy

The 6281 M series card samples and fills the buffer like so:  1,2,3 1,2,3 1,2,3 1,2,3 ....  It takes one sample from ch0 then moves to ch1 takes and another, then one from ch2, then back to ch0 again.

I need to take 100,000 samples from ch0 then 100,000 from ch2 ....  I'm taking data from a high input impedance source and sampling multiple channels at 100kHz.  This effective rate (300kHz) implies a 3.3us relaxation time.  The 6281 DAQ card needs ~8us to perform well.  By taking many samples at a time this ghosting effect can be averaged out.

Anyone know how to pull X samples from one channel then move to the next and repeat?  Does anyone know how to do this without stopping and restarting the task?

Win XP / LV 7.1 / PCI-6281 M Series / DAQmx 7.4x

 

Thanks,

Ab

0 Kudos
Message 2 of 9
(2,843 Views)
Ab,

Unfortunately, the only way to do what you want is to start and stop the task. Is there a reason that you cannot do this? I imagine that you do not care about data correlation if you are only scanning one channel at any given time. Do you need a certain guarantee in time from one acquisition to the next?

Regards,
Ryan Verret
Product Marketing Engineer
Signal Generators
National Instruments
0 Kudos
Message 3 of 9
(2,830 Views)
Hi Ryan,

Yes I do need time corelation. 

1)How do tasks work:
    -What prevents LV from running multiple tasks?
    -Why must LV stop and then restart a task to take X from ch0 then X from ch1?
    -What is lost between stopping and restarting a task?

2) How does a labveiw waveform work:
    -Does dt = const which the program assumes is the same between each sample so that it can build up a time array?
    -Or does the waveform contain an array of time values dt (sub i) that map to Vi (sub i)?

Thanks,
Ab
0 Kudos
Message 4 of 9
(2,826 Views)
Ab,

1.) Nothing prevents LabVIEW from running multiple tasks. This is a hardware limitation. There is only one ADC on your board and one sample clock. You can set up a scan list to specify the channels you wish to acquire (all done in hardware), but you cannot specify an arbitry channel sequence. You must stop and re-start a task, or preferably start and stop 2 different tasks (only one running at a time) in order to reconfigure the hardware. The only thing lost by starting and stopping a task is time.

2.) A LabVIEW waveform is basically a specialized cluster. It includes an inital timestamp, a single dt for the entire waveform, and an array of data. So yes, dt is constant throughout the waveform.

Hope this helps,
Ryan Verret
Product Marketing Engineer
Signal Generators
National Instruments
0 Kudos
Message 5 of 9
(2,814 Views)

Ab,

I'm not at LV & hardware to test this, but I know a method that used to work under traditional NI-DAQ.  There you could specify a channel string similar to "0,0,0,0,1,1,1,1,2,2,2,2"   This would perform 12 conversions per sample -- 4 on ch 0, then 4 on ch 1, then 4 on ch 2. 

I haven't tried it myself and can't be sure, but I'd expect that a similar trick can be pulled with DAQmx.  It may, however, very well be more of a pain to generate and format the channel string. 

-Kevin P.

 

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 6 of 9
(2,802 Views)
Kevin,

You are correct about this process, and it does work in DAQmx, but not with the number of channels Ab desires. The limit is somewhere just under 600 channels in a task.

Hope this helps,
Ryan Verret
Product Marketing Engineer
Signal Generators
National Instruments
0 Kudos
Message 7 of 9
(2,785 Views)
I had an idea similar to what Kevin suggested:

Sample 0,0,1,1,2,2,0,0,1,1,2,2....  Then take each second sample as a data point.  This would allow the ADC to relax/settle to the input voltage but would cut my max sample rate in half.

-Ab
0 Kudos
Message 8 of 9
(2,782 Views)
Ab,

Better than this would be to just sample at that lower rate, and set the interchannel delay of your convert clock to half the period of your sample clock. This would maximize settling time between samples. This link is a good KnowledgeBase article on the convert clock.

Hope this helps,
Ryan Verret
Product Marketing Engineer
Signal Generators
National Instruments
Message 9 of 9
(2,775 Views)