![]() |
Victor SP toggling from neutral to forward when enabled
When our robot is enabled, one of our victor sp's constantly swaps from neutral to forward.
we have tried:
|
Re: Victor SP toggling from neutral to forward when enabled
Did you try calibrating the speed controller? If that's not the fix, and you've done all other, I may think it's the code.
Do you have an encoder or some other sensor on the drive? |
Re: Victor SP toggling from neutral to forward when enabled
Concur it sounds like code. Can you replicate with a very simple new test program which is driving just that victor? Which motor is it (e.g. which PWM output is it hooked up to)? When you swapped PWM output connections did the problem move with the victor or with the PWM output? Can you give us any other details (e.g. does it happen in teleop or autonomous, as soon as you enable or only when a certain button is pressed, etc). Thanks for linking to your code, but without knowing which motor it is it's very difficult to narrow the scope of the code review to find the problem more quickly.
|
Re: Victor SP toggling from neutral to forward when enabled
Quote:
|
Re: Victor SP toggling from neutral to forward when enabled
Make sure your code is declaring the right type of Victor object (Can't view your code while on my phone.)
I'd also try recalibrating the Victor, and recalibration of the joysticks. Or unplug the joysticks and see if it still does it. |
Re: Victor SP toggling from neutral to forward when enabled
Thank you, Will try these when we meet tomorrow, it really is not that big of a deal as it spins at a very slow speed. We did calibrate the motor controller and found it made 0 difference.
|
Re: Victor SP toggling from neutral to forward when enabled
This won't help you for the immediate future, but my team bought a few PWM signal generators - sold on Amazon as servo testers - and found them extremely helpful for diagnosing issues like these.
I like this one: http://www.amazon.com/Andoer-Tester-...dp/B00LTOD4F4/ You can connect several PWM cables at the same time and verify that all the motor controllers are behaving the same. They're very cheap, but they ship from China so don't expect them to arrive for 2-3 weeks. If you needed something sooner, AndyMark or your local hobby store sells similar devices, or you could roll your own. |
Re: Victor SP toggling from neutral to forward when enabled
One to keep in mind. When disabled, the Roborio sends no PWM signal which the speed controls interprets as disabled. When enabled the Roborio sends the PWM signal it is told to send. 0 speed or "neutral" is actually in the middle of PWM band which is distinctly different than the disabled non signal. The LED on the Victor will tell you the signal it is receiving. Writing the signal that is being sent to the PWM channel is also useful. You can write to smart dashboard or print it to the DS message display. BTW It is not unusual for an unloaded motor to spin slowly at 0 speed if you are using a joy stick to control it without any headband for zero speed.
The meaning of the various blinkly control systems LEDs can be found here. Really useful for findind ghosts and other control problems. |
Re: Victor SP toggling from neutral to forward when enabled
Quote:
What's the difference between these three modes? Quote:
Also, were you able to figure out what this means? Quote:
|
Re: Victor SP toggling from neutral to forward when enabled
Quote:
What motor is giving you trouble in the code? I have found these: Code:
public static final int leftRearDrivePWM = 3;//3In commands/Launch.java, you're calling Robot.launcher.launch(shootSpeed) and Robot.launcher.intakeControl(0): Code:
protected void execute() {Code:
public void intakeControl(double speed){ |
Re: Victor SP toggling from neutral to forward when enabled
Quote:
Quote:
|
Re: Victor SP toggling from neutral to forward when enabled
Quote:
Resolution and stability: How fine is the resolution, and once you've dialed in a desired pulse width and taken your hand off the dial, is it stable at that value? Toggling: Is it practical to toggle the PWM output back and forth between neutral and a pre-set value by using the "Select" button, or does Mode3 get in the way if you try to do that? Have you cracked one of these open to see what kind of circuit they use? Have you successfully operated a Talon SRX with this device? |
Re: Victor SP toggling from neutral to forward when enabled
Quote:
The 4-digit LED readout lets you dial in any value in microseconds, assuming a steady hand, between about 800 and 2200 (I believe). How finely would this correlate to the actual output signal? I don't know, sorry. The dead band is right at 1500 and the motors turn from "very slowly" to "very fast" at the extreme ranges, and that's all I really ever needed this thing to do. I strapped a 4-AA battery pack to this unit and called it a "quick and dirty PWM tester". I haven't ever cracked it open but if I get a chance I'll report back the results! |
| All times are GMT -5. The time now is 02:18. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi