Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Better documentation/overview of counter VIs?

I've been looking though both NI's website and included documentation that comes with the counter VIs and so far I've been unable to find any overview document that says how counters work and what all the terminology means.

The examples could be of some help, though I'm at a loss as to how to use them as examples because I haven't found any document that tells me what cool things I can do with the examples. In other words, I gathered enough information to realize that several of the example counter VIs work together to demonstrate how counters should work, but I haven't found documentation that tells me how use the VIs together to produce the desired result.

All the documentation seems to assume that the reader knows
what counters are capable of and what all the terminology means. Are there any docs available that don't make that assumption?
0 Kudos
Message 1 of 4
(3,704 Views)
Hello RobA,

Your question is a very interesting one since we are used to answering the other way. National Instruments does not develop solutions, but rather tools. With the tools that we develop, there are way too many possible applications to list. If you have a specific application and is wondering if you can use counters, I can help. But if you just need solutions, check with one of our alliance members at http://digital.ni.com/productpages/nialliance.nsf/main?readform.

Serges Lemo
Applications Engineer
National Instruments
0 Kudos
Message 2 of 4
(3,703 Views)
RobA,
I *think* there are some presentation files here on the ni website, but I didn't find them with a quick search.
When I was first starting to goof with counters, there were a few key concepts that really helped me "turn the corner" in my learning. Here they are:

"Source" terminal
TTL transitions on the source terminal will cause the counter's internal count register to increment. A counter can be made sensitive to either rising or falling edges at its source terminal. It can also be programmed to decrement rather than increment, or even have inc/dec controlled by a DIO bit.

"Gate" terminal
This is the more complicated one. It boils down to the idea that the Gate is a control terminal, but there are a couple distinct kinds of control it can do.
The first function is to control whether or not to "pay attention to" the Source edges. A counter could be made to increment only on Source edges that occur while the Gate signal is High. It's essentially an Enable signal. The counter acts as though it only sees the logical AND of Source and Gate, so no edges are seen when the Gate is Low. (Note: the description so far would be an active-high Gate. It's also possible to program an active-low Gate). Under DAQmx, this function is called "Pause Triggering."
The second function is to control when to transfer the value of the count register into a data acquisition buffer. This type of control acts like a sample clock, which is just what DAQmx calls it. You simply sample of the count register value on each rising Gate edge. (Note: can alternately sample on falling edges).

"Terminal Count"
When a counter reaches its maximum 24-bit (E-series MIO boards and others) or 32-bit (M-series MIO boards, 660x counter/timer boards) value, it simply wraps back around to 0 and keeps counting. Each time it reaches this "terminal count", it generates an internal pulse signal and sets a boolean property flag.
A counter can be programmed to push this pulse signal out to its output pin, where it can be used for various purposes. It could alternatively be programmed to toggle the output state between High and Low each time the TC is reached.

Hope this helps some...

-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.
0 Kudos
Message 3 of 4
(3,706 Views)
RobA,
Just a quick followup: Another useful summary of terminology can be found
in the NI-DAQmx help file under Key NI-DAQmx Concepts -> Counters -> Counter Parts.
It's probably more of a reference than tutorial as the info is fairly dense.

-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.
0 Kudos
Message 4 of 4
(3,689 Views)