Read every channel on a module

Read every channel on a module#

#!/usr/bin/env python3
import time
import synergy_logic

base = synergy_logic.Base()
module = base[1]              # SLM-AI-8-V

while True:
    for index, channel in enumerate(module[1:], start=1):
        print(f"Channel {index}: {channel.value:5d} counts  {channel.real:6.2f} V")
    print("-" * 40)
    time.sleep(0.5)

Slicing a module (module[1:]) yields its channel objects, which is tidier than indexing in a loop.