Status signals
Read motion, electrical measurements, temperature, and faults from robot code.
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.
Read the latest measurements
double rpm = motor.getVelocityRpm();
double angle = motor.getPositionRad();
double busVolts = motor.getSupplyVoltage();
double supplyAmps = motor.getSupplyCurrent();
double boardCelsius = motor.getDeviceTemp();
boolean recentlyHeard = motor.isAlive(0.25); // Example freshness budget.| Signal | Units | Interpretation |
|---|---|---|
| Velocity | Mechanical RPM or rad/s | Use the getter whose unit matches the rest of your code. |
| Position | Rotor radians | Multi-turn count since startup; establish a reference after reset. |
| Duty cycle | Signed fraction | Applied / reported output, which may differ from the request. |
| Supply current | A | Current from the power source, not the winding current. |
| Device temperature | °C | Temperature measured on the controller board, not directly inside the motor coils or power transistors. |
| Faults and refusals | Decoded state | A warning, a motion refusal and a hard protection stop need different responses. |
Use freshness and validity
getLatest() returns the received measurements and timestamps showing when each group arrived. Speed, electrical measurements, and faults can arrive at different times. Check that the measurement you need is available and recent.
isAlive() is a connection check, not a guarantee that every cached measurement is equally recent. Check hasLikelyRebooted() before relying on accumulated position.
Handle a refused command
if (motor.hasNewRefusal()) {
System.err.println(motor.describeRefusal());
}
if (motor.hasHardFault()) {
motor.disable();
System.err.println(motor.getPowerStageFaultString());
}Use hasHardFault() to check for a fault that stops output. Testing whether any fault bit is set can also match warnings that do not stop the motor. SWYFT Link and the library report the controller’s protection faults.
Use plots to answer one question
For a slow mechanism, compare requested motion, measured speed and applied duty. Supply current can be plotted as observational telemetry; stator current and active current limiting are unavailable on 2.6.6. For heating, include temperature over time. Use the temperature reading for thermal monitoring. The i²t getter does not report an active thermal-budget limiter in this release.