Cyclone / Current limits

Current limits

Stator and supply limits in amperes, set per mechanism.

Limits

Cyclone has two configurable current limits. Set both. Stall current is 253 A — do not use that as a mechanism limit.

LimitCapsMaximum you can request
StatorTorque-producing current160 A
SupplyCurrent from the PDH / battery60 A

Apply

Set limits in robot code at boot. SWYFT Link is for the pit and for checking a mechanism before the subsystem exists.

  1. Install the Cyclone vendordep in the WPILib 2027 project. Java
  2. In robotInit(), apply stator and supply from the starting-point table.
  3. Enable with the shaft clear. Command duty every loop.
  4. After practice, raise stator only if the mechanism cannot complete the move and the motor is not hot.

Java — WPILib 2027

Place SwyftCycloneV4.json in vendordeps/ and rebuild. Year token: 2027. Class: com.swyftrobotics.cyclone.v4.SwyftCyclone, constructed with CAN ID 1–62.

apply blocks. Call it from robotInit() or a one-shot command, not from periodic.

NOTE:

Vendor library API names can change.

Java
import com.swyftrobotics.cyclone.v4.CurrentLimitsConfigs;
import com.swyftrobotics.cyclone.v4.SwyftCyclone;
import org.wpilib.framework.TimedRobot;

public class Robot extends TimedRobot {
    private final SwyftCyclone intake = new SwyftCyclone(5);

    @Override
    public void robotInit() {
        var cfg = new CurrentLimitsConfigs();
        cfg.StatorCurrentLimit = 20;   // A — intake starting point
        cfg.SupplyCurrentLimit = 20;   // A
        intake.getConfigurator().apply(cfg);
    }

    @Override
    public void teleopPeriodic() {
        // Every loop. A stale setpoint coasts.
        intake.setDutyCycle(0.25);
    }

    @Override
    public void disabledInit() {
        intake.disable();
    }
}

Set only StatorCurrentLimit and SupplyCurrentLimit. Leave other fields unset (NaN) so the device keeps its stored values. There is no enable bit for the stator limit — you cannot turn the protection off from robot code.

WARNING:

SupplyCurrentLowerLimit and SupplyCurrentLowerTime throw UnsupportedOperationException. If that throw leaves robotInit(), the robot program never registers and the Driver Station reports no robot code.

setDutyCycle and set are the same quantity: a fraction of bus voltage, −1 to 1. 0.25 is a quarter of the bus, not a quarter of free speed. Call it every loop. A stale setpoint coasts.

Starting points

Tune after a practice match.

MechanismSupplyStator
Drivetrain module60 A80 A
Swerve azimuth / light mechanism40 A40 A
Elevator / arm40 A60 A
IntakeNo extra supply cap if draw stays under ~20 A20 A
WARNING:

Do not leave an unconfigured robot at the stator ceiling. Start from the table. Raise stator only if the mechanism cannot complete the move and the motor is not hot.

NEXT Status lights