Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Document Type: Example Program
NI Supported: Yes
Publish Date: Feb 1, 2008


Feedback


Yes No

Related Categories

Related Links - Developer Zone

Related Links - Products and Services

Joystick Inputs with DAQ Card Outputs.

0 ratings | 0.00 out of 5
Print

Overview

This example takes inputs from a joystick, scales the data and outputs to a DAQ device. This input only takes the X-axis data but can be expanded to use X,Y, and Z axes.

Downloads

Filename: joysticktodaqoutput.vi
Requirements: View

It will take a bit of customization based on your specific joystick, but it is possible.
 
If you are using a DAQ card that has an analog output range from -10V to +10V then you simply need to scale the output of your joystick so that it's range is from -10 to 10 and use this value as the input for your DAQmx read. As is illustrated in the picture below.
As you can see the data from the joystick comes in as a cluster you simply need to unbundle the specific pieces that you wish to use and scale accordingly. In this example the X axis is divided by a certain factor in order to scale it into a usable range.
If your device does not support negative ranges it is also possible to accomplish this you will need to shift your input up so that the largest negative value is 0. The concept is illustrated in the following picture.
this example adds the largest negative value that the joystick outputs (in this case 32768) in order to make all values positive, and then divides by a scaling factor. This scales the data so that it is between 0V and 5V, which is the output range of the USB-6008/6009.

Requirements


Filename: joysticktodaqoutput.vi

Software Requirements


Application Software: LabVIEW Professional Development System 8.0

Hardware Requirements


Hardware Group: Multifunction DAQ (MIO)
Hardware Model: USB-6009, USB-6008
Driver: NI-DAQmx 8.3

 
0 ratings | 0.00 out of 5
Print

Reader Comments | Submit a comment »

 

Legal
This example program (this "program") was developed by a National Instruments ("NI") Applications Engineer. Although technical support of this program may be made available by National Instruments, this program may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this program with each new revision of related products and drivers. THIS EXAMPLE PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).