11-20-2008 02:12 PM
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!
11-21-2008 05:53 PM
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.