We can read the velocity as set to 8000 and the accel set to 80000.
If it wasn’t clear from the code, this is on our swerve azimuth NEO 550 motors, which are on a 53.3:1 ratio relative to the module. We’re also observing this on all of the azimuth motors we’ve tested so we think it probably is something wrong with our configuration.
When we try to run Smart Motion from the client, the applied output sits at 0 while the setpoint goes to whatever we target.
We’re trying to configure factory defaults and burn flash on boot, but we noticed that it appears that the client shows hardware limit switches as enabled on both forward and reverse as normally closed switches. We don’t have any limit switches and we definitely didn’t manually enable that, so that seems odd. But if we run in percent output mode (using the client) the motor spins, and velocity control mode worked fine from the client, so no idea if that is an actual problem.
Also, we noticed that we can get the motor to jitter in Smart Motion mode under some circumstances (I think what we tested was when we disable, turn the module like 90 degrees, and then reenable with the setpoint as 0), but this is the motor spinning back and forth by less than one rotation so the output is not observably changing.
EDIT: Ok so now the velocity control also appears to not work from the hardware client. We toggled the limit switches off and on and in both cases it no longer works. I’m not really sure what’s changed since this morning when we were tuning the velocity control PID using the client.
EDIT 2: At this point for some reason we also get an applied output of 0 when we use percent output mode set to any value on the hardware client, so it seems to be beyond a closed loop issue.
EDIT 3: So the only thing that seems to have changed between this morning when it was working through the hardware client and now is that we uploaded our working code to the robot. Before this we were using the hardware client without enabling the robot, and in those circumstances, percentage output and velocity control worked but smart motion did not. Now, without enabling the robot but with working code on the roboRIO, the hardware client seems to be unable to tell the SPARKs to do anything. We just realized this and tried to enable the robot but now the hardware client is unable to detect the device its connected to over USB.
EDIT 4 (last one for today): We were finally able to get the client to detect the SPARK MAX over USB while the robot was enabled, and it was still unable to get the motor to run even in percent output mode. We checked the wiring and all of the configuration variables in the client, and the only thing we could think of that could possible be the issue was the limit switch stuff, which we tried every combination of.