Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Initial delay on counter 0 terminates to soon.

I'm trying to generate a single pulse after an initial delay. This is done for counters 0, 2, 4 and 6 on the PCI 6602 board. On counter 0 the pulse is generated after half the configured inital delay. The other counters work as configured.
0 Kudos
Message 1 of 4
(3,372 Views)
Hi Erik,

How are you configuring the counters? Are you using an internal timebase as the source? How are you configuring the pulse generation? Are you specifying it in terms of frequency or seconds or number of source edges?

My initial impression without having tried it yet is that the counter is configured assuming a different source frequency than it actually has.

What happens when you simply try to configure only counter 0? Does it work correctly on its own? This will give us an indication of if the other counters are affecting counter 0. If you do get counter 0 to work, slowly add counters until it fails. Hopefully we will be able to isolate if the failure is programming or hardware related. Hope that helps. have a good day.

Ron
0 Kudos
Message 2 of 4
(3,372 Views)
Hi Ron,
thanks for your answer.
I'm using an external pulse to source(0). I've included the vi that prepares counter 0, if you'd like to take a look please. How should I configure the timebase if an external pulse is connected to the source pin?

I'm using the output of counter 0 to trigger a second counter to generate an exact pulse with retriggerable pulse generation.

Cheers, Erik
0 Kudos
Message 3 of 4
(3,372 Views)
Hi Erik,

The external timebase is causing your problem. This is not to say you can't use the external timebase. Since you are using the Set Pulse Specs.vi, you can't use the "pulse specs(secs)" or the "pulse specs(freq/duty)" parameters with an external source. You will have to use the "pulse specs(raw)" terminal to configure your pulse.

The way the raw pulse specs work is that you specify how many source edges will make up the delay of your pulse and how many source edges will make up the pulse width. Therefore, if you have a 100kHz external source and you want a 100us pulse with a delay of 100us then you would specify raw pulse specs of 10 and 10 respectively.

Hope that helps. Have a good day.

Ron
0 Kudos
Message 4 of 4
(3,372 Views)