This commit is contained in:
x03daop
2015-09-01 10:09:12 +02:00
parent e104c934af
commit f3c57cbe5a
26 changed files with 789 additions and 11 deletions

View File

@@ -0,0 +1,46 @@
"""
Interlocks: example on creating and installing device interlock rules.
"""
class MyInterlock1 (Interlock):
#Motor and Positioners
def __init__(self):
Interlock.__init__(self, (m1, p1))
def check(self, (m, p)):
if p<500 and (m<5 and m>4):
return False
return True
interlock1 = MyInterlock1()
"""
#Motor group
class MyInterlock2(Interlock):
def __init__(self):
Interlock.__init__(self, (mg1, p1))
def check(self, ((m1,m2), p)):
if p<500 and (m1>4 and m2>4):
return False
return True
interlock2 = MyInterlock2()
"""
"""
#Discrete Positioner
class MyInterlock3(Interlock):
def __init__(self):
Interlock.__init__(self, (dp1, p1))
def check(self, (dp, p)):
if p<500 and dp=="Out":
return False
return True
#interlock3 = MyInterlock3()
"""