LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Joystick Sychronization

Helo GUys.. Jus wanted to ask is there any way i can like sychronize the voltage given out of the NI-USB 6008 according to the joystick value??

 For Example... At Centre.. The x and y axis are both at (-256) coordinates.. The MAX coordinates when i tilt the joystick fully to the right makes the x-axis at (32767) coordinates,, What i want is to make is like when joystick is at centre , it gives out a 2.5 Voltage and as i slowly tilt the joystick to the right, the voltage slowly increases till 3.5voltage max..  Anyone cAn Help?
0 Kudos
Message 1 of 9
(4,072 Views)
Hi Sena_Scott,

I was wondering if you could give the actually voltage output of the joystick. Taking this range, you can map the voltage to the joystick position value using scaling functions. You can access this in Measurement and Automation Explorer.



There is a good article in the NI-DAQmx Help file called "Custom Scales", you can find more information in there.

Regards,
Kent
Applications Engineer


Message Edited by tnek on 04-11-2008 10:31 AM
0 Kudos
Message 2 of 9
(4,049 Views)
Hi, Thanks for the help.. However i kind of confused of the part for calculation.. Can you teach me? i not sure wat values to put in the slope and y-intercept.. And what about the joystick coordinates? Below are the x and y axis coordinates of my joystick..                                            
                                                                          UP
                                                                       -256(x)
                                                                     32767(y)

                                            LEFT                                                 RIGHT
                                        -32768(x)                                             32767(x)
                                           -256(y)                                                -256(y)
 
                                                                       DOWN
                                                                       -256(x)
                                                                      -32768
0 Kudos
Message 3 of 9
(4,026 Views)
Hi Sena_Scott,

Here are the equations you can use to enter the scale.



I assume this joystick has an analog output for the x-axis and another one for the y-axis. You will need to apply this scale to both inputs. Let me know if this helps.

Regards,
Kent
Applications Engineer


Message Edited by tnek on 04-14-2008 04:36 PM
0 Kudos
Message 4 of 9
(4,003 Views)
Hi..  Just wanted to say the joystick only gives out coordinates, all the analog outputs are given out using numeric constant... i wil attached the fiel below for better understanding.. Btw, jus wanna ask how do i use of the Scales i create in Measurement and Automation Explorer into my VI??
0 Kudos
Message 5 of 9
(3,990 Views)
Sorry, Here's the attached file..
0 Kudos
Message 6 of 9
(3,985 Views)
Hi Sena_Scott,

Sorry, I misunderstood what you were trying to do (I thought you were trying to input voltages and convert that to coordinates). For the other way around, you may want to check out this example program. I believe this is pretty much what you are trying to do. This is set up for one axis but you can expand it to both axes. The divisor acts as the slope and the lowest value acts as the y-intercept. Let me know if this helps.

Regards,
Kent
Applications Engineer
0 Kudos
Message 7 of 9
(3,949 Views)
To reply to your other question of how to get DAQmx scales into your VI, here is a screenshot. You can enter the scale using the Custom scale name terminal on a DAQmx Create Task function or using the Custom scale name property in a DAQmx Channel Node.



Regards,
Kent
Applications Engineer


Message Edited by tnek on 04-16-2008 09:41 AM
0 Kudos
Message 8 of 9
(3,942 Views)
Hey tnek.. Thanks alot for the help.. I managed to solve my problem.. NIce knowing you... ^_^
 
0 Kudos
Message 9 of 9
(3,921 Views)