Everytime we reboot our robot via the driverstation the robot runs several relays while it reboots. As soon as we connect back to the robot it stops them. Any one else experience this and do you know how to fix it?
Theoretically, that’s impossible if everything is wired and imaged correctly. Is everything else working according to plan? Also, do you have the relays plugged into the actual relay ports? If yes to both of those, you might try re-imaging your cRIO or replacing the digital sidecar. If other things aren’t working, you might have a bad digital sidecar or a bad ribbon cable.
We believe it is setting the motor to the last state it was in while it was enabled. We are going to try setting the motor values in disabledinit and disabledperiodic to zero. We debugged that our sidecar was bad and replaced it, but the issue was still occurring. Testing shall continue tomorrow morning.
Kevin is right – with correctly working and properly wired hardware, Spikes cannot be active unless the robot is communicating with the Driver Station and enabled.
How do you have the control wires connected to the Spikes? Which pins on the Digital Sidecar are they going to, and in which orientation are the connectors at each end? Do the red and green Relay LEDS on the Digital Sidecar turn on while the robot is rebooting?
The thing is, is that sometimes the spikes don’t fire on reset, leading me to predict that the last state they’re in controls their behavior on reset. I’m not with the robot at the moment but i will check the red/green leds on the sidecar tomorrow.
Update: It looks like the robot was setting relay values from the last recieved teleop packet. Adding code to disable all actuators in DisabledInit solved the issue.
The only problem here is that the relay outputs and PWM outputs are supposed to be electrically buffered in the Digital Sidecar. There’s a /Output_En signal that needs to be pulled low to enable any of the outputs. The cRIO image is supposed to be set up to only pull that pin low in Teleop Enabled or Autonomous Enabled. That pin shouldn’t be pulled low during a reboot. So there’s only a few possibilities:
- There’s a problem with the cRIO image that makes this happen. In which case there should be lots more reports of it happening.
- You have some electrical problem that’s shorting this pin/trace to ground. This could be a bad sidecar, a nicked ribbon cable, a bad NI module, a metal shaving in exactly the wrong place… A whole lot of things, but something unique to your robot.
I think it’s really important to try to determine the root cause of this and not just patch around one of the symptoms. If the problem is actually 1, then FIRST needs to know so the cRIO image can be fixed to work safely. If the problem is 2, then you need to solve the actual problem, because this means your robot is capable of running relays, and perhaps motors, in Disabled mode. That’s all kinds of illegal and unsafe. So please do try to figure out where the actual problem is. If it’s still happening despite swapping sidecars, I’m guessing the problem is in your ribbon cable or NI module.