LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Counting edges with the NI USB-6525

Solved!
Go to solution

The idea is as follows, input p1-3 of the 6525 receives a digital signal as shown in the waveform graph, times are in seconds. The same digital signal is also fed to input P1-7, which acts as a counter. Input p1-7, configured as a counter, counts the rising and falling edges of the digital signal. What I don't understand is why the count reaches 8, when it should be only 4.

 

For some reason the count always starts at 2, then counts the four edges of the signal, and always ends with 2 more counts, totalizing 8 counts. The problem is the 2 counts at the beginning and at the end.

 

I still don't understand why this happens.

 

Has anyone had this problem?

 

rntaboada_0-1690301168984.png

 

rntaboada_1-1690301253297.png

 

LabVIEW 2015 SP1

NI USB 6525

 

0 Kudos
Message 1 of 3
(555 Views)
Solution
Accepted by topic author rntaboada

I don't know the 6525 device specifically, but from the looks of things, I suspect that there are some real and legitimate digital transitions that the counter task is catching in hardware but which the digital input task is missing because you only poll the value at ~10 Hz.  Very short pulses would cause the counter to increment but would not be seen by the digital task if they happen during the time between the polling reads.

 

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 2 of 3
(527 Views)

Hello Kevin_Price. I think you are right. I was thinking in very short pulses too, I will check.

Thank you for your time.

0 Kudos
Message 3 of 3
(481 Views)