[−][src]Enum odrive_rs::enumerations::AxisState
State Machine
From the official docs:
The current state of an axis is indicated by
<axis>.current_state
. The user can request a new state by assigning a new value to<axis>.requested_state
. The default state after startup isIdle
.
Idle
StartupSequence
FullCalibrationSequence
MotorCalibration
SensorlessControl
EncoderIndexSearch
EncoderOffsetCalibration
ClosedLoopControl
Variants
Used for
Disable motor PWM and do nothing
Run the startup procedure.
Run motor calibration and then encoder offset calibration
(or encoder index search if <axis>.encoder.config.use_index
is true
).
Measure phase resistance and phase inductance of the motor.
To store the results set <axis>.motor.config.pre_calibrated
to true
and save the configuration.
After that you don’t have to run the motor calibration on the next start up.
This modifies the variables <axis>.motor.config.phase_resistance
and <axis>.motor.config.phase_inductance
.
Run sensorless control.
The motor must be calibrated (<axis>.motor.is_calibrated
).
<axis>.controller.control_mode
must be true
.
Turn the motor in one direction until the encoder index is traversed.
This state can only be entered if <axis>.encoder.config.use_index
is true
.
Turn the motor in one direction for a few seconds and then back to measure the offset between the encoder position and the electrical phase.
Can only be entered if the motor is calibrated (<axis>.motor.is_calibrated
).
A successful encoder calibration will make the <axis>.encoder.is_ready
go to true
.
Run closed loop control.
The action depends on the control mode.
Can only be entered if the motor is calibrated (<axis>.motor.is_calibrated
)
and the encoder is ready (<axis>.encoder.is_ready
).
Trait Implementations
impl Clone for AxisState
[src]
impl Copy for AxisState
[src]
impl Eq for AxisState
[src]
impl Ord for AxisState
[src]
fn cmp(&self, other: &AxisState) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
1.21.0[src]
fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<AxisState> for AxisState
[src]
impl PartialOrd<AxisState> for AxisState
[src]
fn partial_cmp(&self, other: &AxisState) -> Option<Ordering>
[src]
#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl Debug for AxisState
[src]
impl StructuralPartialEq for AxisState
[src]
impl StructuralEq for AxisState
[src]
Auto Trait Implementations
impl Send for AxisState
impl Sync for AxisState
impl Unpin for AxisState
impl UnwindSafe for AxisState
impl RefUnwindSafe for AxisState
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,