Hi, Team 2530 here. This past week, we started programming for our off-season prototype elevator, and it’s the first time we’ve ever used NEO Vortices and SPARK Flexes. Thanks to WPILIB simulation, we got the elevator up and running pretty quickly, but after running it for a while, we noticed some peculiar issues.
95% of the time, the elevator functions as intended (profiled PID + feedforward moves the elevator to presets), but occasionally while the elevator is moving between presets, the elevator abruptly stops for a short period of time (about 0.1sec from our testing). We have determined that this is not likely a mechanical issue (it occurs even when both elevator motors are not connected to the elevator and can spin freely). Using AdvantageScope, we can see that during at the times when the elevator abruptly stops, there is a mismatch between the duty cycle we are giving to the elevator motors (with .set()), and the duty cycle the motor controller is outputting (obtained with .getAppliedOutput()). The motor is being set() to a non-zero throttle, but the output duty cycle is zero. Looking at slow-motion video of the motor controller status LED when this issue occurs, we can see that the LED turns blue for a split second when this happens (both motors are in brake mode, so it makes sense that the motors would enter brake mode when they are at 0 duty).
This is a screenshot of AdvantageScope showing a normal operation of the elevator, followed by a single occurrence of the issue (19.5s to 20s). The red line is the intended motion profile, yellow is the elevator position (measured from the encoder of one of the elevator motors), the light-blue line is the duty cycle we are giving to the motors (with .set()), purple and peach lines are the motor’s output duty (from .getAppliedOutput()). As you can see, the elevator abruptly stops twice during this graph (at about 19.75s, and just before 20.0s).
If anyone has any theories on what might be the root cause of this issue, or any pointers on how to debug this better, we would love to know!
Additional information:
We are using REVLib 2024.2.4
RoboRIO 2.0, REV PDH
For debugging purposes, our CAN loop contains only the two elevator SPARK Flex motor controllers, the roboRIO, and the REV PDH (termination set to “on”)
The code we are running can be found here (“Elevator” branch, subsystems/ElevatorSubsystem.java contains the elevator code)
Both elevator SPARK Flexes have been updated to the most recent firmware version.
You might want to take a look at this issue and see if the circumstances line up. Even though it was reported on the 2025 beta, it sounds like the problem has existed on stable releases even before that.
Thanks for the info! I’m not sure if this circumstance is fully applicable (since we are only running the motor with one control mode, duty cycle), but we can try the WPILIB beta and the latest REVLib to see if doing so remedies the issue.