Skip to content

Initialization functions

cliquot22 edited this page Jan 9, 2024 · 19 revisions

Class initialization

__init__(self, com:str)

Class initialization This class is used for interacting with the Theia MCR motor control boards. Initialize the MCR board (this class) before any commands can be sent. Motor initialization (focusInit, zoomInit, irisInit) must be called separately for each motor. Successful initialization is confirmed by receiving the board firmware version from the board.

This is the top level class for all interactions with the MCR600 series boards

input

  • com: the com port name of the board (e.g. "com21"). The com port name is formatted for Windows.

class variables

  • MCRInitialized: set when the board is successfully initialized (not the motors)

Sub-classes

  • motor
  • board

Motor initialization

focusInit(self, steps:int, pi:int, move:bool=True, accel:int=0) -> bool

Initialize the parameters of the motor. This must be called after the board is initialized.

input

  • steps: maximum number of steps
  • pi: pi location in step number
  • move: (optional, True) move motor to home position or (False) initialize without moving.
  • accel: (optional, 0) motor acceleration steps (check motor control documentation to see if this variable is supported in firmware)

return [True] if motor initialization was successful


zoomInit(self, steps:int, pi:int, move:bool=True, accel:int=0) -> bool

Initialize the parameters of the motor. This must be called after the board is initialized.

input

  • steps: maximum number of steps
  • pi: pi location in step number
  • move: (optional, True) move motor to home position or (False) initialize without moving.
  • accel: (optional, 0) motor acceleration steps (check motor control documentation to see if this variable is supported in firmware)

return [True] if motor initialization was successful


irisInit(self, steps:int, move:bool=True) -> bool

Initialize the parameters of the motor. This must be called after the board is initialized.

input

  • steps: maximum number of steps
  • move: (optional, True) move motor to home position or (False) initialize without moving.

return [True] if motor initialization was successful


IRCInit(self) -> bool

Initialize the parameters of the IRC motor.
For the IRC switch motor: maximum 1000 steps allows 1 second activation time (at speed 1000pps). The activation time is set by the number of steps (1 step = 1 ms). See the motor control documentation for more info.

return [True]

Clone this wiki locally