Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

timing off

Hi, when i set up a counter using DAQmx, and set the frequency it appears that the actually frequency is always half of what i set it.

For example, if i set the counter frequency to 0.25, the actual frequency is 0.5.

Any ideas why this is happening?

I'm using the M series PCI 6221 board.

Thanks
0 Kudos
Message 1 of 4
(3,678 Views)

Is it a factor of 1/2 or 2?  Your message said 1/2, but the example you cited represents a factor of 2...

How are you "measuring" the actual frequency?  Are you by any chance driving some other task with an internal signal named 'Ctr0InternalOutput'?  Though it isn't obvious, that signal will actually produce 2 internal pulses per cycle of the pulse train.  The physical output pin toggles its digital state each time the '...InternalOutput' signal pulses.  So 2 internal pulses = 1 external pulse cycle.

In such a situation, the physical output pin operates at the requested frequency while the 'InternalOutput' internal signal operates at twice the requested frequency.  If your situation is something different, post back with some more details...

-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 2 of 4
(3,676 Views)
You're right.. i'm just measuring the time the signal stays high or low, while a full cycle is high + low.

THanks!!
0 Kudos
Message 3 of 4
(3,669 Views)

Correction to my previous post:  I'm not so sure about my comments regarding the difference between Ctr0InternalOutput and Ctr0's output pin.  I *think* it depends on some other settings too, such as the property specifying whether to pulse or toggle on terminal count. 

Here's a thread with some relevance.  I believe that it's *possible" for Ctr0InternalOutput to produce 2 rising edges for every 1 rising edge at Ctr0's output pin, it isn't true all the time.  In fact, for pulse generation I (now) believe that by default the internal and external signals will be the same.  One needs to purposefully change to "pulse on tc" mode.

I think.

-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 4
(3,653 Views)