Configuration

Understand compatibility current fields and coast behavior, check configuration results, and save supported settings.

Java 0.33.0 / firmware 2.6.6: zero duty coasts; brake is unsupported. Stator and supply current-limit settings are inactive compatibility fields and do not limit amperes. Supply current is observational; stator current is unavailable. The speed-based duty governor can reduce applied output.

Compatibility current fields

Java
CurrentLimitsConfigs limits = new CurrentLimitsConfigs()
    .withStatorCurrentLimit(30)
    .withSupplyCurrentLimit(20);
StatusCode result = motor.getConfigurator().apply(limits);
if (!result.isOK()) {
    System.err.println(result.describe());
}
FieldUnitAccepted team range
StatorCurrentLimitA0.001–70
SupplyCurrentLimitA0.001–45

Unset fields are left alone. Do not set unsupported fields merely because a class contains them. In particular, the configurable lower supply-current limit and lower-time fields are refused by this library.

Team settings from Java

Use Java 0.33.0 with firmware 2.6.6. Current settings below are inactive compatibility fields; older firmware implemented different behavior. setSetting(name, value) uses the units in this table and checks the controller's supported range and write readback. getSetting(name) returns the confirmed value, or NaN if it cannot read it. Factory calibration and gate-driver settings stay locked.

Setting nameUnitsAccepted rangeAfter restart
climit / supplyA0.001 to 70 / 0.001 to 45Save
uvlo / uvhiV6 to 20 / 6 to 24; choose low below highSave
twarn / ttrip°C40 to 80; warning must not exceed tripSave
foldstart / folden°C / 0 or 140 to 80 / off or onSave
dutymaxDuty fraction0.001 to 1Save
idle_brake0 or 1Coast only; brake unavailableResets
vel_kpDuty per rad/s0.00005 to 0.01Save
vel_kiDuty per accumulated rad0.0002 to 0.05Save
vel_d_gainDuty per rad/s²0 to 0.001Save
pos_kp1/s0 to 500; zero prevents position entrySave
pos_i_gain1/s²0 to 500; step 0.001Save
pos_d_gainDimensionless0 to 10; step 0.00001Save
vel_slewrad/s²200 to 60000Save
pos_amaxrad/s²1 to 20000Resets
pos_vmaxrad/s1 to 800Resets
pos_prof0 or 1Position profile off / onResets

Save means call saveConfigurationConfirmed() after applying and checking settings. Firmware 2.6.6 remains coast-only regardless of a saved neutral setting. Apply configuration while stopped, outside periodic motion code: acknowledged requests can wait for a reply. A multi-field apply is sequential; if a later write fails, earlier accepted writes may already be in effect.

Java
// Example thermal setup; choose settings for the mechanism.
StatusCode result = motor.getConfigurator().setSetting("ttrip", 75);
if (!result.isOK()) {
    System.err.println(result.describe());
} else {
    double tripC = motor.getConfigurator().getSetting("ttrip");
    System.out.println("Trip temperature: " + tripC);
    StatusCode saved = motor.saveConfigurationConfirmed();
    if (!saved.isOK()) System.err.println(saved.describe());
}

setDeviceName(name) accepts 1 to 8 printable ASCII characters without commas and confirms readback; save afterward to retain it. getDeviceName() returns null if unavailable. Set a unique CAN ID in SWYFT Link before constructing the Java motor object with that ID.

What survives a restart?

SettingPersistence / action
Current limitsApply the limits and check the result. After saving and restarting, check the values reported by the motor rather than assuming they were restored.
Velocity gainsApply Slot0Configs and check the result; confirmed Save retains the gain fields.
Coast / Brake neutral modeResets when the motor restarts. Set it again at startup; Save does not keep this setting.
Mechanism ratio and wrapStored in your robot program, not on the motor. Set it again when the program starts.
Software limitsThe public configurator refuses them. Implement mechanism travel limits and homing in your robot code.
Java
// Call after intentionally configuring a stopped controller.
// Do not write flash from a periodic control loop.
StatusCode saved = motor.saveConfigurationConfirmed();
if (!saved.isOK()) System.err.println(saved.describe());

Choose neutral behavior

Neutral behavior determines what happens when the controller applies no driving output. Coast lets the shaft turn freely. Product firmware 2.6.6 supports only coast. Selecting BRAKE throws before transmission.

Java
StatusCode result = motor.setNeutralMode(SwyftCyclone.NeutralMode.COAST);
if (!result.isOK()) System.err.println(result.describe());

Handling a configuration failure

Range errors, unsupported fields and setting changes attempted while the motor is enabled are different problems. Print StatusCode.describe(), stop the motor when requested, and retry only the intended setting. Read back or inspect the live result before relying on it.