NEO 550 delay

We are making a robot for an off season created by a friendly team, I am trying to use a NEO 550, but when I press the button on the control to activate it, it turns on with a delay of approximately 2 seconds, can anyone help me?

Check if there is a delay in the code, and the wiring, that might help!

There isn’t, if you want to take a look at the code

I’m no coding expert, so I can’t speak to what is or isn’t wrong with the code, but delays could come from a number of different places.

There’s the obvious case of “when button pressed, wait 2 seconds then start motor”. I’ll take your word for it that you don’t have that. But there’s quite a few other options to delay a motor starting.

-There’s something in the speed controller’s setup that causes a delay.
-Possibly the sneakiest, it’s got a PID-type tuning that has a very low P value. (In other words, slow acceleration.)
-Speed controller might be in brushed mode–I doubt this, but it’s possible. For a NEO550, it should be in Brushless mode.
-One or more loose wires/wire connections.
-It’s entirely possible that there’s a sensor that needs to be triggered and it is taking time to read the sensor.
-Loop timing might be out of whack.

Question: Is it just this one motor, or is it all of the motors?

While I can’t find anything in the code that would cause a 2 second delay, ur Intake Command, while it works, somewhat is contrary to command based programming. Instead of doing a single default command, each of those different conditions/actions should be their own button binding and triggers to run an individual command.

1 Like

As a troubleshooting step, try controlling the SparkMax directly via the USB interface and the REV Hardware client. Using the “Run” feature you can check the response time to commands you give it. If the motor responds immediately to the commands you give it, the issue is with your code, but if you see the same delay using the direct connection then the issue is with the controller/motor.

Youe PID seems pretty low on your code. So as @EricH said, this could be one of the issue.

Is your motor suddenly start moving after 2 second or slowly ramping up to your desired speed? Is there any noise from that motor when you press the button (even if it’s not moving).

Also check the messages on your driver station. it might have some hint for you (CAN bus issue, code running too slow, etc). Sometimes a poorly terminated CAN bus could cause control issue.