Skip to content
Snippets Groups Projects
Commit 720d9a88 authored by Hayden Swanson's avatar Hayden Swanson
Browse files

added channel 3 for power cycle

parent 6a7a8585
No related branches found
No related tags found
1 merge request!134Power cycle hayden
Pipeline #7785597 passed
......@@ -10,10 +10,10 @@ if __name__ == '__main__':
argParser.add_argument('--verbose', action='store_true', default=False, help="Verbose PSU monitor")
argParser.add_argument('--power_down', action='store_true', default=False, help="Just power down")
argParser.add_argument('--ip', action='store', default="192.168.2.3", help="IP address of PSU to power cycle")
argParser.add_argument('--ch', action='store', default="ch1,ch2", help="Channels of PSU to power cycle")
argParser.add_argument('--ch', action='store', default="ch1,ch2,ch3", help="Channels of PSU to power cycle, can set by comma seperated value, ex: ch1,ch2")
args = argParser.parse_args()
assert args.ch in "ch1,ch2,ch3", "Only channel 1 and channel 2 are available."
assert args.ch in "ch1,ch2,ch3", "Only channel 1, channel 2, and channel 3 are available."
if args.ip == "192.168.2.1":
name = "Readout"
......@@ -21,6 +21,8 @@ if __name__ == '__main__':
name = "Emulator"
elif args.ip == "192.168.2.3":
name = "CI"
elif args.ip == "192.168.0.25":
name = "CERN Power Supply"
else:
name = "Unknown"
......@@ -28,7 +30,7 @@ if __name__ == '__main__':
print (f"PS -- {name}")
channels = [ch for ch in args.ch.split(',')]
print(channels)
for ch in channels:
print("Channel", ch)
if args.power_down:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment