From c1e0583401a45bac3d003e6a4933da752374f87b Mon Sep 17 00:00:00 2001 From: Camillo Moschner Date: Tue, 2 Sep 2025 17:48:01 +0100 Subject: [PATCH 1/2] Expose request_y_pos_iswap_channel --- .../backends/hamilton/STAR_backend.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/pylabrobot/liquid_handling/backends/hamilton/STAR_backend.py b/pylabrobot/liquid_handling/backends/hamilton/STAR_backend.py index 5fff3f594ba..966eb6fe6a6 100644 --- a/pylabrobot/liquid_handling/backends/hamilton/STAR_backend.py +++ b/pylabrobot/liquid_handling/backends/hamilton/STAR_backend.py @@ -6402,6 +6402,19 @@ async def position_components_for_free_iswap_y_range(self): """Position all components so that there is maximum free Y range for iSWAP""" return await self.send_command(module="C0", command="FY") + + async def request_y_pos_iswap_channel(self): + """ Query the current Y-axis position of the iSWAP channel. """ + + y_pos_query_increments = await self.send_command( + module="R0", + command="RY", + fmt="ry######", + ) + + y_pos_query_mm = self.y_drive_increment_to_mm(y_pos_query_increments["ry"]) + + return round(y_pos_query_mm, 1) async def move_iswap_x_relative(self, step_size: float, allow_splitting: bool = False): """ From de447fbc7c88531f0f81831319221ff0c20d600a Mon Sep 17 00:00:00 2001 From: Camillo Moschner Date: Tue, 2 Sep 2025 17:57:28 +0100 Subject: [PATCH 2/2] `make format` --- .../backends/hamilton/STAR_backend.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pylabrobot/liquid_handling/backends/hamilton/STAR_backend.py b/pylabrobot/liquid_handling/backends/hamilton/STAR_backend.py index 966eb6fe6a6..7f045918a1a 100644 --- a/pylabrobot/liquid_handling/backends/hamilton/STAR_backend.py +++ b/pylabrobot/liquid_handling/backends/hamilton/STAR_backend.py @@ -6402,15 +6402,15 @@ async def position_components_for_free_iswap_y_range(self): """Position all components so that there is maximum free Y range for iSWAP""" return await self.send_command(module="C0", command="FY") - + async def request_y_pos_iswap_channel(self): - """ Query the current Y-axis position of the iSWAP channel. """ - + """Query the current Y-axis position of the iSWAP channel.""" + y_pos_query_increments = await self.send_command( - module="R0", - command="RY", - fmt="ry######", - ) + module="R0", + command="RY", + fmt="ry######", + ) y_pos_query_mm = self.y_drive_increment_to_mm(y_pos_query_increments["ry"])