This commit is contained in:
2018-04-17 12:05:48 +02:00
parent 14edc0e745
commit 58a1260003
428 changed files with 41350 additions and 477 deletions

View File

@@ -0,0 +1,51 @@
///////////////////////////////////////////////////////////////////////////////////////////////////
// Interlocks: example on creating and installing device interlock rules.
///////////////////////////////////////////////////////////////////////////////////////////////////
//Motor and Positioners
var MyInterlock1 = Java.extend(Interlock)
var interlock1 = new MyInterlock1( [m1, p1]) {
check: function (pos) {
m=pos[0]
p=pos[1]
if ((p<500) && (m<5) && (m>4)){
return false
}
return true
},
}
/*
//Motor group
var MyInterlock2 = Java.extend(Interlock)
var interlock2 = new MyInterlock2( [mg1, p1]) {
check: function (pos) {
print(pos)
mg=pos[0]
p=pos[1]
print(to_array(mg))
if ((p<500) && (mg[0]<5) && (mg[1]>4)){
return false
}
return true
},
}
*/
/*
//Discrete Positioner
var MyInterlock3 = Java.extend(Interlock)
interlock3 = new MyInterlock3( [dp1, p1]) {
check: function (pos) {
dp=pos[0]
p=pos[1]
print ("DP " + dp)
print ("P " + p)
if ((p<500) && (dp=="Out")){
return false
}
return true
},
}
*/