We are a rookie team. We have been running the robot with the joystick controller turned at 90 degrees for about a week because the intitial set up from LabView is causing it to be this way.
We want to fixt the axis im programming but are unsure where. I know the axis values are 0 to 254 from reading the posts.
Where and how do I switch the locations?
Is it in the WPI_JoystickGet.vi and is it that I swap the x for y and y for x in the bundle? It appears that the x is being used for fore aft rather than front to back if I am reading the code correctly.
EDIT: I gave it more thought and your problem can be solved by inverting either your left or right motor. Do this in the begin subvi
Disreguard:
by turning 90 degrees, I would have to assume that you have the x axis and y axis switched in your program. switching the values would do nothing except reverse the controls, they would still be off by 90 degrees.
I am assuming you are useing the base code that unbundles the axis data into x axis and y axis. those should simply be fed into their respective x and y inputs into your robot drive subvi. If they match then try mismatching them to see if that solves your problem, as it may just be a problem with the joystick you are using.
You should try different variations of true/false as I am like 90% sure that is your problem.
The reasons you see different numbers being output to your motors than the values that are sent into the subvi is because the arcadedrive vi squares your inputs to allow for a smoother control.
indubitably is correct. One of your motors is running backwards. You can fix that by either swapping the wires or by changing its “invert” constant on the Open Drive in Begin.
Put the robot up on blocks. Push the joystick forward. Observe which motor is doing the wrong thing. Fix it to do the right thing.
(If you then find that the robot is turning the wrong direction when you push the joystick sideways, that would be because you have the left and right motors swapped. Fix that in the Begin vi as well, by changing the left and right motor PWM definitions.)