Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

How to start 2 counters with precision shift? LV7.1,6602

I tried to run 2 counter outputs triggered from 2 different sources using LV7.1 and 6602 card. It seems like both of them can only catch same trigger.How possible start 2 counters with precision shift?
0 Kudos
Message 1 of 5
(3,649 Views)

Can you provide a little more detail? Are you trying to start two pulse trains, single pulse outputs? What kind of precision do you need.  I might have an answer but need to make sure I understand the question.

 

Paul

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 2 of 5
(3,645 Views)

Most likely you are trying to synchronize two outputs to a single gate so you have two outputs with a precision delay between them.  There are multiple ways to do this, a simple method is put out a single high pulse out of counter0 and send it to the gate (can be internal or external routing but internal is easiest) and set counter1 to output on the rising edge of the gate and counter2 to gate on the falling edge (settable DAQ properties for a task/channel) now the output will have a delay of known time between them.  There are a few other solutions if you are interested.  The 6602 has a 80MHz clock which has enough time resolution for most applications.

 

Paul

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 3 of 5
(3,644 Views)

Just to add a few thoughts to Paul's earlier reply:

What he described will help you to generate single pulses from ctr1 and ctr2 with a precision time delay between them.  With some care in setting all the pulse specs (high time & low time), you may be able to extend his method by generating a pulse train on ctr0 (rather than a single pulse) which can in turn cause ctr1 and ctr2 to generate pulse trains with that same precision time delay between them.  In either case, ctr1 and ctr2 would need to be configured for re-triggerable (single) pulse generation.  So long as ctr0 keeps re-triggering them at a constant rate, they will keep producing single pulses at a constant rate.  To the rest of the outside world, ctr1 and ctr2 will look like they are generating continuous pulse trains.

Again, it takes some care to get all the pulse specs right -- if you can describe your specific timing needs, I could help you to get them defined properly.

Also just to let you know that your first post was correct as far as it went -- only 1 signal's active edge can be designated as a digital start trigger for continuous counter tasks.  If you have multiple counters in multiple continuous tasks, they would need to share that one trigger signal's edge.  However, because the counters are quite flexible, there are often ways to work around this limitation.  Here ctr1 and ctr2 are used in a re-triggerable single pulse mode, so they can be re-triggered by different edges of a single signal from ctr0.  It would also be possible to have them re-triggered by 2 independent 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.
Message 4 of 5
(3,640 Views)
Tanks, it's very useful.
Same way described in example vi, that I have got from NI support.
Remain last problem - the re-triggering mode doesn't stop by "Counter (reset)"vi.
The only thing I found to stoping counter is to reconfig the Cntr0 to "wait Trigger mode".
0 Kudos
Message 5 of 5
(3,633 Views)