11-18-2008 10:33 AM
I am trying to sample several analogue inputs at different rates, one is at 250kHz but the other 8 can be much slower (only a few hertz). I am using a PCI-6254 M-Series card, so the max sampling rate is 1Mhz and I can't sample all the channels at the same rate and decimate the results.
Ideally I would sample as follows: Input 1, Input 2, Input 1, Input 3, Input 1, Input 4, Input 1, Input 5, Input 1, Input 6, Input 1, Input 7, Input 1, Input 8, and repeat.
I found the following links about multi-rate sampling, but can't open the example which was written way back in LabView 5, and won't convert to 8.5. http://zone.ni.com/devzone/cda/epd/p/id/4795 and http://forums.ni.com/ni/board/message?board.id=250&message.id=2941&requireLogin=False
Anyone have any ideas?
Cheers,
Owain
11-19-2008 08:18 AM
Hi Owain
The article you linked too is using traditional DAQ drivers and due to changes in the way the drivers now work in DAQmx that code won't work with your device. I have however found this article which uses DAQmx to sample at different frequencies. The code is written in LabVIEW 7.1 but will open in any version after.
Regards,
Thomas Clark
11-20-2008 10:05 AM
Thanks for that.
I also found another example at http://forums.ni.com/ni/board/message?board.id=250&message.id=16949&query.id=43933#M16949 which then interleaves the resulting data, but only interleaves the magnitude data. I need to do an FFT on the resultant waveform as well as display it like an oscilloscope trace, so need to keep the timestamps as well. Trying to merge the waveforms just results in separate waveforms. Any ideas on how to interleave the timestamps as well?
Cheers,
Owain
11-21-2008 10:29 AM
Hi
Unfortunately I don't think the approach you are taking will give you an accurate enough timebase to give a meaningful FFT. The way the sampling works means that the data is not evenly distributed between your base sample frequency, the samples are all taken shortly after each other before the card waits to take the next set of samples.
What exactly are you trying to achieve? If we take a step back we may be able to come up with a better approach to the problem.
Regards,
Thomas Clark
12-01-2008 07:40 AM
I have about 20 fast inputs that I would like to sample at 250kHz, manually selecting which one to sample, and 8 slow inputs that I would continually sample at 1kHz.