pub struct Motor<I: Read + Write> { /* private fields */ }Implementations§
Source§impl<I: Read + Write> Motor<I>
impl<I: Read + Write> Motor<I>
pub async fn modbus_enabled(&mut self) -> Result<bool>
pub async fn set_modbus_enabled(&mut self, value: bool) -> Result<()>
pub async fn drive_enabled(&mut self) -> Result<bool>
pub async fn set_drive_enabled(&mut self, value: bool) -> Result<()>
Sourcepub async fn target_rpm(&mut self) -> Result<u16>
pub async fn target_rpm(&mut self) -> Result<u16>
Gets the target speed in RPM
In speed mode, this is the target speed. In position mode, this is the maximum speed.
Sourcepub async fn set_target_rpm(&mut self, value: u16) -> Result<()>
pub async fn set_target_rpm(&mut self, value: u16) -> Result<()>
Sets the target speed in RPM
0-3000 RPM. In speed mode, this is the target speed. In position mode, this is the maximum speed.
pub async fn acceleration(&mut self) -> Result<u16>
pub async fn set_acceleration(&mut self, value: u16) -> Result<()>
pub async fn weak_magnetic_angle(&mut self) -> Result<u16>
pub async fn set_weak_magnetic_angle(&mut self, value: u16) -> Result<()>
pub async fn speed_kp(&mut self) -> Result<u16>
pub async fn set_speed_kp(&mut self, value: u16) -> Result<()>
pub async fn speed_i_time(&mut self) -> Result<Duration>
pub async fn set_speed_i_time(&mut self, value: Duration) -> Result<()>
pub async fn position_kp(&mut self) -> Result<u16>
pub async fn set_position_kp(&mut self, value: u16) -> Result<()>
pub async fn speed_feed(&mut self) -> Result<f32>
pub async fn set_speed_feed(&mut self, value: f32) -> Result<()>
pub async fn dir_polarity(&mut self) -> Result<Direction>
pub async fn set_dir_polarity(&mut self, value: Direction) -> Result<()>
pub async fn electronic_gear_numerator(&mut self) -> Result<u16>
Sourcepub async fn set_electronic_gear_numerator(&mut self, value: u16) -> Result<()>
pub async fn set_electronic_gear_numerator(&mut self, value: u16) -> Result<()>
Set numerator of electronic gear ratio
0-65535 0 enables special functions
pub async fn electronic_gear_denominator(&mut self) -> Result<u16>
Sourcepub async fn set_electronic_gear_denominator(
&mut self,
value: u16,
) -> Result<()>
pub async fn set_electronic_gear_denominator( &mut self, value: u16, ) -> Result<()>
Set denominator of electronic gear ratio
1-65535
pub async fn target_position(&mut self) -> Result<u32>
pub async fn set_target_position(&mut self, value: u32) -> Result<()>
pub async fn alarm_code(&mut self) -> Result<Option<AlarmCode>>
pub async fn current(&mut self) -> Result<f32>
pub async fn speed(&mut self) -> Result<f32>
pub async fn voltage(&mut self) -> Result<f32>
pub async fn temperature(&mut self) -> Result<u16>
pub async fn pwm(&mut self) -> Result<u16>
pub async fn parameter_save_flag(&mut self) -> Result<bool>
pub async fn set_parameter_save_flag(&mut self, value: bool) -> Result<()>
pub async fn device_address(&mut self) -> Result<u16>
pub async fn absolute_position(&mut self) -> Result<u32>
pub async fn set_absolute_position(&mut self, value: u32) -> Result<()>
pub async fn still_maximum_allowed_current(&mut self) -> Result<u16>
pub async fn set_still_maximum_allowed_current( &mut self, value: u16, ) -> Result<()>
pub async fn specific_function(&mut self) -> Result<u16>
pub async fn set_specific_function(&mut self, value: u16) -> Result<()>
Source§impl<I: Read + Write> Motor<I>
impl<I: Read + Write> Motor<I>
pub fn new( comm: I, baud: RtuBaud, address: u8, response_timeout: Duration, ) -> Self
pub async fn set_baud_rate(&mut self, baud: RtuBaud) -> Result<()>
pub async fn set_target_position_custom(&mut self, value: u32) -> Result<()>
pub async fn set_absolute_position_custom(&mut self, value: u32) -> Result<()>
Auto Trait Implementations§
impl<I> Freeze for Motor<I>where
I: Freeze,
impl<I> RefUnwindSafe for Motor<I>where
I: RefUnwindSafe,
impl<I> Send for Motor<I>where
I: Send,
impl<I> Sync for Motor<I>where
I: Sync,
impl<I> Unpin for Motor<I>where
I: Unpin,
impl<I> UnsafeUnpin for Motor<I>where
I: UnsafeUnpin,
impl<I> UnwindSafe for Motor<I>where
I: UnwindSafe,
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