Script execution

This commit is contained in:
boccioli_m
2015-06-15 13:39:18 +02:00
parent e01693f0cd
commit 73fe9c6828

View File

@@ -71,11 +71,9 @@ idInkr.put(-100.0, timeout=None) # TODO: Set appropriate timeout
start = idInkr.get()+direction
for setpoint1 in range(0, 6):
sleep( 2 ) # Settling time
#RegionPositioner idInkr
for setpoint2 in frange(start, end, direction*end):
readback1 = setpoint1
sleep( 0.1 ) # Settling time
sleep( 2 ) # Settling time
#RegionPositioner idInkr
setpoint2 = end
idInkr.put(setpoint2, timeout=None) # TODO: Set appropriate timeout
readback2 = idInkr.get()
if abs(readback2 - setpoint2) > 1 : # TODO: Check accuracy
@@ -105,7 +103,6 @@ for setpoint1 in range(0, 6):
#Variable Mappings
a = detector4
b = detector8
count = setpoint1
idDiff02 = a-b
#Manipulation idDiff01
#Variable Mappings
@@ -115,17 +112,13 @@ for setpoint1 in range(0, 6):
idDiff01 = a-b
if endH>0.0 :
#invert direction and swap start with end of translation
end = startDefault
start = readback2 - direction
direction = -1.0
setpoint2 = start
print 'End H switch, changing direction to ' + str(direction)
scan.append ([setpoint2], [readback2], [detector1, detector2, detector3, detector4, detector5, detector6, detector7, detector8, idDiff02, idDiff01])
break
if endL>0.0 :
#invert direction and swap start with end of translation
end = endDefault
start = readback2 - direction
direction = 1.0
setpoint2 = end
print 'End L switch, changing direction to ' + str(direction)
scan.append ([setpoint2], [readback2], [detector1, detector2, detector3, detector4, detector5, detector6, detector7, detector8, idDiff02, idDiff01])
break