Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

NI-6009 ANalog output

Hi,
     anyone can tell me is it possible to use a joystick to control the analog output coming of a NI-6009? How can i do It? am i able to control what voltage i want it to produce?
0 Kudos
Message 1 of 11
(4,362 Views)

Hi there,

It shouldn't be all that difficult.  You just need to use the device vi's to monitor the joystick (as shown in the attachment) and then convert this into the voltage you want to output.

Hope this screen shot helps

Thanks

AdamB

Applications Engineering Team Leader | National Instruments | UK & Ireland
0 Kudos
Message 2 of 11
(4,357 Views)
Hi, i able to do on the joystick part.. However can you help me in the conversion part? How am i able to get the readings from the joystick and convert it to a voltage.. I attached a VI file below, this is what i manage to do till so far, Please provide me some guidance... THanks..
0 Kudos
Message 3 of 11
(4,335 Views)
sorry the file is attached here..
0 Kudos
Message 4 of 11
(4,333 Views)
You asking for guidance but you have not provided any information at all on how exactly you want to translate the joystick movements. You have something there to translate x axis movement but what about the other axes. At this point, no one but you knows what the analog out is supposed to connect to.
0 Kudos
Message 5 of 11
(4,326 Views)



I just wanted to knew the example on how to do it hence i only translate the x axis movement before i proceed on to translating other axes...  What do u mean the analog out is suppose to connect to? u mean from the block diagram? or the output from the port of the NI-6009??
0 Kudos
Message 6 of 11
(4,321 Views)
No, not from the block diagram. I was asking what do you physically have connected to the output of the USB-6009. You asked for help in translating the joystick to a voltage out. You have code there to translate the x axis to some voltage. You have a division of the x axis by -8500. I have no idea where you came up with that number and what kind of conversion you need to translate all of the other axes to a single voltage. In other words, you will have some movement on the x axis and some movement on the y axis from the joystick. Can't help with translation unless you explain how to convert movement on both of those axes to a single voltage.
0 Kudos
Message 7 of 11
(4,315 Views)

Hi, 

I believe you are on the right path with what you are trying to do but the DAQmx section of your code seems to be reconfiguring every time the while loop iterates. I have attached a small example VI that I believe accomplishes what you are trying to do. It will take a bit of customization based on your specific joystick. I have the values set for the joystick that I tested; a Logitech Attack 3. This VI takes the input from the joystick, adds the largest negative value that the joystick outputs in order to make all values positive, and then divides by a factor. This scales the data so that it is between 0V and 5V, which is the output range of the USB-6008. I hope this helps and please let me know if you have any further questions.

JaceD
Signal Sources Product Support Engineer
National Instruments
0 Kudos
Message 8 of 11
(4,298 Views)

 

 

Hi Jaced,

                Thanks for the help.. I currently using Labview 8 and i'm unable to view yr VI, could you like help to print screen... Really sorry to trouble you.. Btw, can i know that am i able to give out 3 different voltages out of NI-6009 depending on the joystick readings?

0 Kudos
Message 9 of 11
(4,290 Views)
Hi Jaced,
 
                      i'm able to get the results i wanted le but how come for the physical channels i only able to choose from 2 different channels, wil be able to create a new analog channel out for use?
0 Kudos
Message 10 of 11
(4,287 Views)