Skip to content

Commit 14b8867

Browse files
BioCamrickwierenga
andauthored
Create STARBackend.request_x_pos_channel_n() (#672)
Co-authored-by: Rick Wierenga <rick_wierenga@icloud.com>
1 parent 2fefadb commit 14b8867

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

pylabrobot/liquid_handling/backends/hamilton/STAR_backend.py

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3982,15 +3982,16 @@ async def release_all_occupied_areas(self):
39823982

39833983
# -------------- 3.4.3 X-query --------------
39843984

3985-
async def request_left_x_arm_position(self):
3985+
async def request_left_x_arm_position(self) -> float:
39863986
"""Request left X-Arm position"""
3987+
resp_dmm = await self.send_command(module="C0", command="RX", fmt="rx#####")
3988+
return cast(float, resp_dmm["rx"]) / 10
39873989

3988-
return await self.send_command(module="C0", command="RX", fmt="rx#####")
3989-
3990-
async def request_right_x_arm_position(self):
3990+
async def request_right_x_arm_position(self) -> float:
39913991
"""Request right X-Arm position"""
39923992

3993-
return await self.send_command(module="C0", command="QX", fmt="rx#####")
3993+
resp_dmm = await self.send_command(module="C0", command="QX", fmt="rx#####")
3994+
return cast(float, resp_dmm["rx"]) / 10
39943995

39953996
async def request_maximal_ranges_of_x_drives(self):
39963997
"""Request maximal ranges of X drives"""
@@ -5093,6 +5094,14 @@ async def move_all_channels_in_z_safety(self):
50935094

50945095
# TODO:(command:RY): Request Y-Positions of all pipetting channels
50955096

5097+
async def request_x_pos_channel_n(self, pipetting_channel_index: int = 0) -> float:
5098+
"""Request X-Position of Pipetting channel n (in mm)"""
5099+
5100+
resp = await self.request_left_x_arm_position()
5101+
# TODO: check validity for 2 X-arm system
5102+
5103+
return round(resp, 1)
5104+
50965105
async def request_y_pos_channel_n(self, pipetting_channel_index: int) -> float:
50975106
"""Request Y-Position of Pipetting channel n
50985107

0 commit comments

Comments
 (0)