PulseEngineV2

Struct PulseEngineV2 

Source
pub struct PulseEngineV2 {
Show 93 fields pub info: PulseEngineV2Info, pub axes_state: [u8; 8], pub axes_config: [u8; 8], pub axes_switch_config: [u8; 8], pub current_position: [i32; 8], pub position_setup: [i32; 8], pub reference_position_speed: [i32; 8], pub invert_axis_enable: [i8; 8], pub soft_limit_maximum: [i32; 8], pub soft_limit_minimum: [i32; 8], pub homing_speed: [u8; 8], pub homing_return_speed: [u8; 8], pub home_offsets: [i32; 8], pub homing_algorithm: [u8; 8], pub filter_limit_m_switch: [u8; 8], pub filter_limit_p_switch: [u8; 8], pub filter_home_switch: [u8; 8], pub probe_position: [i32; 8], pub probe_max_position: [i32; 8], pub max_speed: [f32; 8], pub max_acceleration: [f32; 8], pub max_deceleration: [f32; 8], pub mpg_jog_multiplier: [i32; 8], pub mpg_jog_encoder: [u8; 8], pub pin_home_switch: [u8; 8], pub pin_limit_m_switch: [u8; 8], pub pin_limit_p_switch: [u8; 8], pub axis_enable_output_pins: [u8; 8], pub home_back_off_distance: [u32; 8], pub mpg_jog_divider: [u16; 8], pub filter_probe_input: u8, pub axis_signal_options: [u8; 8], pub reference_velocity_pv: [f32; 8], pub pulse_engine_enabled: u8, pub pulse_generator_type: u8, pub charge_pump_enabled: u8, pub emergency_switch_polarity: u8, pub pulse_engine_activated: u8, pub limit_status_p: u8, pub limit_status_n: u8, pub home_status: u8, pub error_input_status: u8, pub misc_input_status: u8, pub limit_override: u8, pub limit_override_setup: u8, pub pulse_engine_state: u8, pub axis_enabled_mask: u8, pub emergency_input_pin: u8, pub sync_fast_outputs_axis_id: u8, pub sync_fast_outputs_mapping: [u8; 8], pub param1: u8, pub param2: u8, pub param3: u8, pub axis_enabled_states_mask: u8, pub pulse_engine_state_setup: u8, pub soft_limit_status: u8, pub external_relay_outputs: u8, pub external_oc_outputs: u8, pub pulse_engine_buffer_size: u8, pub motion_buffer_entries_accepted: u8, pub new_motion_buffer_entries: u8, pub homing_start_mask_setup: u8, pub probe_start_mask_setup: u8, pub probe_input: u8, pub probe_input_polarity: u8, pub probe_status: u8, pub motion_buffer: Vec<u8>, pub probe_speed: f32, pub debug_values: [u32; 16], pub backlash_width: [u16; 8], pub backlash_register: [i16; 8], pub backlash_acceleration: [u8; 8], pub backlash_compensation_enabled: u8, pub backlash_compensation_max_speed: u8, pub trigger_preparing: u8, pub trigger_prepared: u8, pub trigger_pending: u8, pub trigger_active: u8, pub spindle_speed_estimate: i32, pub spindle_position_error: i32, pub motor_step_setting: [u8; 4], pub motor_current_setting: [u8; 4], pub spindle_rpm: u32, pub spindle_index_counter: u32, pub dedicated_limit_n_inputs: u8, pub dedicated_limit_p_inputs: u8, pub dedicated_home_inputs: u8, pub trigger_ignored_axis_mask: u8, pub encoder_index_count: u32, pub encoder_ticks_per_rotation: u32, pub encoder_velocity: u32, pub internal_driver_step_config: [u8; 4], pub internal_driver_current_config: [u8; 4],
}
Expand description

Pulse Engine v2 main structure

Fields§

