Example Code

Joystick Emulator Using LabVIEW

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Overview

This example employs the Picture control and LabVIEWs drawing VIs.

 

Description

The example uses the mouse position and mouse button down notification to redraw the joystick as your mouse is moved across the picture control surface. The mouse position on the picture is then output as the joystick location. You may need to modify the output of the joystick for your specific application. For example, you may need to rotate the coordinate system employed by the mouse position indication to allow the joystick output to be used for tank drive robot control. An example of this can be found in the community in the Joystick to Tank Drive Example.

 

Requirements

Software:

  • LabVIEW 2012 (or compatible)

 

Steps to Implement or Execute Code

1. Run VI.
2. Move the red dot on picture control and observe the position of joystick.

 

Additional Information or Resources

 

2012.png

 

 

**This document has been updated to meet the current required format for the NI Code Exchange.**

 

 

 

 

 

Asa Kirby
CompactRIO Product Marketing Manager
________________
Sail Fast!

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
Jon236
Member
Member
on

can you post a 8.5 version for those of us in the FIRST Community?

Captain_Kirby
NI Employee (retired)
on

8.5 version uploaded. Enjoy!

Asa Kirby
CompactRIO Product Marketing Manager
________________
Sail Fast!