Liquid Handling and Robots
You already know your liquid handler. This tab shows how to drive it from Python with UniteLabs.
Before you start, your device should be connected and responding (Devices), and the labware you plan to use should exist as definitions (Labware). New to UniteLabs? Liquid handling as code builds the script below one step at a time.
unitelabs-liquid-handling 0.39 with unitelabs-labware 0.37. If an import fails, check your installed versions first: Versions shows how.What a script looks like
A full transfer against the STAR simulator: tips, a trough, and a plate on 2 carriers, then 100 µL
into column 1. On hardware you connect a MicrolabSTAR instead of the mock (see
Basic Pipetting), and the deck and
pipetting code stay the same.
import asyncio
from unitelabs.labware import PredefinedLiquids, Standard96Plate, StandardTrough
from unitelabs.labware.hamilton import (
PLT_CAR_L5MD_A00,
TIP_CAR_480_A00,
HamiltonTip_300,
HamiltonTipRack_300,
LiquidClass,
)
from unitelabs.liquid_handling.testing import MicrolabSTARMock
async def run():
lh = MicrolabSTARMock()
await lh.configure()
await lh.initialize()
# Labware goes on carriers, carriers go on deck tracks
tip_rack = HamiltonTipRack_300(filled_with=HamiltonTip_300, identifier="tip_rack")
plate = Standard96Plate(identifier="destination_plate")
trough = StandardTrough(identifier="water_source")
trough.containers[0].add_liquid(PredefinedLiquids.WATER, 150_000) # 150 mL
tip_carrier = TIP_CAR_480_A00(identifier="tip_carrier")
plate_carrier = PLT_CAR_L5MD_A00(identifier="plate_carrier")
tip_carrier[0] = tip_rack
plate_carrier[0] = plate
plate_carrier[1] = trough
lh.deck.add(tip_carrier, track=7)
lh.deck.add(plate_carrier, track=1)
# 100 µL of water into column 1
water = LiquidClass.HamiltonTip_300_Water_DispenseJet_Empty()
await lh.pipettes.pick_up_tips_from(channels=range(8), rack=tip_rack)
await lh.pipettes.aspirate(source=trough, channels=range(8), volume=100, liquid_class=water)
await lh.pipettes.dispense(target=plate["A1":"H1"], channels=range(8), volume=100, liquid_class=water)
await lh.pipettes.discard_tips(channels=range(8))
asyncio.run(run())
Build the deck
- Building a Deck: place carriers on tracks and labware on carriers.
- Save and Load a Deck: store a layout as JSON and reload it in every run.
Pipette
- Basic Pipetting: aspirate and dispense on Hamilton and Bravo.
- Tip Handling: pick up, return, and discard tips.
- Liquid Classes: use the predefined classes or write your own.
- Advanced Pipetting: parameter sets you reuse across steps.
- Labware Transport: move plates with whichever gripper your device has.
Rehearse in simulation
Simulation covers the mocks for the STAR, Vantage, Bravo, Freedom EVO, and Biomek. They track liquid in every well, so overfills and empty aspirations show up before the robot moves.
Your device
The model behind all of this (how a deck becomes a tree of positions, how liquid classes and parameter sets split the work) lives in Concepts.
Last updated