04-20-2012 10:52 AM
Hello,
I am trying to use the NI 6602 counters to generate 4 pulse trains that start together but then proceed with each counter producing its own number of pulses (Finite mode) with its own frequency.
It seems that wiring each of the 4 channels to the same task forces each channel to produce the same number of pulses based, apparently, on which channel was last in having the NumPulses value specified for its the DAQMx Timing (Implicit) VI.
I tried using separate tasks for each channel but it seems that the there is much more uncertainty in the initial start of the pulse train on each channel: Single Task ~13us (consistent) delay between channels, One task for each channel +-15us (variable) ... though I'm not entirely confident in these timing measurements (estimates from oscilloscope). So it seems like I'm sacrificing some synchronization to produce a different number of pulses for each channel?
Is this true or is there some other way to synchronize the start of independent pulse trains.
Vadim
Solved! Go to Solution.
04-20-2012 11:19 AM
You should be able to sync the start of 4 separate counter output tasks by having them all
look for a common Start Trigger signal. You can easily make the trigger signal yourself on
(for example) PFI_0 by using a digital task to toggle DIO_0.
-Kevin P
04-20-2012 01:17 PM
Kevin,
Thank you for the response. I tried generating a digital output on one line and using that line as trigger source for the counters but I am now only able to get one pulse from each channel (per trigger as opposed to a finite train of pulses). Is there a particular way the Digital Output channel needs to be configured?
Vadim
04-20-2012 01:52 PM
Oops, I see that I was generating only a single pulse on each channel because the VI was ending before the tasks completed. Having put in a Wait Until Done for each channel's task, I got all the pulses on each channel. Furthermore, the start of the pulse trains is synchronized to within 500ns (or better).
Thank you for your help, Kevin!