My mistake -- I thought I recognized your board # 6010, but I was wrong. I've never used one of those "B-series" boards, but having just looked at the online help I'd have to agree that triggering should be an option.
That should make the app easier. The idea will be to configure both encoder tasks to use a digital "Arm Start" trigger which will make them be sync'ed in time, provided they are both started before the trigger signal arrives. I often like to generate the trigger signal with a digital output so my program can control the timing sequence. I'll try to modify your post to make an example. However, since my LabVIEW PC is far from my network PC, it may be a little while before I can examine and modify it.
Meanwhile, more explanation about what's happening now. First consider the case where the encoder is constantly spinning and generating pulse edges. Now your program starts up and one of the encoder tasks executes 'DAQmx Start.' The counter will immediately start counting timebase cycles to measure time. When an encoder edge comes along, the count value gets buffered, then the count resets to 0, and keeps on counting additional timebase cycles. The next edge buffers another count value and resets count to 0, etc. Sometime a little later, let's say 19 encoder edges later, your *other* encoder task executes 'DAQmx Start' and does the same thing. Both will show the same measurements during the time that both are running, but the earlier task will contain a bunch of samples prior to the time the later task started. That's why you get an offset in the data arrays.
Now consider the case where the encoder is stationary. You start your program and the earlier task executes 'DAQmx Start.' The counter immediately starts counting timebase cycles, but nothing gets buffered yet because the encoder isn't moving. Just a little while later, the later task executes 'DAQmx Start.' It doesn't buffer anything either. Finally, you move the encoder to create a sequence of edges. Since both tasks are already running and waiting for those edges, then they buffer their data in sync with one another. All the array elements (except for the very first one) will match up. The difference in the values of the first array elements is the time difference between when the two tasks really started.
If you instead program both tasks to use an "Arm Start" trigger, and you can make sure that the tasks have both started before the trigger edge happens, then your data will be sync'ed no matter whether the encoders are moving or stationary. Even the first array element values should match. Then you can be confident about capturing 2 different encoder signals.
-Kevin P.
ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.