|
Qudi
|
Class to control Thorlabs APT motor. More...
Public Member Functions | |
| def | __init__ (self, path_dll, serialnumber, hwtype, label='', unit='m') |
| def | getNumberOfHardwareUnits (self) |
| Returns the number of connected external hardware (HW) units that are available to be interfaced. | |
| def | getSerialNumberByIdx (self, index) |
| Returns the Serial Number of the specified index. | |
| def | setSerialNumber (self, SerialNum) |
| Sets the Serial Number of the specified index. | |
| def | initializeHardwareDevice (self) |
| def | getHardwareInformation (self) |
| Get information from the hardware. | |
| def | get_stage_axis_info (self) |
| Get parameter configuration of the stage. More... | |
| def | set_stage_axis_info (self, pos_min, pos_max, pitch, unit=1) |
| Set parameter configuration of the stage. More... | |
| def | getHardwareLimitSwitches (self) |
| def | setHardwareLimitSwitches (self, switch_reverse, switch_forward) |
| Set the Switch Configuration of the axis. More... | |
| def | getVelocityParameters (self) |
| Retrieve the velocity parameter with the currently used acceleration. More... | |
| def | get_velocity (self) |
| Get the current velocity setting. | |
| def | setVelocityParameters (self, minVel, acc, maxVel) |
| Set the velocity and acceleration parameter. More... | |
| def | set_velocity (self, maxVel) |
| Set the maximal velocity for the motor movement. More... | |
| def | getVelocityParameterLimits (self) |
| Get the current maximal velocity and acceleration parameter. More... | |
| def | get_home_parameter (self) |
| Get the home paramete. | |
| def | set_home_parameter (self, home_dir, switch_dir, home_vel, zero_offset) |
| Set the home parameters. More... | |
| def | get_pos (self) |
| Obtain the current absolute position of the stage. More... | |
| def | move_rel (self, relDistance) |
| Moves the motor a relative distance specified. More... | |
| def | move_abs (self, absPosition) |
| Moves the motor to the Absolute position specified. More... | |
| def | mcRel (self, relDistance, moveVel=0.5e-3) |
| Moves the motor a relative distance specified at a controlled velocity. More... | |
| def | mcAbs (self, absPosition, moveVel=0.5) |
| Moves the motor to the Absolute position specified at a controlled velocity. More... | |
| def | move_bc_rel (self, relDistance) |
| Moves the motor a relative distance specified, correcting for backlash. More... | |
| def | mbAbs (self, absPosition) |
| Moves the motor to the Absolute position specified. More... | |
| def | get_status (self) |
| Get the status bits of the current axis. More... | |
| def | identify (self) |
| Causes the motor to blink the Active LED. More... | |
| def | cleanUpAPT (self) |
| Releases the APT object. More... | |
| def | abort (self) |
| Abort the movement. More... | |
| def | go_home (self) |
| def | set_backlash (self, backlash) |
| Set the provided backlash for the apt motor. More... | |
| def | get_backlash (self) |
| Ask for the currently set backlash in the controller for the axis. More... | |
Public Attributes | |
| aptdll | |
| Connected | |
| verbose | |
| label | |
| SerialNum | |
Static Public Attributes | |
| dictionary | hwtype_dict = {} |
| dictionary | error_code = {} |
| dictionary | status_code = {} |
Class to control Thorlabs APT motor.
This class wrapps the low level commands from a dll library in python methods.
| def aptmotor.APTMotor.abort | ( | self | ) |
Abort the movement.
| def aptmotor.APTMotor.cleanUpAPT | ( | self | ) |
Releases the APT object.
Use when exiting the program.
| def aptmotor.APTMotor.get_backlash | ( | self | ) |
Ask for the currently set backlash in the controller for the axis.
| def aptmotor.APTMotor.get_pos | ( | self | ) |
Obtain the current absolute position of the stage.
| def aptmotor.APTMotor.get_stage_axis_info | ( | self | ) |
Get parameter configuration of the stage.
This method will handle the conversion to the non SI unit mm.
| def aptmotor.APTMotor.get_status | ( | self | ) |
Get the status bits of the current axis.
| def aptmotor.APTMotor.getVelocityParameterLimits | ( | self | ) |
Get the current maximal velocity and acceleration parameter.
| def aptmotor.APTMotor.getVelocityParameters | ( | self | ) |
Retrieve the velocity parameter with the currently used acceleration.
| def aptmotor.APTMotor.identify | ( | self | ) |
Causes the motor to blink the Active LED.
| def aptmotor.APTMotor.mbAbs | ( | self, | |
| absPosition | |||
| ) |
Moves the motor to the Absolute position specified.
| float | absPosition: Position desired in m or degree |
| def aptmotor.APTMotor.mcAbs | ( | self, | |
| absPosition, | |||
moveVel = 0.5 |
|||
| ) |
Moves the motor to the Absolute position specified at a controlled velocity.
| float | absPosition: Position desired in m or degree. |
| float | moveVel: Motor velocity, m/s or degree/s |
| def aptmotor.APTMotor.mcRel | ( | self, | |
| relDistance, | |||
moveVel = 0.5e-3 |
|||
| ) |
Moves the motor a relative distance specified at a controlled velocity.
| float | relDistance: Relative position desired in m or in degree |
| float | moveVel: Motor velocity, m/s or in degree/s |
| def aptmotor.APTMotor.move_abs | ( | self, | |
| absPosition | |||
| ) |
Moves the motor to the Absolute position specified.
| float | absPosition: absolute Position desired, in m or degree. |
| def aptmotor.APTMotor.move_bc_rel | ( | self, | |
| relDistance | |||
| ) |
Moves the motor a relative distance specified, correcting for backlash.
| float | relDistance: Relative position desired in m or in degree |
| def aptmotor.APTMotor.move_rel | ( | self, | |
| relDistance | |||
| ) |
Moves the motor a relative distance specified.
| float | relDistance: Relative position desired, in m or in degree. |
| def aptmotor.APTMotor.set_backlash | ( | self, | |
| backlash | |||
| ) |
Set the provided backlash for the apt motor.
| float | backlash: the backlash in m or degree for the used stage. |
| def aptmotor.APTMotor.set_home_parameter | ( | self, | |
| home_dir, | |||
| switch_dir, | |||
| home_vel, | |||
| zero_offset | |||
| ) |
Set the home parameters.
| int | home_dir: direction to the home position, 1 = Move forward 2 = Move backward |
| int | switch_dir: Direction of the switch limit: 4 = Use forward limit switch for home datum 1 = Use forward limit switch for home datum. |
| float | home_vel = default velocity |
| float | zero_offset: the distance or offset (in mm or degrees) of the limit switch from the Home position. |
| def aptmotor.APTMotor.set_stage_axis_info | ( | self, | |
| pos_min, | |||
| pos_max, | |||
| pitch, | |||
unit = 1 |
|||
| ) |
Set parameter configuration of the stage.
| float | pos_min: minimal position of the axis in m or degree. |
| float | pos_max: maximal position of the axis in m or degree. |
| float | pitch: the pitch determines the full step angle of a stepper magnet motor. That is the resolution of the stepper motor. |
| int | unit: unit of the axis, possible values: 1 = m 2 = degree |
This method will handle the conversion to the non SI unit mm.
| def aptmotor.APTMotor.set_velocity | ( | self, | |
| maxVel | |||
| ) |
Set the maximal velocity for the motor movement.
| float | maxVel: maximal velocity of the stage in m/s or degree/s. |
| def aptmotor.APTMotor.setHardwareLimitSwitches | ( | self, | |
| switch_reverse, | |||
| switch_forward | |||
| ) |
Set the Switch Configuration of the axis.
| int | switch_reverse: sets the switch in reverse movement |
| int | switch_forward: sets the switch in forward movement |
The following values are allowed: 0x01 or 1: Ignore switch or switch not present. 0x02 or 2: Switch makes on contact. 0x03 or 3: Switch breaks on contact. 0x04 or 4: Switch makes on contact - only used for homes (e.g. limit switched rotation stages). 0x05 or 5: Switch breaks on contact - only used for homes (e.g. limit switched rotations stages). 0x06 or 6: For PMD based brushless servo controllers only - uses index mark for homing.
| def aptmotor.APTMotor.setVelocityParameters | ( | self, | |
| minVel, | |||
| acc, | |||
| maxVel | |||
| ) |
Set the velocity and acceleration parameter.
| flaot | minVel: the minimum velocity at which to start and end a move in m/s or degree/s |
| float | acc: the rate at which the velocity climbs from minimum to maximum, and slows from maximum to minimum current acceleration in m/s^2 or degree/s^2 |
| float | maxVel: the maximum velocity at which to perform a move in m/s or degree/s |
1.8.13