Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Connecting a micro switch to count number of times circuit is closed

Does anyone know if it is possible to connect a micro switch to a USB-6008 to count the number of times the circuit is closed? 

 

Here is my logic.  I'm thinking I can connect the NO 3 terminal on the switch to one of the voltage outputs on the DAQ (+5V or +2.5V) and the COM terminal to a digital input on the DAQ.  I think a simple boolean structure in LabVIEW would then check if the switch is closed or open.  If closed, add one to a numeric counter, if open, do nothing.  The switch will only be closed around one time per second.  

 

Any help would be greatly appreciated!

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

Hi Csossi,

 

The USB-6008  has a counter that will do this counting task for you.  If you open up LabVIEW and then go to Help>Find Examples, the example finder will open. Once it loads, click on Hardware Input and Output>DAQmx>Counter Measurements>Count Digital Events.vi.  This should be all you need to set this counter task up. 

-John Sullivan
Problem Solver
0 Kudos
Message 2 of 2
(3,111 Views)