Stepper Motor Controller Interface¶
rcp.winch¶
Interfaces to hardware winch systems. Uses the QtSerialPort module for communication event processing using the Qt event loop.
-
class
rcp.winch.
QtSerialWinch
[source]¶ Class to manage a serial connection to a hardware winch system using Qt QSerialPort object for data transport. The data protocol is based on the StepperWinch Arduino sketch.
-
increment_reference
(axis, offset)[source]¶ Add a signed offset to one or more winch reference positions.
- Parameters
axis – either a integer axis number or list of axis numbers
offset – either a integer step offset or list of step offsets
-
increment_target
(axis, offset)[source]¶ Add a signed offset to one or more winch target positions.
- Parameters
axis – either a integer axis number or list of axis numbers
offset – either a integer step offset or list of step offsets
-
open
()[source]¶ Open the serial port and initialize communications. If the port is already open, this will close it first. If the current name is None, this will not open anything. Returns True if the port is open, else False.
-
set_freq_damping
(axis, freq, ratio)[source]¶ Set the second order model resonance parameters for one or more path generators. Note that the same parameters are applied to all specified axes, unlike the target setting functions.
- Parameters
axis – either a integer axis number or list of axis numbers
freq – scalar specifying the frequency in Hz
ratio – scalar specifying the damping ratio, e.g. 1.0 at critical damping.
-
set_speed
(axis, speed)[source]¶ Set the ramp speed for one or more target positions. Speeds less than or equal to zero are treated as infinite on the winch.
- Parameters
axis – either a integer axis number or list of axis numbers
speed – either an integer speed or list of integer velocities
-