diff --git a/pylabrobot/liquid_handling/backends/hamilton/STAR_backend.py b/pylabrobot/liquid_handling/backends/hamilton/STAR_backend.py index fbecc6703a2..1545b399cb2 100644 --- a/pylabrobot/liquid_handling/backends/hamilton/STAR_backend.py +++ b/pylabrobot/liquid_handling/backends/hamilton/STAR_backend.py @@ -1366,7 +1366,7 @@ def __init__( self._unsafe = UnSafe(self) self._iswap_version: Optional[str] = None # loaded lazily - self._pip_channel_information: List[PipChannelInformation] = [] + self._pip_channel_information: Optional[List[PipChannelInformation]] = None self._default_1d_symbology: Barcode1DSymbology = "Code 128 (Subset B and C)" @@ -1536,6 +1536,12 @@ async def _pip_channel_request_configuration(self, channel: int) -> PipChannelIn Args: channel: 0-indexed channel number. """ + pip_fw = self._parse_firmware_version_datetime(await self.request_pip_channel_version(channel)) + if pip_fw.year <= 2016: + raise RuntimeError( + f"VW (pip channel configuration) is not supported on firmware from 2016 or older " + f"(channel {channel} firmware date: {pip_fw.isoformat()})." + ) resp: str = await self.send_command(STARBackend.channel_id(channel), "VW") hw_tokens = resp.split("vw")[-1].strip().split() return PipChannelInformation( @@ -1720,10 +1726,15 @@ async def set_up_pip(): await self.initialize_pip() self._channels_minimum_y_spacing = await self.channels_request_y_minimum_spacing() - # Cache per-channel hardware configuration for version-specific behavior - self._pip_channel_information = [ - await self._pip_channel_request_configuration(ch) for ch in range(self.num_channels) - ] + # VW is not supported on firmware from 2016 or older (see issue #1004). Skip the + # query there and leave the cache as None; otherwise populate it for every channel. + pip_fw = self._parse_firmware_version_datetime(await self.request_pip_channel_version(0)) + if pip_fw.year <= 2016: + self._pip_channel_information = None + else: + self._pip_channel_information = [ + await self._pip_channel_request_configuration(ch) for ch in range(self.num_channels) + ] async def set_up_autoload(): if self.machine_conf.auto_load_installed and not skip_autoload: