Files
HVDistributionBox/relaistest.py

28 lines
756 B
Python

from ModuleTestBox import ModuleTestBox
from time import sleep
hints=["VID:PID=CAFE:4001"]
with ModuleTestBox(hints=hints, verbose=True) as hvp:
while True:
try:
for x in range(1, 9):
hvp.SelectChannel(x)
hvp.Bias_Enable(1)
hvp.Bias_SetV(0)
# sleep(0.1)
# sleep(0.1)
print(hvp.Bias_GetAll())
input("Press enter to turn off Relais")
for x in range(1, 9):
hvp.SelectChannel(x)
hvp.Bias_Enable(0)
hvp.Bias_SetV(0)
# sleep(0.1)
print(hvp.Bias_GetAll())
except KeyboardInterrupt:
print("KeyboardInterrupt")
break