Files
dev/script/test/TestInterlock.py
2019-03-20 13:52:00 +01:00

40 lines
569 B
Python

"""
class MyInterlock1 (Interlock):
def __init__(self):
Interlock.__init__(self, (motor, motor2))
def check(self, (m, m2)):
if m2>m:
return False
return True
"""
class MyInterlock1 (Interlock):
def __init__(self):
Interlock.__init__(self, (table,))
def check(self, (t,)):
m,m2 = t
if m2>m:
return False
return True
i1 = MyInterlock1()
set_exec_pars(then = "i1.close()")
show_panel(table)
table.move([0.0, 0.0], 1.0)
table.move([1.0, 1.0], 2.0)