Skip to main content

RawControlWord

Struct RawControlWord 

Source
pub struct RawControlWord(pub u16);
Expand description

Raw u16 newtype — this IS the PDO data, no conversion needed

Tuple Fields§

§0: u16

Trait Implementations§

Source§

impl Cia402Control for RawControlWord

Source§

fn raw(&self) -> u16

Read the raw control word.
Source§

fn raw_mut(&mut self) -> &mut u16

Get a mutable reference to the raw control word.
Source§

fn set_switch_on(&mut self, v: bool)

Set bit 0 — Switch On.
Source§

fn set_enable_voltage(&mut self, v: bool)

Set bit 1 — Enable Voltage.
Source§

fn set_quick_stop(&mut self, v: bool)

Set bit 2 — Quick Stop.
Source§

fn set_enable_operation(&mut self, v: bool)

Set bit 3 — Enable Operation.
Source§

fn set_fault_reset(&mut self, v: bool)

Set bit 7 — Fault Reset.
Source§

fn cmd_shutdown(&mut self)

Shutdown command (transitions 2, 6, 8). Target state: Ready to Switch On.
Source§

fn cmd_switch_on(&mut self)

Switch On command (transition 3). Target state: Switched On.
Source§

fn cmd_enable_operation(&mut self)

Enable Operation command (transition 4, or combined 2+3+4). Target state: Operation Enabled.
Source§

fn cmd_disable_operation(&mut self)

Disable Operation command (transition 5). Target state: Switched On.
Source§

fn cmd_disable_voltage(&mut self)

Disable Voltage command (transitions 7, 9, 10, 12). Target state: Switch On Disabled.
Source§

fn cmd_quick_stop(&mut self)

Quick Stop command (transition 11). Target state: Quick Stop Active.
Source§

fn cmd_fault_reset(&mut self)

Fault Reset command (transition 15, rising edge on bit 7). Drive must be in Fault state. Transitions to Switch On Disabled.
Source§

fn cmd_clear_fault_reset(&mut self)

Clear the Fault Reset command (transition 15, rising edge on bit 7).
Source§

fn set_bit(&mut self, bit: u8, v: bool)

Set or clear a single bit in the control word.
Source§

impl Clone for RawControlWord

Source§

fn clone(&self) -> RawControlWord

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RawControlWord

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for RawControlWord

Source§

fn default() -> RawControlWord

Returns the “default value” for a type. Read more
Source§

impl HomingControl for RawControlWord

Source§

fn set_homing_start(&mut self, v: bool)

Bit 4 — Homing Operation Start: rising edge starts homing.
Source§

fn set_halt(&mut self, v: bool)

Bit 8 — Halt: interrupt homing and decelerate.
Source§

impl PpControl for RawControlWord

Source§

fn set_new_set_point(&mut self, v: bool)

Bit 4 — New Set-Point: rising edge starts a new positioning move.
Source§

fn set_change_set_immediately(&mut self, v: bool)

Bit 5 — Change Set Immediately: if true, interrupt current move.
Source§

fn set_relative(&mut self, v: bool)

Bit 6 — Relative: target position is relative to current.
Source§

fn set_halt(&mut self, v: bool)

Bit 8 — Halt: decelerate to stop.
Source§

impl PvControl for RawControlWord

Source§

fn set_halt(&mut self, v: bool)

Bit 8 — Halt: decelerate to zero velocity.
Source§

impl Copy for RawControlWord

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V