Script execution
This commit is contained in:
@@ -19,11 +19,12 @@ except:
|
||||
success = False
|
||||
raise Exception('Could not retrieve testing parameters - ' + traceback.format_exc())
|
||||
|
||||
print "a"
|
||||
#TODO: Set the diplay names of positioners and detectors
|
||||
#scan = ManualScan(['idX', 'idInkr'], ['idMotorStatus', 'idLogicalPosition', 'idDiameter', 'idMotorPosition', 'idPotiRaw', 'idPotiProc', 'idBtvsRaw', 'idBtvsProc', 'idDiff01', 'idDiff02'] , [-0.5, 0.0], [4.0, 3000.0], [3000, 20])
|
||||
scan = ManualScan(['idX'], ['idMotorStatus', 'idLogicalPosition', 'idDiameter', 'idMotorPosition', 'idPotiRaw', 'idPotiProc', 'idBtvsRaw', 'idBtvsProc', 'idDiff01', 'idDiff02'] , [ 0.0], [ 3000.0], [20])
|
||||
scan.start()
|
||||
|
||||
print "b"
|
||||
#Creating channels: dimension 1
|
||||
try:
|
||||
#RegionPositioner idInkr
|
||||
@@ -68,12 +69,12 @@ except:
|
||||
ret = 'Unable to create channel - ' + traceback.format_exc()
|
||||
success = False
|
||||
raise Exception('Unable to create channel - ' + traceback.format_exc())
|
||||
#sys.exit()
|
||||
|
||||
sys.exit()
|
||||
print "c"
|
||||
#remove limits
|
||||
idLimitH.put(999999.9, timeout=None)
|
||||
idLimitL.put(-999999.9, timeout=None)
|
||||
|
||||
print "d"
|
||||
#Dimension 1
|
||||
direction = 1.0;
|
||||
startDefault = -100.0
|
||||
@@ -84,8 +85,11 @@ idInkr.put(-100.0, timeout=None) # TODO: Set appropriate timeout
|
||||
start = startDefault #idInkr.get()+direction
|
||||
setpoint2 = end
|
||||
count = 0
|
||||
print "e"
|
||||
for setpoint1 in range(0, loopTimes):
|
||||
print "f"
|
||||
sleep( delaySeconds ) # Settling time
|
||||
print "g"
|
||||
#RegionPositioner idInkr
|
||||
idInkr.put(setpoint2, timeout=None) # TODO: Set appropriate timeout
|
||||
readback2 = idInkr.get()
|
||||
@@ -123,6 +127,7 @@ for setpoint1 in range(0, loopTimes):
|
||||
b = detector6
|
||||
count = count + 1
|
||||
idDiff01 = a-b
|
||||
print "h"
|
||||
if endH>0.0 :
|
||||
#invert direction and swap start with end of translation
|
||||
setpoint2 = start
|
||||
@@ -137,7 +142,7 @@ for setpoint1 in range(0, loopTimes):
|
||||
#set limits back
|
||||
idLimitH.put(145.0, timeout=None)
|
||||
idLimitL.put(0.0, timeout=None)
|
||||
|
||||
print "i"
|
||||
#Closing channels
|
||||
idInkr.close()
|
||||
idMotorStatus.close()
|
||||
@@ -148,7 +153,7 @@ idPotiRaw.close()
|
||||
idPotiProc.close()
|
||||
idBtvsRaw.close()
|
||||
idBtvsProc.close()
|
||||
|
||||
print "l"
|
||||
scan.end()
|
||||
ret = 'Slide moved back and forth (' + str(count) + ' runs)'
|
||||
status = True
|
||||
|
||||
Reference in New Issue
Block a user