Skip to content

Commit 429c089

Browse files
committed
[STARBackend] move channels to z-safety if pre_initialize doesn't run
1 parent e3eac5c commit 429c089

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

pylabrobot/liquid_handling/backends/hamilton/STAR_backend.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1381,10 +1381,16 @@ async def setup(
13811381

13821382
initialized = await self.request_instrument_initialization_status()
13831383

1384-
if not initialized and not skip_instrument_initialization:
1385-
logger.info("Running backend initialization procedure.")
1384+
if not initialized:
1385+
if not skip_instrument_initialization:
1386+
logger.info("Running backend initialization procedure.")
13861387

1387-
await self.pre_initialize_instrument()
1388+
await self.pre_initialize_instrument()
1389+
else:
1390+
# pre_initialize only runs when the robot is not initialized
1391+
# pre_initialize will move all channels to Z safety
1392+
# so if we skip pre_initialize, we need to raise the channels ourselves
1393+
await self.move_all_channels_in_z_safety()
13881394

13891395
tip_presences = await self.request_tip_presence()
13901396
self._num_channels = len(tip_presences)

0 commit comments

Comments
 (0)