01-28-2009 01:18 PM
I am using the Resample Waveforms (continous).vi to resample waveforms at a slower rate than the acquisition is taking place. I am doing this because I am using an NI-9237, which has a minimum sampling rate of 1612.9 Hz. I am acquiring from up to 12 channels of AI and resampling the array of waveforms. When I save the output of the resampling VI to a file, some of the channels have missing data for a given timepoint and sometmes the timepoint will be off. I have removed the Reasmple VI and I do not see this problem.
I have attached a screenshot of my VI and of the saved data file (time is leftmost column, one column for each channel).
Dan
01-28-2009 06:09 PM
Dan,
Is the sampling Rate Control's value a perfect divisor of 2000 (the sample clock speed)? If not you may see such issues.
There is an output called t0 adjusted warning. Check that too.
Amit
01-28-2009 08:37 PM
Amit,
I am using the "Coerce" interpolation method when I see the error. I don't understand how this can happen, even with non-perfect divisor sampling rates. Shouldn't the Resample function just find the index of the closest timepoint?
I do not see any t0 adjustment warnings.
Dan
01-28-2009 09:22 PM
This may be an issue with the rounding off of dt. 300Hz doesn't round off perfectly. Can you try with 500 Hz?
01-28-2009 09:37 PM
I still see the problem when using 400 Hz, or 500 Hz.
I am even getting garbage and duplicate timepoints in my data file.
Thanks
Dan
01-29-2009 09:42 AM
Dan,
Instead of using a delay of 100ms can you try wiring 200 to the Samples per channel fo the DAQmx Read?There may be a chance that the amount of data being read is causing a problem.
Also can you check the dt of the output waveforms? is it exactly what you specified in the input?
Amit
01-29-2009 12:43 PM
Amit,
I ran some more tests. I should have mentioned I was using a simulated device (as I do not have the actual hardware yet) to troubleshoot my application. I happen to have another peice of "real" hardware that I tried and I cannot seem to duplicae the issue with it. I need to wait for my actual cDAQ to arrive before I can be sure, but this seems to be the problem. It still doesn't make sense to me since using the simulated device without the Resmaple VI produces accurate "simulated timepoints. It's when I introduce the Resample that I have problems.
Thanks
Dan
07-06-2011 11:51 AM
DBerry, did you solve this issue of yours? if yes, can you please share your experience?
07-06-2011 01:01 PM
I believe this was due to using a simulated device that was not generating unique/accurate timestamps. Are you experiencing this issue with "real" hardware? Can you verify that you are not getting duplicate time points?
Dan
07-06-2011 02:36 PM
DBerry, I am having this problem with a simulated device... haven't tried it out with a real hardware... will try it and let you know. I am using USB-6229 with AI and a RPM pickup(frq input). will this 2 DAQmx tasks worsen the problem?