We have decided to not use the Attack 3 joystick and we are now going to use 1 Saitek controller. Because of this switch, I have two questions.
Is there a way to read POV using the Get Joystick VIs. If not, the POV also counts as buttons 12 through 20, but I would prefer not to have 8 case structures and just read the direction from the POV. I know that LabVIEW has a connectivity VI that allows the reading of POV, but it does not work with a cRIO.
What is the differance between a joystick ‘get’ vi and a joystick ‘get raw’ vi. Should I use the get raw if I am not using the Attack 3 controllers?
I am sorry to say that I can not answer your first question, I am unsure of what you are asking. But for the second, Get Raw gives you data such as whether a button is pressed or the axis value of the joystick. Get Joystick is rather unclear to me. For button operations use this diagram.
Use Get Raw and feed it to an ‘Unbundle by Name’ then you can use the boolean values that tunnel from the array to use as qualifiers for While loops or Case Structure i.e While (Button 9 == T) or If(Button 7 ==T)
Good luck!
To fix the number of buttons issue, couldn’t I change the input cluster as shown in the attached picture of the joystickrawvalue.vi ?
And the Joystick we plan to use has a scale of 32470 to -32470. So wouldn’t Get Raw give me those numbers and i just have to divide the output by 32470?
For us, the POV came up as axis 5 and 6. X on the POV was axis 5 with -1 being left, 0 being center, and 1 being right. Y was axis 6 with -1 being up, 0 being center, and 1 being down.