Commit 4bf3d699 authored by Holger Witsch's avatar Holger Witsch

syntax corrections

parent 01917cee
Pipeline #17544 failed with stages
def gantry(command, element)
def gantry(command, element):
""" Usage: gantry [ command [element]]
Ex: gantry start pump
"""
if command == 'start':
if command == "start":
if element == "pump":
print("Starting Gantry Vacuum Pump")
# wwrite relay[3]
......@@ -26,35 +25,38 @@ def gantry(command, element)
return
elif command == "status":
print("Gantry Interlock Status")
ans = gantry_query_status()
split (ans)
etel,vacu,pres = gantry_query_status()
if not element:
stat_etel = gantry_status(status[0])
stat_vacu = gantry_status(int(status[1]))
stat_pres = gantry_status(int(status[2]))
stat_etel = gantry_status(etel)
stat_vacu = gantry_status(vacu)
stat_pres = gantry_status(pres)
print(" ETEL %s" % stat_etel)
print(" VACUUM %s" % stat_vacu)
print(" PRESSURE %s" % stat_pres)
elif element == "etel:
stat_etel = gantry_status(status[0])
elif element == "etel":
stat_etel = gantry_status(etel)
print(" ETEL %s" % stat_etel)
elif element == "vacuum:
stat_vacu = gantry_status(int(status[1]))
elif element == "vacuum":
stat_vacu = gantry_status(vacu)
print(" VACUUM %s" % stat_vacu)
elif element == "pressure:
stat_pres = gantry_status(int(status[2]))
elif element == "pressure":
stat_pres = gantry_status(pres)
print(" PRESSURE %s" % stat_pres)
else:
print("Error: not recognised")
else:
print("Command: not recognised")
def ganry_query_status:
def gantry_query_status():
"""
query status
"""
etel = vacu = pres = -1
etel = wago_redch relay[0]
vacu = wago_redch relay[1]
pres = wago_redch relay[2]
# etel = wago_redch relay[0]
# vacu = wago_redch relay[1]
# pres = wago_redch relay[2]
etel = vacu = pres = 1
return etel, vacu, pres
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment