Quote:
Originally Posted by FRC3220
The motors are wired into the spike relays, and the spikes are wired into the power distribution board and the Relay ports on the roboRIO. We're pretty sure that our spikes are broken somehow.
|
You're not describing your wiring with enough detail to help us help you. There are lots of ways to wire Spikes to motors and power and roboRIO ports that won't work. If you can't tell us exactly where each of seven wires (GND, 12V, M+, M-, white, red, and black) is going, perhaps you can post a clear picture of each connection.
You also aren't telling us what the Spike's LED is doing. What color is it when you apply power? What color is it when you enable the robot? What color is it when you're trying to run the motor?
Quote:
|
I wrote this block that should just turn on the motors and leave them spinning as long as TeleOp is enabled. I've tried a few variations of this, and the motors still won't turn on. Logic dictates that if the relays were working, they'd be continuously running, right?
|
You're probably abusing your Spikes with that code. You're setting both outputs to 12V for an instant, then immediately commanding the M- output to GND, every time through the Teleop loop. If it's wired properly, you might hear the M- relay trying to buzz, and you should see the LED shining green, perhaps with a barely perceptible flicker. Depending on the physical response time of the relay, and on the magnetic decay characteristics of the coil, the M- output might never actually get connected to ground while the M+ relay is at 12V, and the motor will not run.
Do you see the "A motor should be on" message printing 50 times a second?