From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

USB-6008 event counting

I am using LV 8.5 and the USB-6009 DAQ board.  I have two basic questions one related to counting edges the other with how to best handle multiple acquisitions using one board.

 

1. I have a proximity detector that I am using to detect the presence of a pump handle.  The idea is to count the number of times the pump handle moves back and forth.  The USB-6009 has one counter (PFI 0) which I was going to try to use for this.  In the LV example finder there is a VI called "Count Digital Events".  I have tried the VI and simulated a signal by simply connecting a piece of wire to the PFI 0 terminal and then touching the wire to the ground terminal of the DAQ board.  However, the count is never a single increment.  Usually the count jumps by quite a bit.  Also, the count increments when I touch the wire to ground and when I pull it away.  I do not really understand this behavior.

 

2. Also in my system, I need to montior pressure and flow.  I have sensors for this that generate an analog output.  Is it possible to have my counter running (at a high sample frequency) and to monitor these analog signals (at a lower sample frequency) on the same DAQ board without cause a conflict?

 

Thanks.

 

0 Kudos
Message 1 of 3
(2,884 Views)

CoreyNE

 

1. What you are observing is real and is called contact bounce. Switches and relays do this all the time. You basically have a poor quality switch by touching and removing wires. A clean signal source, from a function generator should yield proper counts.

2. You could probably use parallel loops- a fast one to poll the counter and a slower loop polling the analog inputs. Or set up DAQmx tasks with the corresponding sampling rates set up. I am not very familiar with this topic, so hopefully someone will verify.

 

-AK2DM

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 2 of 3
(2,877 Views)

Hi,

 

You can create DAQmx task for analog input and counter input and run them in parallel. You can refer to the LabVIEW examples for help creating DAQmx tasks. Please post if you have any questions.

 

Thank you,

Simran K
National Instruments
Applications Engineer
0 Kudos
Message 3 of 3
(2,848 Views)