Skip to content

Commit

Permalink
feat(hardware-testing): Configurable plunger acceleration per liquid-…
Browse files Browse the repository at this point in the history
…class (#13038)
  • Loading branch information
andySigler authored Jul 11, 2023
1 parent 40d81f2 commit bc32ab3
Show file tree
Hide file tree
Showing 7 changed files with 625 additions and 594 deletions.
8 changes: 2 additions & 6 deletions hardware-testing/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -223,12 +223,8 @@ cleanup"
endef

.PHONY: sync-sw-ot3
sync-sw-ot3:
cd ../hardware && $(MAKE) push-ot3 host=$(host)
cd ../api && $(MAKE) push-ot3 host=$(host)
cd ../shared-data && $(MAKE) all push-ot3 host=$(host)
cd ../robot-server && $(MAKE) push-ot3 host=$(host)
cd ../hardware-testing && $(MAKE) push-ot3 host=$(host)
sync-sw-ot3: push-ot3
cd .. && $(MAKE) push-ot3 host=$(host)

.PHONY: sync-fw-ot3
sync-fw-ot3:
Expand Down
11 changes: 7 additions & 4 deletions hardware-testing/hardware_testing/gravimetric/execute.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Gravimetric."""
from time import sleep
from dataclasses import dataclass
from inspect import getsource
from statistics import stdev
Expand Down Expand Up @@ -113,7 +114,7 @@ def _reduce_volumes_to_not_exceed_software_limit(
liq_cls = get_liquid_class(
cfg.pipette_volume, cfg.pipette_channels, cfg.tip_volume, int(v)
)
max_vol = cfg.tip_volume - liq_cls.aspirate.air_gap.trailing_air_gap
max_vol = cfg.tip_volume - liq_cls.aspirate.trailing_air_gap
test_volumes[i] = min(v, max_vol - 0.1)
return test_volumes

Expand Down Expand Up @@ -663,7 +664,8 @@ def run(ctx: ProtocolContext, cfg: config.GravimetricConfig) -> None:
setup_channel_offset = _get_channel_offset(cfg, channel=0)
first_tip_location = first_tip.top().move(setup_channel_offset)
_pick_up_tip(ctx, pipette, cfg, location=first_tip_location)
pipette.home()
mnt = OT3Mount.LEFT if cfg.pipette_mount == "left" else OT3Mount.RIGHT
ctx._core.get_hardware().retract(mnt)
if not ctx.is_simulating():
ui.get_user_ready("REPLACE first tip with NEW TIP")
ui.get_user_ready("CLOSE the door, and MOVE AWAY from machine")
Expand All @@ -689,9 +691,10 @@ def run(ctx: ProtocolContext, cfg: config.GravimetricConfig) -> None:
pipette.move_to(hover_pos)
for i in range(config.SCALE_SECONDS_TO_TRUE_STABILIZE):
print(
f"wait {i + 1}/{config.SCALE_SECONDS_TO_TRUE_STABILIZE} seconds before"
f" measuring evaporation"
f"wait for scale to stabilize "
f"({i + 1}/{config.SCALE_SECONDS_TO_TRUE_STABILIZE})"
)
sleep(1)
actual_asp_list_evap: List[float] = []
actual_disp_list_evap: List[float] = []
for trial in range(config.NUM_BLANK_TRIALS):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

from hardware_testing.data.csv_report import CSVReport
from hardware_testing.data import create_run_id_and_start_time, ui, get_git_description
from hardware_testing.opentrons_api.types import Point
from hardware_testing.opentrons_api.types import Point, OT3Mount
from .measurement import (
MeasurementType,
create_measurement_tag,
Expand Down Expand Up @@ -72,7 +72,7 @@ def _reduce_volumes_to_not_exceed_software_limit(
) -> List[float]:
for i, v in enumerate(test_volumes):
liq_cls = get_liquid_class(cfg.pipette_volume, 96, cfg.tip_volume, int(v))
max_vol = cfg.tip_volume - liq_cls.aspirate.air_gap.trailing_air_gap
max_vol = cfg.tip_volume - liq_cls.aspirate.trailing_air_gap
test_volumes[i] = min(v, max_vol - 0.1)
return test_volumes

Expand Down Expand Up @@ -493,7 +493,8 @@ def _next_tip() -> Well:
setup_tip = tips[0][0]
volume_for_setup = max(test_volumes)
_pick_up_tip(ctx, pipette, cfg, location=setup_tip.top())
pipette.home()
mnt = OT3Mount.LEFT if cfg.pipette_mount == "left" else OT3Mount.RIGHT
ctx._core.get_hardware().retract(mnt)
if not ctx.is_simulating():
ui.get_user_ready("REPLACE first tip with NEW TIP")
required_ul = max(
Expand Down
Loading

0 comments on commit bc32ab3

Please sign in to comment.