Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions pylabrobot/liquid_handling/backends/hamilton/STAR_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -6829,24 +6829,31 @@ async def park_autoload(self):

# TODO:(command:CA) Push out carrier to loading tray (after identification CI)

async def unload_carrier(self, carrier: Carrier):
async def unload_carrier(
self,
carrier: Carrier,
park_autoload_after: bool = True,
):
"""Use autoload to unload carrier."""
# Identify carrier end rail
track_width = 22.5
carrier_width = carrier.get_location_wrt(self.deck).x - 100 + carrier.get_absolute_size_x()
carrier_end_rail = int(carrier_width / track_width)

assert 1 <= carrier_end_rail <= 54, "carrier loading rail must be between 1 and 54"

carrier_end_rail_str = str(carrier_end_rail).zfill(2)

# Unload and read out barcodes
# Unload
resp = await self.send_command(
module="C0",
command="CR",
cp=carrier_end_rail_str,
)
# Park autoload
await self.park_autoload()

if park_autoload_after:
await self.park_autoload()

return resp

async def load_carrier(
Expand Down