Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Pulse Edge Counter VI Too Slow?

Hi everyone,

 

I'm trying to write a VI based off of one described here that counts the number of rising pulse edges from an external function generator with a frequency of 7.7KHz using the USB 6211 DAQ.

 

The function generator is plugged into Ctr 0 in the DAQ. A pulse train with user defined parameters at Ctr 1 is used to buffer the input signal. Ideally, I want the VI to count and sum the number of pulse edges. When the count reaches an arbitrary number (i.e. count = 256), it should reset the count and add one to a separate count to keep track of the number of "resets."

 

The pulse train I'm using to buffer the 7.7KHz input has the parameters of 16KHz, a duty cycle of 0.50, and an idle state of low.

 

The problem with my VI is that the count numbers doesn't match the frequency of the input signal. Running the VI for 10 seconds should give back a "reset" count around 300 based on the input frequency. But in actuality, I'm seeing only around 100. I am sure that this is not a hardware issue since running the example Count Digital Events.vi returns an accurate count. Running my VI in the highlight execution mode returns an Error -200279.

 

I attached the VI that I'm currently working on using LabVIEW version 8.0. I would appreciate any input.

 

Thank you for your time,

admlam 

0 Kudos
Message 1 of 4
(6,276 Views)

Hi admlam,

 

 I have attached a VI that I think will accomplish what you want.  You shouldn't need to use buffered event counting.  

Regards,
Jim Schwartz
0 Kudos
Message 2 of 4
(6,262 Views)

Hi, I pretty much have the same question. But I have LabView 7.1 & can't seem to open the "Count Digital Events_reset.vi". Can you post one that is compatible with my version?

 

Thanks!!

-c

0 Kudos
Message 3 of 4
(6,118 Views)

Hi christineeun,

 

Here is an image of the code:

 

Count digital events reset.JPG

Regards,
Jim Schwartz
0 Kudos
Message 4 of 4
(6,105 Views)