LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

push buttons hardware with usb-6008

I'm creating this whack a mole game.. how to do I implement the push button switches hardware connected to the NI-USB6008 input? Can someone give me a headstart pls? I'm stumped.. 
0 Kudos
Message 1 of 12
(3,419 Views)

Please don't tell me you attached a VI that was set to run when opened.

 

I try downloading your VI and it popped up with a dialog box saying there is no disk in the drive, and to put a disk into \Device\Harddisk3\DR7.  That or it seemed to be looking for an H: drive.

 

As for switches, look at page 21 of the manual http://www.ni.com/pdf/manuals/371303l.pdf.  It shows a switch connection a digital input pin to ground.  But also a resistor between the digital input pin and +5V to pull the voltage level back up when the switch is open.  Although I'm not sure that the pull up resistor is truly critical.

0 Kudos
Message 2 of 12
(3,416 Views)
Sorry.. here's the VI
0 Kudos
Message 3 of 12
(3,414 Views)
can anyone give me a headstart on how to do it using 6211 instead? thanks
0 Kudos
Message 4 of 12
(3,390 Views)

The 6211 only has 4 digital inputs, while the USB-6008 has 12.  Why would you change cards now?  Although you could connect your switch between a voltage source and an analog input and measure the analog voltage to essentially turn it into a digital input.

 

What more information do you need?  Have you looked at the DAQmx examples in the example finder yet?

 

 

0 Kudos
Message 5 of 12
(3,380 Views)
well its because I have two DAQs.. I was thinking of using the analog input part of the 6211 for the push button switches, is that possible?
0 Kudos
Message 6 of 12
(3,371 Views)
Sure.  You will have to wire your switch to +5VDC on one side and the analog input on the other side.  Due an Analog 1 sample read.  If the voltage is >2.5V than the switch is depressed.  If is <2.5V than it is open.  Whether you will need to put in any bias resistors, I just don't know.
0 Kudos
Message 7 of 12
(3,353 Views)
thanks for the advice.
0 Kudos
Message 8 of 12
(3,328 Views)
I've done the hardware part, can someone give me a headstart or give me clues on how to start the programming part please? I'm using two 6008 DAQs, 1 for the switches and 1 to light up the LEDs.. 
0 Kudos
Message 9 of 12
(3,319 Views)

Look in the example finder for numerous examples using DAQmx.

0 Kudos
Message 10 of 12
(3,307 Views)