View Full Version : Motor is twitching even without input FRC labview
Ryan_Sciarabba
06-02-2016, 10:46
We are trying to program a motor to move but for some reason even without input it's twitching. It works fine with input but without it the motor just moves as if it had a little flash of input. Any solutions to make it stop?
rich2202
06-02-2016, 11:01
Does it happen when the robot is Disabled? If so, try a new motor controller.
If not, then check your code. Something may be setting motor speed to something other than 0.
Mark McLeod
06-02-2016, 11:02
While Enabled it's always receiving input, even if that input should be neutral.
Do you call Set Motor in more than one place?
Does the motor continue to twitch if you disconnect the joystick?
Is the motor controller status light solid? (and what kind of motor controller is it?)
Owen Busler
06-02-2016, 11:04
If you have it programmed to be controlled by a joystick, one possibility may be that you do not have a "dead band" in your code. Even when the joystick is relaxed in its natural or zero position, it still may be outputting small numbers.
To fix this you may add a simple if statement, or a case structure if you use labview, that says if the absolute value of the joystick input is less than X. You will have to test to see what X works for you.
Again, this is just one problem my team has had in the past.
Alan Anderson
06-02-2016, 22:10
What kind of speed controller are you using? I occasionally saw the original Talons "twitch" when something induced noise on the PWM cable.
I have also seen very brief twitches occur using RoboRIO firmware from several years ago when the robot code lost communication for a moment and disabled the PWM outputs at just the right/wrong time to make the speed controller think it had gotten a single "run backwards at high speed" pulse before timing out and shutting off. I thought that undesired behavior was fixed, though.
Greg McKaskle
06-02-2016, 22:16
Just to add one more speculative element. Are you using a Y cable to send the PWM signal to more than one motor controller? If so, jiggle or roll the cable between your fingers to see if that will cause the disabled motor controllers to twitch. If so, fix the cable to get rid of shorts at the Y.
Greg McKaskle
Tom Line
07-02-2016, 00:23
What kind of speed controller are you using? I occasionally saw the original Talons "twitch" when something induced noise on the PWM cable.
I have also seen very brief twitches occur using RoboRIO firmware from several years ago when the robot code lost communication for a moment and disabled the PWM outputs at just the right/wrong time to make the speed controller think it had gotten a single "run backwards at high speed" pulse before timing out and shutting off. I thought that undesired behavior was fixed, though.
We struggled with that some last year as well. After we had one of our can-grabbers deploy and almost take off the head-mentors nose, we tried rerouting wires, etc. We never managed to completely beat the twitches though.
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.