Script execution

This commit is contained in:
boccioli_m
2015-06-15 13:54:23 +02:00
parent 9461b272db
commit 4c096a347c

View File

@@ -69,11 +69,11 @@ end = endDefault
#find position at Low end switch: it will be the starting point of the test
idInkr.put(-100.0, timeout=None) # TODO: Set appropriate timeout
start = startDefault #idInkr.get()+direction
setpoint2 = end
for setpoint1 in range(0, 6):
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
@@ -113,12 +113,12 @@ for setpoint1 in range(0, 6):
if endH>0.0 :
#invert direction and swap start with end of translation
setpoint2 = start
print 'End H switch, changing direction to ' + str(direction)
print 'End H switch, changing target to ' + str(setpoint2)
scan.append ([setpoint2], [readback2], [detector1, detector2, detector3, detector4, detector5, detector6, detector7, detector8, idDiff02, idDiff01])
if endL>0.0 :
#invert direction and swap start with end of translation
setpoint2 = end
print 'End L switch, changing direction to ' + str(direction)
print 'End L switch, changing target to ' + str(setpoint2)
scan.append ([setpoint2], [readback2], [detector1, detector2, detector3, detector4, detector5, detector6, detector7, detector8, idDiff02, idDiff01])
#set limits back