pylabrobot.centrifuge.highres.microspin_backend.MicroSpinBackend#

class pylabrobot.centrifuge.highres.microspin_backend.MicroSpinBackend(host: str, port: int = 1000, timeout: float = 30.0)#

Bases: CentrifugeBackend

Asynchronous backend for the HighRes Biosolutions MicroSpin centrifuge.

Communicates over a single persistent TCP connection. Commands are serialised with an asyncio.Lock so the front-end can safely interleave callers.

Attributes

DEFAULT_PORT

Factory-default TCP port for the MicroSpin's remote-control server (manual §6.3).

DEFAULT_SPINDLE_POLL_INTERVAL

Default per-poll timeout for wait_for_spindle_stopped().

DEFAULT_SPINDLE_STOP_TIMEOUT

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).

LOW_G_WARNING_THRESHOLD

Empirically observed minimum below which the firmware sometimes fails to detect spin-down.

MAX_G_FORCE

Spec sheet maximum (manual §11).

SLOW_DECEL_WARNING_THRESHOLD

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.

STUCK_DECEL_WARNING_THRESHOLD

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_button_abort()

Clear the abort state (resets the latch set by abort or the front panel button).

close_door()

Not supported on the MicroSpin: door closing is firmware-managed.

deserialize(data)

get_all_instances()

go_to_bucket1()

Present bucket 1 at the load position.

go_to_bucket2()

Present bucket 2 at the load position (also opens the door).

home()

Home both axes (door and spindle).

is_homed()

Return True if the device reports homed to hss.

lock_bucket()

Not supported on the MicroSpin: nest locking is firmware-managed.

lock_door()

Not supported on the MicroSpin: door locking is firmware-managed.

open_door()

Not supported on the MicroSpin: there is no door-only open workflow.

request_errors([n])

Return the top n entries from the device's error stack.

request_status(*[, timeout])

Return the device's status report as a {field: value} dict.

request_version()

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.

serialize()

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.

unlock_bucket()

Not supported on the MicroSpin: nest unlocking is firmware-managed.

unlock_door()

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.

Parameters: