pylabrobot.liquid_handling.backends.hamilton.STAR_backend.STAR.request_iswap_rotation_drive_orientation#

async STAR.request_iswap_rotation_drive_orientation() RotationDriveOrientation#

Request the iSWAP rotation drive orientation.

Uses nearest-neighbour classification against the per-machine EEPROM pw values populated at setup. An earlier implementation used +/-50 windows around the Hamilton factory defaults and faulted on machines calibrated outside that band; we now pick whichever predefined stop is closest and only raise if the drive is more than 5 deg from any predefined stop.

Hamilton factory-default values shown below for reference only; the per-machine EEPROM table is queried at setup and used at runtime in place of these (W-drive resolution = 0.00310 deg/incr):

LEFT          W1      -29068 incr  (-90 deg)
FRONT         W2          +0 incr  ( +0 deg)
RIGHT         W3      +29068 incr  (+90 deg)
PARKED_RIGHT  park    +29500 incr  (+91 deg, beyond W3 at the stop)
Returns:

RotationDriveOrientation

The interpreted rotation orientation

(LEFT, FRONT, RIGHT, or PARKED_RIGHT).

Raises:
  • RuntimeError – if setup() has not populated the predefined positions.

  • ValueError – if the measured position is more than 5 deg from any predefined stop (drive is in transit or drifted).

Return type:

RotationDriveOrientation