pylabrobot.centrifuge.highres.microspin_backend.MicroSpinBackend#
- class pylabrobot.centrifuge.highres.microspin_backend.MicroSpinBackend(host: str, port: int = 1000, timeout: float = 30.0)#
Bases:
CentrifugeBackendAsynchronous backend for the HighRes Biosolutions MicroSpin centrifuge.
Communicates over a single persistent TCP connection. Commands are serialised with an
asyncio.Lockso the front-end can safely interleave callers.Attributes
Factory-default TCP port for the MicroSpin's remote-control server (manual §6.3).
Default per-poll timeout for
wait_for_spindle_stopped().Default overall budget for
wait_for_spindle_stopped()-- 30 min, chosen to comfortably cover the worst-case observed decel (~17 min for a high-G spin on the slow-decel curve, e.g.spin 1000 100 10 5).Empirically observed minimum below which the firmware sometimes fails to detect spin-down.
Spec sheet maximum (manual §11).
Deceleration fraction (0-1) below which spin-down is slow but legitimate: a tested
spin 1000 100 20 10(decel = 0.20) took ~7 minutes to fully stop.Deceleration fraction (0-1) below which the firmware appears to hang rather than just be slow: a tested
spin 1000 100 10 10(decel = 0.10) ran for >30 minutes without ever reporting spin-down.Methods
__init__(host[, port, timeout])abort(*[, timeout])Decelerate the rotor and stop the current operation.
Clear the abort state (resets the latch set by
abortor the front panel button).Not supported on the MicroSpin: door closing is firmware-managed.
deserialize(data)Present bucket 1 at the load position.
Present bucket 2 at the load position (also opens the door).
home()Home both axes (door and spindle).
is_homed()Return
Trueif the device reportshomedtohss.Not supported on the MicroSpin: nest locking is firmware-managed.
Not supported on the MicroSpin: door locking is firmware-managed.
Not supported on the MicroSpin: there is no door-only open workflow.
request_errors([n])Return the top
nentries from the device's error stack.request_status(*[, timeout])Return the device's status report as a
{field: value}dict.Return the firmware/library version report as a
{field: value}dict.reset(*[, abort_timeout, settle_timeout, ...])Bring the device back to a clean, ready-to-command state.
send_command(command, *[, timeout])Send a single command and return any data lines emitted by the device.
Return a JSON-serialisable view of this backend's construction args.
setup()Open the TCP connection to the MicroSpin's remote-control server.
spin(g, duration[, acceleration, deceleration])Start a spin cycle on the MicroSpin.
stop()Close the TCP connection.
Not supported on the MicroSpin: nest unlocking is firmware-managed.
Not supported on the MicroSpin: door unlocking is firmware-managed.
wait_for_spindle_stopped(*[, timeout, ...])Block until the firmware confirms the rotor is fully stopped.