Startup
This commit is contained in:
39
script/test/TestInterlock.py
Normal file
39
script/test/TestInterlock.py
Normal file
@@ -0,0 +1,39 @@
|
||||
|
||||
"""
|
||||
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)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user