Robot controls axes offset from actual program

So we’re testing the robot and we noticed that the motors wobble when we go up or down on the joysticks. But the motor operate fine when they are used diagonal is there another value that I’m not getting?

Seems as if the joystick is tying together the x and y axes on your joystick. What does it do when you go side to side? Make sure you are only parsing through to your command

stick.getY();

Is there a specific value that I’m not seeing because I thought the only values to change were the numeric constants going into the index array.front panel for getvalues module-1

Oh! I don’t use labview but im that Joystick(GET VALUES) is there a way to specify the Y axis?

I originally thought that the number and blue was supposed to represent that but it’s really inconsistent and if I set it to .5 it does kinda work but it’s off center so basically the x and y are rotated 45 degrees and the motors shake violently if the joysticks aren’t at that perfect angle.

I’m generally confused, something seems very wrong with your code if that’s happening or if you’re even passing in those values. I’d try and replicate a tank drive command from the examples or switch to the superior language, Java :slight_smile:

Yeah that’s alright, we had java on our robot from last year but we wanted something a little easier to get into for our new programmers, But thanks anyways

You might get that behavior if one of the index arrays was miswired.
We can’t tell from your snapshot because the wires are crossing underneath.

If you can use Clean Up Diagram we could see your wiring better.
CleanUp

Or highlight that code and use Edit->Create VI snippet from Selection to export the actual code for us to check out.

Sorry about that, cleaned it up a little bit

The nodes of all of the wires coming out of or into the Index Arrays are obscured.

Here is what clean wiring looks like:
You can see the nodes where each wire comes from and goes to.
BasicTank

This is also a code snippet.
You can drag this onto a block diagram and it will become LabVIEW code.

This is what I got Teleopvi5

That looks fine.

I’d check the joystick outputs to be sure of what the sticks are doing.
You can use the Driver Station USB tab (no robot required).

  • the joysticks should show up in green on the tab.
  • highlight one of them and see if the Y axis is the only one moving and you’re getting the reading that you expect.

CheckJoystick
(can’t find my joysticks, so I used an xbox game controller for the example above)

Just checked and the y axis on both the joysticks is set as 1

Next thing to check for is if “Left and Right Motors” get used or referenced anywhere else in Teleop?
Or in any of the other vi’s that you may have modified already.
If you have more than one single used of Left and Right Motors, then that will break your code.

If you want to zip the project folder (located at Documents->LabVIEW Data), then we could take a look and run it.

Yeah I checked and there’s no other references in the vi 2020 Robot Project-20200301T002428Z-001.zip (2.1 MB)

You are setting Left and Right Motors in both Periodic Tasks and in Teleop.
Pick one place.

Periodic Tasks is also using both X axis instead of the Y axis.
So you’re getting a random mixture of X and Y axis from both joysticks.

1 Like

That’s what I assumed from the beginning, however didn’t know labview very well.

It’ll take a while to get used to how the default project is intended to be used.
And learning any programming language well takes several seasons for FRC.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.