mpylab.device.mc_teseq_stirrer moduleΒΆ
TESEQ stirrer motor-controller driver and low-level serial helper.
- exception mpylab.device.mc_teseq_stirrer.AngleError(new_angle, current_angle, angle_error_threshold)
Bases:
ExceptionRaised when the stirrer cannot reach the requested target angle.
- class mpylab.device.mc_teseq_stirrer.MOTORCONTROLLER(SearchPaths=None)
Bases:
MOTORCONTROLLERClass to control TESEQ stirrer.
- GetSpeed()
Return configured stirrer speed placeholder value.
- GetState()
Return error, current angle, and estimated motion direction.
- Goto(pos)
Move stirrer to an absolute position in degrees.
- Init(ini=None, channel=None, ignore_bus=None)
Initialize stirrer hardware and move to known idle state.
- Move(dir)
Start clockwise or counter-clockwise motion.
- Quit()
Stop the stirrer motor.
- SetSpeed(speed)
Set stirrer speed (currently not implemented).
- class mpylab.device.mc_teseq_stirrer.Stirrer(port_parameters={}, status_retries=10, do_not_open=False)
Bases:
objectLow-level serial controller for the TESEQ stirrer drive.
- close()
Close the serial port and mark drive as uninitialized.
- property current_angle
Return current stirrer angle in degrees.
- default_port_parameters = {'baudrate': 9600, 'bytesize': serial.EIGHTBITS, 'dsrdtr': False, 'exclusive': False, 'inter_byte_timeout': None, 'parity': serial.PARITY_NONE, 'port': '/dev/stirrer', 'rtscts': False, 'stopbits': serial.STOPBITS_ONE, 'xonxoff': True}
- degpersec = 36
- property drive_initialized
Return whether the drive is initialized and currently idle.
- property error
Return whether the controller reports an error.
- property error_message
Return current controller error message.
- goto_angle(angle, direction=1)
direction = 1 -> clockwise
- goto_next_angle()
Move to the previously stored target angle.
- initialize_drive()
Initialize the drive if required and return initialized state.
- lock_message = 'STIRRER Controller V1.50 is locked. Please check SYNC position and restart the controller!'
- property motor_running
Return whether the motor is currently moving.
- read_termination = ' \r'
- run_anti_clockwise()
Start continuous counter-clockwise rotation.
- run_clockwise()
Start continuous clockwise rotation.
- set_next_angle(angle)
Store the next absolute target angle on the controller.
- step_anti_clockwise_by(step)
Move counter-clockwise by a relative angle in degrees.
- step_clockwise_by(step)
Move clockwise by a relative angle in degrees.
- stirrer_parameters = {'acc': 65, 'maxspeed': 6, 'minspeed': 0.18}
- stop_motor()
Stop motor movement and return motor-running state.
- write_termination = '\r'
- exception mpylab.device.mc_teseq_stirrer.StirrerLockedError
Bases:
ExceptionRaised when the stirrer controller reports a locked state.
- mpylab.device.mc_teseq_stirrer.main()
Run a simple interactive CLI for the stirrer controller.