05-27-2008 06:52 AM
06-06-2008 01:40 PM
06-06-2008 03:19 PM
I think there *are* some possibilities, but you may need to change the approach just a bit. A few thoughts and comments:
1. It isn't clear whether you've properly sync'ed your 2 position measurements. Note that each task starts tracking position when you make the software call to DAQmx Start. The tasks will each buffer their position values on sample clock edges after you start the sample clock. So you need to be sure that both position measurement are started before you start the sample clock task. That'll ensure that if you read = quantities of samples from each task, they will also correlate in time. Note that the initial position value may be somewhat meaningless, depending on whether things are already in motion when you start your app.
2. While it's also possible to create a separate sample clock for each position measurement task, and to get them sync'ed with one clock derived as an integer divisor of the other, I wouldn't necessarily recommend it. It's probably much simpler to sample both positions at the higher rate, and then down-sample in software after the fact. You might find a Decimate function on the block diagram palette.
-Kevin P.
06-13-2008 09:16 AM
[...] Note that each task starts tracking position when you make the software call to DAQmx Start. The tasks will each buffer their position values on sample clock edges after you start the sample clock. So you need to be sure that both position measurement are started before you start the sample clock task. That'll ensure that if you read = quantities of samples from each task, they will also correlate in time.Note that the initial position value may be somewhat meaningless, depending on whether things are already in motion when you start your app. [...]