This commit is contained in:
2026-01-22 15:42:29 +01:00
parent c6c33556bc
commit dc34d92412
+1 -4
View File
@@ -148,20 +148,17 @@ class GalilRIO(PSIDeviceBase):
def read(self):
"""Read all 8 analog input channels from the Galil RIO controller."""
# Get number of channels
channels: list[tuple[int, str]] = [()]
channels: list[tuple[int, str]] = []
res = {}
# This yields tuples of cpt, signal
for walk in self.walk_signals():
logger.info(f"Walking signal: {walk.item.name} of type {type(walk.item)}")
if isinstance(walk.item, GalilRIOSignalRO):
logger.info(f"Adding channel {walk.item._channel} ({walk.item.name}) to read list")
channels.append(
(walk.item._channel, walk.item.name)
) # pylint: disable=protected-access
# Read all channels in one command
logger.info(f"Reading channels: {channels}")
cmd = "MG@" + ",@".join([f"AN[{ii}]" for ii, _ in channels])
logger.info(f"Reading Galil RIO channels with command: {cmd}")
ret = self.controller.socket_put_and_receive(cmd)