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
impl PulseEngineV2
pub fn new() -> Self
pub fn is_enabled(&self) -> bool
pub fn is_activated(&self) -> bool
pub fn get_state(&self) -> PulseEngineState
Sourcepub fn get_generator_type(&self) -> u8
pub fn get_generator_type(&self) -> u8
Get pulse generator type (bits 0-3)
Sourcepub fn get_generator_type_description(&self) -> &'static str
pub fn get_generator_type_description(&self) -> &'static str
Get pulse generator type description
Sourcepub fn is_step_dir_swapped(&self) -> bool
pub fn is_step_dir_swapped(&self) -> bool
Check if step/dir signals are swapped (bit 6)
Sourcepub fn is_extended_io_enabled(&self) -> bool
pub fn is_extended_io_enabled(&self) -> bool
Check if external extended IO features are enabled (bit 7)
Sourcepub fn get_axis_state(&self, axis: usize) -> PulseEngineAxisState
pub fn get_axis_state(&self, axis: usize) -> PulseEngineAxisState
Get axis state for a specific axis
Sourcepub fn is_axis_limit_positive(&self, axis: usize) -> bool
pub fn is_axis_limit_positive(&self, axis: usize) -> bool
Check if axis has positive limit switch triggered
Sourcepub fn is_axis_limit_negative(&self, axis: usize) -> bool
pub fn is_axis_limit_negative(&self, axis: usize) -> bool
Check if axis has negative limit switch triggered
Sourcepub fn is_axis_home(&self, axis: usize) -> bool
pub fn is_axis_home(&self, axis: usize) -> bool
Check if axis is at home position
Sourcepub fn is_axis_soft_limit(&self, axis: usize) -> bool
pub fn is_axis_soft_limit(&self, axis: usize) -> bool
Check if axis has soft limit triggered
pub fn is_axis_enabled(&self, axis: usize) -> bool
pub fn is_axis_homed(&self, axis: usize) -> bool
pub fn is_limit_triggered(&self, axis: usize, positive: bool) -> bool
Trait Implementations§
Source§impl Clone for PulseEngineV2
impl Clone for PulseEngineV2
Source§fn clone(&self) -> PulseEngineV2
fn clone(&self) -> PulseEngineV2
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PulseEngineV2
impl Debug for PulseEngineV2
Source§impl Default for PulseEngineV2
impl Default for PulseEngineV2
Source§impl<'de> Deserialize<'de> for PulseEngineV2
impl<'de> Deserialize<'de> for PulseEngineV2
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for PulseEngineV2
impl RefUnwindSafe for PulseEngineV2
impl Send for PulseEngineV2
impl Sync for PulseEngineV2
impl Unpin for PulseEngineV2
impl UnwindSafe for PulseEngineV2
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more