Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

synchronize two counter outputs on 6071E card

Solved!
Go to solution

Well, it's the usual how do I synchronize two counters problem.

 

I'm using the 6071E with DAQmx .NET 4.0. I define a Task and attach to it two counter output channels with implicit timing and zero initial delay . When running the program

I catch the first edge with a scope single trigger. There is always a delay between the first edge of ctr0 and the first edge of ctr1 of 16.3 microsecs. Is there a way, besides setting the initial delay of ctr0 to 16.3 microsecs, to make the counters to always start together? what is the source of the delay(software/hardware) and should it always stay constant.

 

any help is welcome

0 Kudos
Message 1 of 3
(5,667 Views)
Solution
Accepted by topic author ikol

The source of the delay is that despite being in the same tasks the counters are still started sequentially by software.  I'm surprised the delay you are seeing is constant.

 

If you want the counters to start together you should configure a start trigger.  Once you start the counter tasks in software, issue the start trigger to begin generating your output pulses.  The start trigger must be a hardware signal--as an example you might configure a software-timed digital output and wire it back in to one of the PFI lines.

 

If you want to avoid any additional wiring, you could split the counters into two separate tasks.  Trigger one counter with the internal output of the other (start the task that is going to be triggered first).  Doing this instead of using an external trigger, I would expect an additional delay between the counters on the order of 100 ns as the initial delay is at minimum 2 timebase ticks.

 

 

Best Regards,

John Passiak
0 Kudos
Message 2 of 3
(5,664 Views)

Thanks man. It worked.

0 Kudos
Message 3 of 3
(5,649 Views)