From 73fe9c682819b2f18fcceac093240397242a7035 Mon Sep 17 00:00:00 2001 From: boccioli_m Date: Mon, 15 Jun 2015 13:39:18 +0200 Subject: [PATCH] Script execution --- script/End-to-End.py | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/script/End-to-End.py b/script/End-to-End.py index a0f36c1..838ba09 100644 --- a/script/End-to-End.py +++ b/script/End-to-End.py @@ -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