LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to use daq to build a counter?

have a  signal with a frequency btw 200hz/s to 0hz/s , want to use DAQ input to build a counter on PC, just like to know the way (or VI names ) to do it
thanks 
0 Kudos
Message 1 of 11
(11,175 Views)
That depends on the DAQ board you have. Many have a counter. You would then use either the DAQ Assistant or the lower level DAQmx functions. Look at the shipping examples under Hardware Input and Output>DAQmx>Counter Measurements>Digital Frequency. If your board does not have a counter, then you can acquire an analog signal and process it with the Express VI Tone Measurements or the Extract Tone function.
0 Kudos
Message 2 of 11
(11,169 Views)
my card is PCI 6518, actually I want just count the pulse number of an analog signal with 200hz to 0 hz
0 Kudos
Message 3 of 11
(11,155 Views)

That's not a very good card for your app. All it has is 16 digital I/O. Also, the digital I/O is static. That means that the acquisition is software timed. What you will have to do is put a digital read in a loop and everytime you see a change from a 0 to a 1, increment your counter. If you have the full version of LabView, you can use the Boolean Crossing PtByPt. In the example below, you would replace the Boolean labeled 'Input' with a DAQ digital read.

Message Edited by Dennis Knutson on 06-20-2007 09:30 PM

0 Kudos
Message 4 of 11
(11,141 Views)

is the looping cpu intensive ? cause we have another realtime application running on the machine,

from the data sheet, it says 6518 alse with change detection, don't know how it works, or still need writting looping code?

if  6518 not good, could you suggest a card, is 6534 ok ? or some other card.

it is said 6534 has hw change detection with no delay to trigger the aquisition, don't know if it works for us.

what we need is a fast counter (but use less cpu time ) collecting the pulse count from an analog pulse signal which is similar to a treadmill rotor output). the positive and negtive part may not equal, pulse freqency btw 200hx to 0 hz. 

the application on this machine wants to get the counter value every 200ms, so we need a daq card that doing the counting its self,

 

 

0 Kudos
Message 5 of 11
(11,123 Views)

Instead of a digital I/O board, I would recomend you get a board with a built in counter. A 200 Hz signal doesn't require a very fast counter. An inexpensive  DAQ device with a simple event counter is the USB-6501. The counter on this is for TTL level signals.

Maybe someone from NI will post here and recomend something. You can always call your local sales engineer, use the 800 number to call NI driectly, or click the 'Call Me Now' link on the Product & Services pages.

0 Kudos
Message 6 of 11
(11,115 Views)
Hi zy,
Can you describe your signal?  Any device with at least one counter, including the 6501, will work for you if your sensor generates a standard TTL signal.  If you have a pulse that is not a TTL signal, and you need the counting to be done in hardware to free up your processor, then another alternative would be an R-Series device such as the 7830R.  I should mention that the programming for an R series device is much more involved than for the 6501. 
When you are ready to program your application, I recommend that you review Building a Counter Input.
Let us know if you have any further questions.
Luke
Applications Engineer
National Instruments
0 Kudos
Message 7 of 11
(11,088 Views)

I used the diagram that you publish and its working great with my chip counter, the only problem I have is that I dont know how to raset the counter to 0 everytime I want to star all over again!

Any comments?

0 Kudos
Message 8 of 11
(9,948 Views)
You can use the Select function. Wire up a front panel Boolean to the select input, connect the shift register output to the False input, 0 to the True input, and the output to the shift register input.
0 Kudos
Message 9 of 11
(9,941 Views)

Hi guys,

 

I wonder which are the pins I need to connect in the CB-68LP to use a counter input DAQ.

 

I think it should be nr. 38 but the application doesn't work, so I begin to think I'm wrong.

 

Thank you very much.

0 Kudos
Message 10 of 11
(4,307 Views)