03-12-2008 03:26 PM
03-12-2008 09:58 PM
03-13-2008 08:02 AM
I want an effective sample rate of say 10 Hz. But I want each of those samples to be the result of taking multiple samples and averaging those multi-samples (to reduce noise from the 6008 device itself). Those multiple samples should be acquired as close together in time as the board allows so the effectively represent the data when averaged together. For example, the 6008 can sample at 10 kHz. That means I could average 1000 points together and obtain an effective sample rate of my 10 Hz. But those 1000 points would span a time interval that is so long that the points at the beginning and end of the interval would have similar values to the preceding and the next interval. So maybe only 100 points should be averaged together so the data is not "smeared". The 6008 sanple rate could be set to 10kHz and then when the data is read, some of the points are averaged and some are thrown away and never used.
An alternative to throwing away points and keeping track of that is to configure the task as I initially described to sample multiple times from one channel. DAQmx will then set the channel to channel sample rate at the fastest the board allows plus 10 usec. When the data is read, it only contains valid complete sets of multiple samples with no data being required to be thrown away.
There is a samples per channel but that is for finite acquisition. It does not specify to acquire a given number of points at high rate and then repeat that at a slower rate.
03-24-2008 04:01 PM
Hi SteveP,
I understand that you are configuring a task that takes 8 (or 100) samples from each channel of the USB-6008 multiple times; and when you try to sample from the same channel again you need to assign a new channel name. Are you getting a specific error at this point? I’m asking this because you should be able to sample from the same channel more than once without renaming the channel. Does the same behavior happen if you try to use one of the shipping examples? If you try to resample from only one channel, do you have to rename the channel in order to sample from it again? Or this behavior only happens when setting up the task with 8 channels? It’s hard to tell why this error could be happening without seeing your code, I would suggest verifying that the task is being handled correctly; I’m thinking that the problem could be related to not stopping and clearing the task. I hope this is helpful,