We’re setting up our practice robot, and are unable to get any response from our Victors. Any help or advice would be greatly appreciated!
Code:
public class RobotTemplate extends SimpleRobot
{
Victor spinnyMotor = new Victor(4,1);
Relay maddie = new Relay(4,3);
public void operatorControl()
{
Watchdog.getInstance().setEnabled(false);
while((isOperatorControl()) && (isEnabled()))
{
spinnyMotor.set(1.0);
maddie.set(Relay.Value.kForward);
System.out.println("Hi myname is joe: " + spinnyMotor.getSpeed());
}
}
}
Physical setup:
PDB is hooked to the battery, and getting 12.5V.
The cRio is properly hooked up to get 24V.
the cRio is plugged directly into the wireless router (skipping the radio for now)
The cRio has been imaged to the latest version
We have analog modules in slots 1 and 2, with an analog breakout (powered from a 20A circuit breaker on the PDB) on the module in slot 1. The battery jumper is in place, and the LED on the breakout is lit.
We have digital modules in slots 4 and 6, with a digital side car hooked up to the module in slot 4.
We have a pneumatic module in slot 8.
The digital side car is set up as follows:
power from a 20A circuit breaker on the PDB (all 3 power lights are lit)
5 victors hooked up on PWM outputs 1-5, with the black wire on the outside
3 limit switches hooked up to the digital IO, only utilizing the inside and outside pins (not the middle pin, due to the internal pull up resistor)
The victors are set up as follows:
power from 40A circuit breakers on the PDB hooked to the V+ and V- screws
the fans are hooked into the V+ and V- screws
motors are hooked into the M+ and M- (2 CIMs, 2 FP, and 1 Banebots)
The driverStation is the same one we used last year, and works just fine with our other cRio on last years robot.
Results:
After making a connection to the driver station and enabling teleop, we see the following LED indicators:
the Robot Signal Light LED on the digital side car is solid, blinking off briefly every 1-2 seconds.
Relay 3 has a green LED lit
All 5 Victors remain blinking orange lights, indicating they aren’t receiving a signal
System out shows repeatedly “Hi myname is joe: 1.0”
Sorry for the long, technical post… this is stumping the entire team (including 2 5-year veteran mentors), and we felt more information would help us get a solution quickly Thanks for taking the time to help us!
It can be hard to get the PWM cable properly seated in the Victor, I’d suspect that is the problem. Since it sounds like you have another robot working, compare how far the PWM cable is inserted on the working robot and the non-working victors.
Pull the cables out, and check for debris, and then reseat them firmly. I can’t tell you how many times I’ve said “it’s definitely in there this time” only to be very wrong
We finally managed to get them all working. I can’t tell you the number of times we unplugged them and plugged them back in, with no change. Finally we took one off and hooked it up to the working robot… And it worked! That really made us scratch our heads - especially when we went back to the otter robot and it stopped working!
In the end, we discovered that we were completely setting them wrong - the pins were completed missing the receptacle in the housing, and sliding along the side instead of into the contacts. So we could push them in as firmly as we wanted, and wiggle them forever - they would never be able to touch the contacts. So if you ever have this problem, be careful inserting the PWM’s! If you wiggle it before engaging the pins, you can feel the lip of the contacts, and see exactly how easy it is to miss them!