LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why doe Resample waveforms (continous).vi have missing data

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

Download All
0 Kudos
Message 1 of 10
(3,831 Views)

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

 

0 Kudos
Message 2 of 10
(3,814 Views)

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

0 Kudos
Message 3 of 10
(3,808 Views)

This may be an issue with the rounding off of dt. 300Hz doesn't round off perfectly. Can you try with 500 Hz?

0 Kudos
Message 4 of 10
(3,801 Views)

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

0 Kudos
Message 5 of 10
(3,800 Views)

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

 

0 Kudos
Message 6 of 10
(3,777 Views)

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

0 Kudos
Message 7 of 10
(3,765 Views)

DBerry, did you solve this issue of yours? if yes, can you please share your experience?

Now on LabVIEW 10.0 on Win7
0 Kudos
Message 8 of 10
(3,341 Views)

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 

0 Kudos
Message 9 of 10
(3,334 Views)

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?

Now on LabVIEW 10.0 on Win7
0 Kudos
Message 10 of 10
(3,320 Views)