Skip to content

Commit

Permalink
give 96ch the same homing current as run
Browse files Browse the repository at this point in the history
  • Loading branch information
caila-marashaj committed Aug 24, 2023
1 parent e86c105 commit 8ca7a08
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 6 deletions.
10 changes: 10 additions & 0 deletions api/src/opentrons/hardware_control/ot3api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1323,6 +1323,16 @@ async def _retrieve_home_position() -> Tuple[
await self._backend.home([axis], self.gantry_load)
else:
# both stepper and encoder positions are invalid, must home
if axis in Axis.pipette_axes():
# if we're homing a pipette for the first time, should do it
# at the homing current
mount = Axis.to_ot3_mount(axis)
instr = self._pipette_handler.hardware_instruments[mount]

if instr is not None:
await self._backend.set_active_current(
{axis: instr.plunger_motor_current.homing}
)
await self._backend.home([axis], self.gantry_load)

async def _home(self, axes: Sequence[Axis]) -> None:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"distance": 19.0
},
"dropTipConfigurations": { "current": 1.5, "speed": 5.5, "distance": 26.5 },
"plungerMotorConfigurations": { "idle": 0.3, "run": 2.0 },
"plungerMotorConfigurations": { "idle": 0.3, "run": 2.0, "homing": 2.0 },
"plungerPositionsConfigurations": {
"default": {
"top": 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"distance": 19.0
},
"dropTipConfigurations": { "current": 1.5, "speed": 5.5, "distance": 26.5 },
"plungerMotorConfigurations": { "idle": 0.3, "run": 2.0 },
"plungerMotorConfigurations": { "idle": 0.3, "run": 2.0, "homing": 2.0 },
"plungerPositionsConfigurations": {
"default": {
"top": 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"distance": 19.0
},
"dropTipConfigurations": { "current": 1.5, "speed": 5.5, "distance": 26.5 },
"plungerMotorConfigurations": { "idle": 0.3, "run": 2.0 },
"plungerMotorConfigurations": { "idle": 0.3, "run": 2.0, "homing": 2.0 },
"plungerPositionsConfigurations": {
"default": {
"top": 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
},
"plungerMotorConfigurations": {
"idle": 0.3,
"run": 0.8
"run": 0.8,
"homing": 0.8
},
"plungerPositionsConfigurations": {
"default": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
},
"plungerMotorConfigurations": {
"idle": 0.3,
"run": 0.8
"run": 0.8,
"homing": 0.8
},
"plungerPositionsConfigurations": {
"default": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ class PipetteModelSpec(TypedDict, total=False):
pickUpPresses: PipetteCustomizableConfigElementInt
pickUpSpeed: PipetteCustomizableConfigElementFloat
plungerCurrent: PipetteCustomizableConfigElementFloat
plungerHomingCurrent: float
dropTipCurrent: PipetteCustomizableConfigElementFloat
dropTipSpeed: PipetteCustomizableConfigElementFloat
modelOffset: List[float]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ def _build_motor_configurations(
if model_configurations:
run = model_configurations["plungerCurrent"]["value"]
idle = model_configurations.get("idleCurrent", run)
homing = model_configurations.get("plungerHomingCurrent", run)
else:
print("Handling default plunger motor currents\n")
idle = float(
Expand All @@ -105,7 +106,10 @@ def _build_motor_configurations(
run = float(
input("Please provide the default run current of the plunger motor\n")
)
return MotorConfigurations(idle=idle, run=run)
homing = float(
input("Please provide the default homing current of the plunger motor\n")
)
return MotorConfigurations(idle=idle, run=run, homing=homing)


def _build_partial_tip_configurations(channels: int) -> PartialTipDefinition:
Expand Down

0 comments on commit 8ca7a08

Please sign in to comment.