§info: PulseEngineV2Info§axes_state: [u8; 8]§axes_config: [u8; 8]§axes_switch_config: [u8; 8]§current_position: [i32; 8]§position_setup: [i32; 8]§reference_position_speed: [i32; 8]§invert_axis_enable: [i8; 8]§soft_limit_maximum: [i32; 8]§soft_limit_minimum: [i32; 8]§homing_speed: [u8; 8]§homing_return_speed: [u8; 8]§home_offsets: [i32; 8]§homing_algorithm: [u8; 8]§filter_limit_m_switch: [u8; 8]§filter_limit_p_switch: [u8; 8]§filter_home_switch: [u8; 8]§probe_position: [i32; 8]§probe_max_position: [i32; 8]§max_speed: [f32; 8]§max_acceleration: [f32; 8]§max_deceleration: [f32; 8]§mpg_jog_multiplier: [i32; 8]§mpg_jog_encoder: [u8; 8]§pin_home_switch: [u8; 8]§pin_limit_m_switch: [u8; 8]§pin_limit_p_switch: [u8; 8]§axis_enable_output_pins: [u8; 8]§home_back_off_distance: [u32; 8]§mpg_jog_divider: [u16; 8]§filter_probe_input: u8§axis_signal_options: [u8; 8]§reference_velocity_pv: [f32; 8]§pulse_engine_enabled: u8§pulse_generator_type: u8§charge_pump_enabled: u8§emergency_switch_polarity: u8§pulse_engine_activated: u8§limit_status_p: u8§limit_status_n: u8§home_status: u8§error_input_status: u8§misc_input_status: u8§limit_override: u8§limit_override_setup: u8§pulse_engine_state: u8§axis_enabled_mask: u8§emergency_input_pin: u8§sync_fast_outputs_axis_id: u8§sync_fast_outputs_mapping: [u8; 8]§param1: u8§param2: u8§param3: u8§axis_enabled_states_mask: u8§pulse_engine_state_setup: u8§soft_limit_status: u8§external_relay_outputs: u8§external_oc_outputs: u8§pulse_engine_buffer_size: u8§motion_buffer_entries_accepted: u8§new_motion_buffer_entries: u8§homing_start_mask_setup: u8§probe_start_mask_setup: u8§probe_input: u8§probe_input_polarity: u8§probe_status: u8§motion_buffer: Vec<u8>§probe_speed: f32§debug_values: [u32; 16]§backlash_width: [u16; 8]§backlash_register: [i16; 8]§backlash_acceleration: [u8; 8]§backlash_compensation_enabled: u8§backlash_compensation_max_speed: u8§trigger_preparing: u8§trigger_prepared: u8§trigger_pending: u8§trigger_active: u8§spindle_speed_estimate: i32§spindle_position_error: i32§motor_step_setting: [u8; 4]§motor_current_setting: [u8; 4]§spindle_rpm: u32§spindle_index_counter: u32§dedicated_limit_n_inputs: u8§dedicated_limit_p_inputs: u8§dedicated_home_inputs: u8§trigger_ignored_axis_mask: u8§encoder_index_count: u32§encoder_ticks_per_rotation: u32§encoder_velocity: u32§internal_driver_step_config: [u8; 4]§internal_driver_current_config: [u8; 4]

Implementations§

Source§

impl PulseEngineV2

Source

pub fn new() -> Self

Source

pub fn is_enabled(&self) -> bool

Source

pub fn is_activated(&self) -> bool

Source

pub fn get_state(&self) -> PulseEngineState

Source

pub fn get_generator_type(&self) -> u8

Get pulse generator type (bits 0-3)

Source

pub fn get_generator_type_description(&self) -> &'static str

Get pulse generator type description

Source

pub fn is_step_dir_swapped(&self) -> bool

Check if step/dir signals are swapped (bit 6)

Source

pub fn is_extended_io_enabled(&self) -> bool

Check if external extended IO features are enabled (bit 7)

Source

pub fn get_axis_state(&self, axis: usize) -> PulseEngineAxisState

Get axis state for a specific axis

Source

pub fn is_axis_limit_positive(&self, axis: usize) -> bool

Check if axis has positive limit switch triggered

Source

pub fn is_axis_limit_negative(&self, axis: usize) -> bool

Check if axis has negative limit switch triggered

Source

pub fn is_axis_home(&self, axis: usize) -> bool

Check if axis is at home position

Source

pub fn is_axis_soft_limit(&self, axis: usize) -> bool

Check if axis has soft limit triggered

Source

pub fn is_axis_enabled(&self, axis: usize) -> bool

Source

pub fn is_axis_homed(&self, axis: usize) -> bool

Source

pub fn is_limit_triggered(&self, axis: usize, positive: bool) -> bool

Trait Implementations§

Source§

impl Clone for PulseEngineV2

Source§

fn clone(&self) -> PulseEngineV2

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 PulseEngineV2

Source§

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

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

impl Default for PulseEngineV2

Source§

fn default() -> Self

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

impl<'de> Deserialize<'de> for PulseEngineV2

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for PulseEngineV2

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

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> 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<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,