LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How Do I Keep 2 separate counters in sync.

I plan on using the new PCIe-6351 X Series hardware which incorporates 4 counters. The current code example enclosed works fine. My problem is, I need to measure position using the linear encoder task and get my instantaneous velocity (v= d/t) using the period task inside a correlated time reference. With the current code, each timed loop is out of sync so my position/period measurements are not synchronous. Is there a way to configure DaqMx to run these counters in a single synchronous timed loop? If so, how is such a configuration arranged?

 

 I am able to get the velocity using just the data from the linear encoder task, but this requires an additional software routine and my measurement accuracy suffers. It would be advantageous to incorporate an instantaneous velocity reading using the period task.

 

If a new example configuration of DaqMx could be provided, that would be great.

 

Thanks Much For The Help,

 

Darryl

Software Engineer

 

v = velocity

d = distance

t = time in seconds

0 Kudos
Message 1 of 2
(2,212 Views)

Hey

Try sharing the sample clock between two counter task or you can set then to start at the same start trigger.

Hope this helps.

 

-Lab 

0 Kudos
Message 2 of 2
(2,141 Views)