How Can I Monitor a Joystick, Keyboard, or Mouse in LabVIEW?Primary Software: LabVIEW Development Systems>>LabVIEW Full Development SystemPrimary Software Version: 7.1 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. 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 Developer Zone Community: Monitoring Mouse Movements and Clicks. An example of keyboard monitoring can also be found at Developer Zone Community: Monitoring of Keyboard Buttons that are Pressed. Related Links: Developer Zone Example: Reading a Joystick's Status Developer Zone Community: Monitoring Mouse Movements and Clicks Developer Zone Community: Monitoring of Keyboard Buttons that are Pressed Attachments:
Report Date: 10/31/2003 Last Updated: 04/30/2009 Document ID: 32UBKD28 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
