|
| 1 | +import asyncio |
1 | 2 | import datetime |
2 | 3 | import enum |
3 | 4 | import functools |
@@ -1381,33 +1382,40 @@ async def setup( |
1381 | 1382 |
|
1382 | 1383 | await self.pre_initialize_instrument() |
1383 | 1384 |
|
1384 | | - if not initialized or any(tip_presences): |
1385 | | - await self.initialize_pip() |
| 1385 | + async def pip(): |
| 1386 | + if not initialized or any(tip_presences): |
| 1387 | + await self.initialize_pip() |
1386 | 1388 |
|
1387 | | - if self.autoload_installed and not skip_autoload: |
1388 | | - autoload_initialized = await self.request_autoload_initialization_status() |
1389 | | - if not autoload_initialized: |
1390 | | - await self.initialize_autoload() |
| 1389 | + async def autoload(): |
| 1390 | + if self.autoload_installed and not skip_autoload: |
| 1391 | + autoload_initialized = await self.request_autoload_initialization_status() |
| 1392 | + if not autoload_initialized: |
| 1393 | + await self.initialize_autoload() |
1391 | 1394 |
|
1392 | | - await self.park_autoload() |
1393 | | - |
1394 | | - if self.iswap_installed and not skip_iswap: |
1395 | | - iswap_initialized = await self.request_iswap_initialization_status() |
1396 | | - if not iswap_initialized: |
1397 | | - await self.initialize_iswap() |
| 1395 | + await self.park_autoload() |
1398 | 1396 |
|
1399 | | - await self.park_iswap( |
1400 | | - minimum_traverse_height_at_beginning_of_a_command=int(self._iswap_traversal_height * 10) |
1401 | | - ) |
| 1397 | + async def iswap(): |
| 1398 | + if self.iswap_installed and not skip_iswap: |
| 1399 | + iswap_initialized = await self.request_iswap_initialization_status() |
| 1400 | + if not iswap_initialized: |
| 1401 | + await self.initialize_iswap() |
1402 | 1402 |
|
1403 | | - if self.core96_head_installed and not skip_core96_head: |
1404 | | - core96_head_initialized = await self.request_core_96_head_initialization_status() |
1405 | | - if not core96_head_initialized: |
1406 | | - await self.initialize_core_96_head( |
1407 | | - trash96=self.deck.get_trash_area96(), |
1408 | | - z_position_at_the_command_end=self._channel_traversal_height, |
| 1403 | + await self.park_iswap( |
| 1404 | + minimum_traverse_height_at_beginning_of_a_command=int(self._iswap_traversal_height * 10) |
1409 | 1405 | ) |
1410 | 1406 |
|
| 1407 | + async def core96_head(): |
| 1408 | + if self.core96_head_installed and not skip_core96_head: |
| 1409 | + core96_head_initialized = await self.request_core_96_head_initialization_status() |
| 1410 | + if not core96_head_initialized: |
| 1411 | + await self.initialize_core_96_head( |
| 1412 | + trash96=self.deck.get_trash_area96(), |
| 1413 | + z_position_at_the_command_end=self._channel_traversal_height, |
| 1414 | + ) |
| 1415 | + |
| 1416 | + await pip() |
| 1417 | + await asyncio.gather(autoload(), iswap(), core96_head()) |
| 1418 | + |
1411 | 1419 | # After setup, STAR will have thrown out anything mounted on the pipetting channels, including |
1412 | 1420 | # the core grippers. |
1413 | 1421 | self._core_parked = True |
|
0 commit comments