LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview VI to read data from a PS/2 keyboard or mouse

Is there a Labview VI to read data directly from a PS/2 keyboard or mouse? Or alternatively a LabView VI to do the same from a PS/2 device connected to a NI DIO board?
 
I would like to use the output of an optical mouse encoder as an input to a LabView program. I can do it via the PS/2 port (I am using a USB mouse, so the PS/2 port is empty) or via a NI DIO card.
 
Any thoughts, hints?
 
Thank you very much
Costas Pitris
0 Kudos
Message 1 of 5
(3,462 Views)
At least since LabVIEW 8.0 there are VI's in the palette to grab data from the mouse and keyboard. They shouldn't care if they are USB or PS/2. This might go back to 7.1 or 7.0. I don't have them installed right now so I can't check.
 
Look in the "Connectivity>Input Device Control" palette.
 
Ed


Ed Dickens - Certified LabVIEW Architect
Lockheed Martin Space
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
0 Kudos
Message 2 of 5
(3,444 Views)
Is this a second keyboard/mouse distinct from the one that the PC itself uses?

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 3 of 5
(3,437 Views)

 

 

Yes! Indeed, we are talking about a second mouse keybord and not the one that windows uses as to move the cursor or input text.

Put another way, what I am looking for a is a set of vi's to read and write bytes to a PS/2 device.

 

Thanks

Costas

0 Kudos
Message 4 of 5
(3,418 Views)
For pre-built functionality within LabVIEW, there are VIs which use DirectX calls to directly read input devices (mouse, keyboard, joystick) on the Connectivity->Input Device Control palette.  Another possible option would be to use a joystick as the input. 
 
Let me know if you have any more questions.
 
Regards,
 
Craig D
Applications Engineer
National Instruments
0 Kudos
Message 5 of 5
(3,376 Views)