10-05-2012 12:24 PM
I'm a newbie to LabVIEW. I've made this VI by refering to this NI article http://digital.ni.com/public.nsf/allkb/CA411647F224787B86256DD000669EFE
I'm having issues with taking the values from these "Info" pins.. Like the functions of 32 buttons, 4 Directions, 8 Axis info are hard-wired to 3 Pins?...
Actually my project goal would be this..
1.Initialize Joystick
2.Read Axis and Button info
3.Assign characters for each button(Boolean Value) and axis(-32768 or 32767) like Button 1 = Servo1, Button 2 = Servo2, Y-Axis(-32768) = MF, Y-Axis(32767) = MB,
X-Axis(-32768) = ML, X-Axis(32767) = MR...... etc..
4. Send the characters through a Xbee Pro connected to PC with a USB Xbee Dongle.
I know it is simple, but this convertion stuff and the whole component "thing" is really confusing.. Kindly help me out in 3&4 point
Solved! Go to Solution.
10-05-2012 12:34 PM
They are clusters. You can simply use the Unbundle By Name in order to get the components' values out.
10-05-2012 12:46 PM - edited 10-05-2012 01:04 PM
That actually helped! Now i have taken the values seperately.. But still i need somebody to explain me the Convertion part which i mentioned in my point 3..
Like if Button 1 receives a True value from the Joystick, how to convert it or assign it as SM1?
10-05-2012 01:19 PM
What is the definition of SM1? What data type? What values can it be?
10-05-2012 01:21 PM
Actually it means nothing Technical.. SM1 is the name i've given for Servo Motor 1... I just want to assign some character if the button receives TRUE value,So i could send it through Xbee connected to PC..Can it be done?
10-05-2012 02:20 PM
I would just use the Select function (found in the comparison palette).
You might want to go through the online LabVIEW tutorials:LabVIEW 101
10-05-2012 02:46 PM
Thanks much for your replies.! It worked...
But if you look at my VI, you can notice that i have those String boxes getting displayed in Front Panel... How to hide those from Front Panel?
10-05-2012 04:29 PM
And What about Axis button Info? It doesn't have any True or False Condition.. So How to assign Strings for it?
10-05-2012 05:08 PM
I have set the Strings as SW1 and so on.. But when i close LabVIEW and open again, it all gets reset to "one", Why??
How to set the string text data permanent?
10-05-2012 06:28 PM
If you have controls and you want to change the default values, then you need to use the right click option to set the current value to default.
Are these values you want the operator to change during the execution of the VI? If not, then you should be using string constants and not string controls.
I have a strong feeling you need to take the online LabVIEW tutorials
LabVIEW Introduction Course - Three Hours
LabVIEW Introduction Course - Six Hours