LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using Multiple HID (keyboards) in Labview

I'm wondering if it is possible to acquire character entries from more than one keyboard in Labview. I have a keyboard and two USB devices - barcode scanner and an RFID reader - and I need to be able to compare input from each, individually. How can I differentiate between the input devices and my keyboard? The barcode scanner and RFID reader look like keyboards to windows.
0 Kudos
Message 1 of 6
(4,999 Views)
This is what the help files say about the "Query Input Devices" function:
"Obtains information about the devices connected to the computer. The operating system recognizes more than one mouse or keyboard but interprets them to be one virtual mouse/keyboard. LabVIEW cannot return the output for each device separately but returns only the sum of both outputs."
That means that you cannot differentiate between the devices unless you know you are only the device you want when you run the program.

There is probably another issue going on here: your devices were not supposed to be keyboards in the first place. Your OS has tried to automatically install your devices for you and concluded that they had to be keyboards. This happens a lot with GPS, too: Windows tends to think that the serial connection is a mouse, automatically installs it and your pointer starts going all over the place. To fix it, you go to the device manager (windows XP/2000 - run > devmgmt.msc) and delete the installed fake keyboards. Then try to install the drivers for the devices before you hook them up. You may even be able to control the devices without installing them at all by using visa functions to do serial writing and reading. You will need to know the commands to control your devices, though. If you know what com port a device is connected to, you can use hyperterminal to verify.
good luck,

Aart-Jan van Zadelhoff
0 Kudos
Message 2 of 6
(4,975 Views)
I have heard of barcode scanners acting as keybords and that being the intended behavior. If you don't have a separate driver for the device, you will probably not be able to distinguish between the real keyboard and the device.

If your device is a USB device, it will not act as a serial device and therefore not require commands that you can test through the hyperterminal.

Sorry!
- Philip Courtois, Thinkbot Solutions

Thinkbot Solutions
0 Kudos
Message 3 of 6
(4,962 Views)
Indeed, most USB devices are not installed as being a serial device. But to be sure, I would check your device manager to see how the device got installed. Some USB devices act as serial devices. It makes a difference for Hyperterm, but not neccesarily for Visa. But foremost, install the proper drivers to prevent Windows from doing it for you. I guess that it could still act as a key wedge.

Aart-Jan
0 Kudos
Message 4 of 6
(4,958 Views)
...One Month Later... Thanks for the advice guys. For the barcode scanner, I reconfigured it to emulate a serial port and used VISA to send trigger commands to the device. (I didn't notice this capability before.) Thanks again!
-Adam
0 Kudos
Message 5 of 6
(4,905 Views)
I have more or less the same problem. How can I reconfigure an HID keyboard connected via USB in order to emulate a serial device??
0 Kudos
Message 6 of 6
(4,293 Views)