05-05-2010 11:40 AM
Hi,
I'm trying to configure the USB-6255 and the USB-6259 to capture data and I'm having a sample clock drift issue. I'm using the analog inputs of both devices along with the buffered digital inputs of the 6259. I've set everything to sample at 5500 samples per second per channel.
I take the waveforms from each task in 1000 sample chunks and, correcting for the t0 offset, feed them into a strip chart.
After an hour or so of running, the two devices have drifted apart enough that a common signal to them shows more than 2 seconds delay from one to the other.
Because these are USB devices, they don't have an RTSI. I'm using three separate tasks in MAX (6255 80ch AI, 6259 4ch AI, 6259 32ch Buffered DI). I'm not using any counters, or analog outputs.
Is there some way that I can get these devices to use the same sample clock for all tasks? I can deal with an initial offset from one task to another, but its killing me that this offset varies over time.
I'm using LabVIEW 2009 professional development system.
In MAX, my tasks are configured for continuous sampls, 1k samples to read, 5.5kHz rate.
Under 'Advanced Timing', the sample clock type is set to internal. If I try to set this to something else, I get errors.
I expect that I have to have an external connection between the two devices to share a sample clock, but I can't figure out which pins are appropriate and what I should set the 'Advanced Timing' settings to in MAX.
Tobin
05-06-2010 05:26 PM
Hi Tobin-
Measurement and Automation Explorer will allow you to use an external clock in a task, but it will not allow you to export a clock from your device. As such, you will only be able to share a clock using LabVIEW.
Here is a link that demonstrates how to synchronize two USB devices. It exports a sample clock from one device on a PFI line. Connect this PFI line to a PFI line on your second USB device. Then the second task uses its PFI line as the source of the sample clock.
Hopefully this helps as you synchronize your devices. Best of luck with your application!
05-17-2010 09:46 AM
GParente,
I think you may have given me the perfect solution. I haven't tried it yet because I broke my application while attempting to make it an executable. After I get it functional again, I'll implement your suggestion and see if it fixes my drift problem.
Thanks alot!,
Tobin