Zaber#

class phobos.classes.pupil_mask.Zaber(session, id)[source]#

Bases: object

Class to control the Zaber motors (axis).

id#

ID of the Zaber motor.

Type:

int

__init__(session, id)[source]#
Parameters:
  • session (serial.Serial) – Serial connection to the Zaber motor.

  • id (int) – ID of the Zaber motor.

wait() None[source]#

Wait for the motor to reach the target position.

send_command(command)[source]#

Send a command to the motor and return the response.

Parameters:

command (str) – Command to send to the motor.

Returns:

Response from the motor.

Return type:

str

get() int[source]#

Get the current position of the motor.

Returns:

Current position of the motor (in steps).

Return type:

int

move_abs(pos: int) str[source]#

Move the motor to an absolute position.

Parameters:

pos (int) – Target position in steps.

Returns:

Response from the motor after moving to the target position.

Return type:

str

move_rel(pos: int) str[source]#

Move the motor by a relative number of steps.

Parameters:

pos (int) – Number of steps to move.

Returns:

Response from the motor after moving to the target position.

Return type:

str