FIRST Tech Challenge Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Trouble with Arcade Left/Right control.

Solved!
Go to solution

Hello,

     We are a rookie FTC team and are attempting our first shot at four motor control. As advised in a previous post we plugged all our dive motors into one controller so that the labview program would recognize it as being one motor on each side. Both left motor reds are in one positive port and both left motor blacks are in the corresponding negative port and so on. When we map this cofiguration to the arcade right or arcade left drive style and test it our directions are off. Up makes the robot go right, right makes the robot go forward, back makes the robot go left, and left makes the robot go back. We have examined the programming and have checked the wiring and cannot seem to locate the issue. Has anyone else experienced anything like this, or has an idea we can try to se if it will resolve the issue?

0 Kudos
Message 1 of 10
(7,075 Views)

Hey Hokieteach,

Is the behavior you are seeing related to having two motors connected or do you see the same behavior with just one motor connected? From your setup description I suspect its an issue with how the joystick is being interpreted. I would expect to see this behavior if the x and y inputs on the joystick were flipped. You could write your own code to set the motor outputs based on your current setup but I think you may also be fix the issue by swapping the direction (reversing the polarity) of the right drive motor. The easiest way to do this is to set it in the Schematic Editor.  Post back if you have questions on this.

Kevin Fort
Principal Software Engineer
NI
Message 2 of 10
(4,774 Views)

Yes, we did notice this when only using one set of motors but were able to resolve it.( unable to remember how ) Can you please give me an idea of how to accomplish what you are describing inside of the schematic editor or correct the x and y inputs for our joystick?

0 Kudos
Message 3 of 10
(4,774 Views)
Solution
Accepted by topic author Hokieteach

FTC-motorreverse.png

Kevin Fort
Principal Software Engineer
NI
0 Kudos
Message 4 of 10
(4,774 Views)

Thanks, I am looking forward to trying this fix and seeing if it resolves the issue. I will post back on the results.

0 Kudos
Message 5 of 10
(4,774 Views)

Thanks, That fixed our driving direction issue. I have one more question though. While finishing out the configuration we noticed that when we pressed enable on one servo it activated them all. We checked the channels they were plugged into and ensured that they were not plugged in upside down but for some reason it seems that they will not function independently from one another. Do you have any idea what would be causing this? How would we fix it?

0 Kudos
Message 6 of 10
(4,774 Views)

Hey Hokieteach,

Is the issue that you are seeing that the Servos all power up together or that when you set the position on one they all move?

If it is that they all power up together I suspect you are running into the known issue described here:https://decibel.ni.com/content/thread/11347?tstart=0. There is a VI attached at the end of the thread that should resolve that issue.

Kevin Fort
Principal Software Engineer
NI
0 Kudos
Message 7 of 10
(4,774 Views)

We have one continuos rotation servo and two 180 degree rotation servos. They are plugged into channels 1, 2, and 3 of the servo controller. When I enable any of the servos, all of the servos initiate. When I am driving for some reason the continous rotation servo seems to surge power and will power on and off. That is the best description I can give of what is going on.

0 Kudos
Message 8 of 10
(4,774 Views)

Hey Hokieteach,

The all servos iniate part of it sounds like it might be fixed with the thread I pointed to.  As far as the power surging, are you able to monitor battery voltage with a multimeter while running to see if you are seeing a sag in voltage when the servo seems to power off.

Kevin Fort
Principal Software Engineer
NI
0 Kudos
Message 9 of 10
(4,774 Views)

The servo controller hardware cannot selectively enable some servos while disabling other servos. Its all or nothing. If you require this functionality, you can use two separate servo controllers.

0 Kudos
Message 10 of 10
(4,774 Views)