How Can I Monitor a Joystick, Keyboard, or Mouse in LabVIEW?Primary Software: Primary Software Version: 1.0 Primary Software Fixed Version: N/A Secondary Software: N/A
Problem: I have an application that uses a joystick, keyboard, and/or mouse. How can I monitor these input devices in LabVIEW? Solution: LabVIEW 7 introduced Input Device Control VIs. These VIs allow you to monitor attached keyboards, mice, and joysticks. These VIs are found on the All Functions»Advanced»Input Device Control palette in LabVIEW 7.x and on the Functions»Communications»Input Device Control palette in LabVIEW 8.x. In LabVIEW 2012, these VIs can be found on the Functions»Connectivity»Input Device Control palette. The following example walks through how to read from a joystick input device. However, the same process applies to each type of input device.
Figure 1: Joystick Position - Block Diagram This method will work with Windows (if DirectX 8.0 or later is installed) and Linux operating systems. These VIs are not supported on a Mac OS. An example of mouse monitoring can be found at Community: Monitoring Mouse Movements and Clicks. An example of keyboard monitoring can also be found at Community: Monitoring of Keyboard Buttons that are Pressed. Related Links: Community: Monitoring Mouse Movements and Clicks Community: Monitoring of Keyboard Buttons that are Pressed Attachments:
Report Date: 10/31/2003 Last Updated: 01/16/2014 Document ID: 32UBKD28 |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

