Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

How to specify gate and source using QAQmx on LabView 7.0

Mushi-

There are examples that ship with DAQmx that will show you how to do buffered event counting. You can find them in example finder. The explicit names of the examples are "Count Digital Edges-Buffered-Finite-Ext Clk.vi" and "Count Digital Edges-Buffered-Continuous-Ext Clk.vi" In these examples, the "Sample Clock Source" is connected to the GATE of the counter. The SOURCE isn't configured in the example, but you could configure it by changing the "Input Terminal" property for the edge counting task. The key difference between simple event counting and buffered event counting is the timing VI.

gus....
0 Kudos
Message 31 of 33
(1,534 Views)
Gus;

I looked at the examples before but if you run the examples although it sais its buffered it really gives you an output of simple event counting. Maybe I didnt explain myself properly. Lets say your gate is 1Hz and your source is 10Hz so between each succesive gates you should resd 10 pulses. The Simple event counting (traditional DAQ)would read like this: (10,20,30,40,.....) The Buffered Event counting (Traditional DAQ) would read like this (10,10,10,10,...)
I know its not that important but If I look at the examples my reading is like in the simple counting example i.e. (10,20,30,40,.....). Is there a way that in DAQmx you can actually achieve to count properly i.e. (10,10,10,10,...). I am sorry if this is insignificant but as my supervisor says everythig we do we do as professional and it just seems if there was a way to do it in traditional DAQ there should be a way of doing it in DAQmx.

thanks,

mushi
0 Kudos
Message 32 of 33
(1,533 Views)
mushi,

Hang in there, you're really close. In fact, I think it's just a question of terminology.

Back in traditional NI-DAQ, "Simple" Event counting meant there was no buffering at all, that is, no Gate signal at all. You would simply use software calls to read an instantaneous snapshot of the count. Buffered Event counting used a Gate signal so that instantaneous snapshots would get stored to a buffer using hw timing.

You latest msg to gus suggests that you are achieving buffered event (edge) counting but that what you really want is buffered period measurement. Try changing the DAQmx Create Channel vi to be Counter Input-->Period. You may want to set the "Units" input to be "Ticks". (You'll also need to update the channel property node where you specify the input terminal for the source signal by selecting it from the Counter Input-->Period menu.)

Buffered Period measurement will give you a buffer of values like (10,10,10,...).

-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 33 of 33
(1,525 Views)