Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(api, shared-data): Update LLD settings after testing #16018

Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion api/src/opentrons/config/defaults_ot3.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

DEFAULT_LIQUID_PROBE_SETTINGS: Final[LiquidProbeSettings] = LiquidProbeSettings(
mount_speed=5,
plunger_speed=20,
plunger_speed=15,
plunger_impulse_time=0.2,
sensor_threshold_pascals=15,
output_option=OutputOptions.sync_buffer_to_csv,
Expand Down
45 changes: 29 additions & 16 deletions api/tests/opentrons/hardware_control/test_ot3_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def fake_settings() -> CapacitivePassSettings:
def fake_liquid_settings() -> LiquidProbeSettings:
return LiquidProbeSettings(
mount_speed=5,
plunger_speed=20,
plunger_speed=15,
plunger_impulse_time=0.2,
sensor_threshold_pascals=15,
output_option=OutputOptions.can_bus_only,
Expand Down Expand Up @@ -820,19 +820,31 @@ async def test_liquid_probe(
mock_liquid_probe.return_value = 140
fake_settings_aspirate = LiquidProbeSettings(
mount_speed=5,
plunger_speed=20,
plunger_speed=15,
plunger_impulse_time=0.2,
sensor_threshold_pascals=15,
output_option=OutputOptions.can_bus_only,
aspirate_while_sensing=True,
data_files={InstrumentProbeType.PRIMARY: "fake_file_name"},
)
fake_max_z_dist = 10.0
non_responsive_z_mm = ot3_hardware.liquid_probe_non_responsive_z_distance(
fake_settings_aspirate.mount_speed
)

probe_pass_overlap = 0.1
probe_pass_z_offset_mm = non_responsive_z_mm + probe_pass_overlap
probe_safe_reset_mm = max(2.0, probe_pass_z_offset_mm)

await ot3_hardware.liquid_probe(mount, fake_max_z_dist, fake_settings_aspirate)
mock_move_to_plunger_bottom.call_count == 2
mock_liquid_probe.assert_called_once_with(
mount,
46,
(
(fake_max_z_dist - probe_pass_z_offset_mm + probe_safe_reset_mm)
/ fake_settings_aspirate.mount_speed
)
* fake_settings_aspirate.plunger_speed,
fake_settings_aspirate.mount_speed,
(fake_settings_aspirate.plunger_speed * -1),
fake_settings_aspirate.sensor_threshold_pascals,
Expand Down Expand Up @@ -894,7 +906,6 @@ async def test_liquid_probe_plunger_moves(
PipetteLiquidNotFoundError,
PipetteLiquidNotFoundError,
PipetteLiquidNotFoundError,
PipetteLiquidNotFoundError,
140,
]

Expand All @@ -909,17 +920,6 @@ async def test_liquid_probe_plunger_moves(
probe_pass_z_offset_mm = non_responsive_z_mm + probe_pass_overlap
probe_safe_reset_mm = max(2.0, probe_pass_z_offset_mm)

# simulate multiple passes of liquid probe
mock_gantry_position.side_effect = [
Point(x=0, y=0, z=100),
Point(x=0, y=0, z=100),
Point(x=0, y=0, z=100),
Point(x=0, y=0, z=82.15),
Point(x=0, y=0, z=64.3),
Point(x=0, y=0, z=46.45),
Point(x=0, y=0, z=28.6),
Point(x=0, y=0, z=25),
]
probe_start_pos = await ot3_hardware.gantry_position(mount)
safe_plunger_pos = Point(
probe_start_pos.x,
Expand All @@ -930,7 +930,20 @@ async def test_liquid_probe_plunger_moves(
p_impulse_mm = config.plunger_impulse_time * config.plunger_speed
p_total_mm = pipette.plunger_positions.bottom - pipette.plunger_positions.top
p_working_mm = p_total_mm - (pipette.backlash_distance + p_impulse_mm)

# simulate multiple passes of liquid probe
z_pass = (
(p_total_mm - pipette.backlash_distance)
/ config.plunger_speed
* config.mount_speed
)
mock_gantry_position.side_effect = [
Point(x=0, y=0, z=100),
Point(x=0, y=0, z=100),
Point(x=0, y=0, z=100 - z_pass),
Point(x=0, y=0, z=100 - 2 * z_pass),
Point(x=0, y=0, z=100 - 3 * z_pass),
Point(x=0, y=0, z=25),
]
max_z_time = (
fake_max_z_dist - (probe_start_pos.z - safe_plunger_pos.z)
) / config.mount_speed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def test_configure_virtual_pipette_for_volume(
nozzle_map=result1.nozzle_map,
back_left_corner_offset=Point(-8.0, -22.0, -259.15),
front_right_corner_offset=Point(-8.0, -22.0, -259.15),
pipette_lld_settings={"t50": {"minHeight": 0.5, "minVolume": 0.0}},
pipette_lld_settings={"t50": {"minHeight": 1.0, "minVolume": 0.0}},
)
subject_instance.configure_virtual_pipette_for_volume(
"my-pipette", 1, result1.model
Expand All @@ -119,7 +119,7 @@ def test_configure_virtual_pipette_for_volume(
nozzle_map=result2.nozzle_map,
back_left_corner_offset=Point(-8.0, -22.0, -259.15),
front_right_corner_offset=Point(-8.0, -22.0, -259.15),
pipette_lld_settings={"t50": {"minHeight": 0.5, "minVolume": 0.0}},
pipette_lld_settings={"t50": {"minHeight": 1.0, "minVolume": 0.0}},
)


Expand Down
6 changes: 3 additions & 3 deletions shared-data/js/__tests__/pipettes.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,15 +151,15 @@ describe('pipette data accessors', () => {
},
lldSettings: {
t50: {
minHeight: 0.5,
minHeight: 1.0,
minVolume: 0,
},
t200: {
minHeight: 0.5,
minHeight: 1.0,
minVolume: 0,
},
t1000: {
minHeight: 0.5,
minHeight: 1.5,
minVolume: 0,
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@
},
"lldSettings": {
"t50": {
"minHeight": 0.5,
"minHeight": 1.0,
"minVolume": 0
},
"t200": {
"minHeight": 0.5,
"minHeight": 1.0,
"minVolume": 0
},
"t1000": {
"minHeight": 0.5,
"minHeight": 1.5,
"minVolume": 0
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@
},
"lldSettings": {
"t50": {
"minHeight": 0.5,
"minHeight": 1.0,
"minVolume": 0
},
"t200": {
"minHeight": 0.5,
"minHeight": 1.0,
"minVolume": 0
},
"t1000": {
"minHeight": 0.5,
"minHeight": 1.5,
"minVolume": 0
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@
},
"lldSettings": {
"t50": {
"minHeight": 0.5,
"minHeight": 1.0,
"minVolume": 0
},
"t200": {
"minHeight": 0.5,
"minHeight": 1.0,
"minVolume": 0
},
"t1000": {
"minHeight": 0.5,
"minHeight": 1.5,
"minVolume": 0
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@
},
"lldSettings": {
"t50": {
"minHeight": 0.5,
"minHeight": 1.0,
"minVolume": 0
},
"t200": {
"minHeight": 0.5,
"minHeight": 1.0,
"minVolume": 0
},
"t1000": {
"minHeight": 0.5,
"minHeight": 1.5,
"minVolume": 0
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
},
"lldSettings": {
"t50": {
"minHeight": 0.5,
"minHeight": 1.0,
"minVolume": 0
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
},
"lldSettings": {
"t50": {
"minHeight": 0.5,
"minHeight": 1.0,
"minVolume": 0
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
},
"lldSettings": {
"t50": {
"minHeight": 0.5,
"minHeight": 1.0,
"minVolume": 0
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
},
"lldSettings": {
"t50": {
"minHeight": 0.5,
"minHeight": 1.0,
"minVolume": 0
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -294,15 +294,15 @@
},
"lldSettings": {
"t50": {
"minHeight": 0.5,
"minHeight": 1.5,
"minVolume": 0
},
"t200": {
"minHeight": 0.5,
"minHeight": 1.5,
"minVolume": 0
},
"t1000": {
"minHeight": 0.5,
"minHeight": 2.0,
"minVolume": 0
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -294,15 +294,15 @@
},
"lldSettings": {
"t50": {
"minHeight": 0.5,
"minHeight": 1.5,
"minVolume": 0
},
"t200": {
"minHeight": 0.5,
"minHeight": 1.5,
"minVolume": 0
},
"t1000": {
"minHeight": 0.5,
"minHeight": 2.0,
"minVolume": 0
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -294,15 +294,15 @@
},
"lldSettings": {
"t50": {
"minHeight": 0.5,
"minHeight": 1.5,
"minVolume": 0
},
"t200": {
"minHeight": 0.5,
"minHeight": 1.5,
"minVolume": 0
},
"t1000": {
"minHeight": 0.5,
"minHeight": 2.0,
"minVolume": 0
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -294,15 +294,15 @@
},
"lldSettings": {
"t50": {
"minHeight": 0.5,
"minHeight": 1.5,
"minVolume": 0
},
"t200": {
"minHeight": 0.5,
"minHeight": 1.5,
"minVolume": 0
},
"t1000": {
"minHeight": 0.5,
"minHeight": 2.0,
"minVolume": 0
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -294,15 +294,15 @@
},
"lldSettings": {
"t50": {
"minHeight": 0.5,
"minHeight": 1.5,
"minVolume": 0
},
"t200": {
"minHeight": 0.5,
"minHeight": 1.5,
"minVolume": 0
},
"t1000": {
"minHeight": 0.5,
"minHeight": 2.0,
"minVolume": 0
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
},
"lldSettings": {
"t50": {
"minHeight": 0.5,
"minHeight": 1.0,
"minVolume": 0
},
"t200": {
"minHeight": 0.5,
"minHeight": 1.0,
"minVolume": 0
},
"t1000": {
"minHeight": 0.5,
"minHeight": 1.5,
"minVolume": 0
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
},
"lldSettings": {
"t50": {
"minHeight": 0.5,
"minHeight": 1.0,
"minVolume": 0
},
"t200": {
"minHeight": 0.5,
"minHeight": 1.0,
"minVolume": 0
},
"t1000": {
"minHeight": 0.5,
"minHeight": 1.5,
"minVolume": 0
}
}
Expand Down
Loading
Loading