Hello,
We are a rookie team attempting to use Labview. We had a mentor who was helping out our small programming group but has left on a pre-planned vacation. I am looking over the program for the first time, reading tutorials, watching videos, and searching CD in order to try to understand what is happening so we can add more to our program (motors, encoders, etc).
We currently have our robot driving with a button that allows the forward/reverse to be swapped.
What I am asking for is an explanation of the “Joystick Get Values” block being wired to an index array in the Teleop.vi.
What is happening here? How can 2 wires come out of the array and go straight to the “Drive Arcade Drive” block?
How do I know which elements of the array are for which axis/buttons?
Do I need an array for buttons AND an array for the joystick axis?
I have a pretty good understanding of programming concepts but this is really confusing!
Ultimately we need to control a motor with 2 buttons on the controller. My CD searches have only brought up older Labview program examples which do not seem to use arrays.
Thanks!
Team 6323
What kind of game controller are you using? An xbox controller? An Extreme 3D joystick?
Here are descriptions of what the buttons and sticks on several kinds of game controllers map to in the program:
http://www.team358.org/files/programming/ControlSystem2015-2019/#joysticks
Data in LabVIEW are transferred by way of wires.
I’ve added notes to an example joystick data retrieval.
The wires change colors and go from complex patterned to solid as you get to more primitive data types (integer, floating point, boolean).
For instance, the orange solid wire going into Arcade Drive from the Index Arrays represent a single floating point value, e.g. 0.75
The smallest green dashed line is for a single boolean button value (true or false, pushed or not pushed).
A = the complex brown wire going into the left of Joystick Get Values identifies where every value of every axis and button on that specific game controller is.
B & C = Joystick Get Values breaks out the joystick values into an array of all the axis-an xbox has 6 axis values (thick orange wire of floating point values), and an array of all the buttons-an xbox has 9 buttons (complex green wire of Boolean values).
D = the Index Array functions then separate the array of axis into individual axis values.
Another Index Array breaks out individual buttons so we can use them, too.


:ahh: I didn’t know those array blocks could be expanded to show the different elements. It all makes so much more sense now!
Thanks for the explanation about the wire types and the link to the xbox controller layout. I stumbled across your team’s website last night while searching for answers. I love your mini tutorials and that they are up to date!
I will probably have many more questions for you as we try to do more complex things.
Thanks again,
6323