From d7b5be3f751d5f496d9a34d73e310af83b21d2aa Mon Sep 17 00:00:00 2001 From: boccioli_m Date: Thu, 18 Jun 2015 07:57:08 +0200 Subject: [PATCH] Script execution --- .../Collimator Tests/Motor Test 2/Motor Test 2.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/script/tests/tests/Collimator Tests/Motor Test 2/Motor Test 2.py b/script/tests/tests/Collimator Tests/Motor Test 2/Motor Test 2.py index bfeb7c6..c944253 100644 --- a/script/tests/tests/Collimator Tests/Motor Test 2/Motor Test 2.py +++ b/script/tests/tests/Collimator Tests/Motor Test 2/Motor Test 2.py @@ -119,20 +119,20 @@ for setpoint1 in range(0, loopTimes): idDiff01 = a-b countSteps = countSteps + 1 scan.append ([countSteps], [countSteps], [detector1, detector2, detector3, detector4, detector5, detector6, detector7, detector8, idDiff02, idDiff01]) - if endH>0.0 or (direction > 0 and setpoint2 >= end ): + if endH>0.0 or (direction > 0.0 and setpoint2 >= end ): #invert direction and swap start with end of translation end = startDefault - start = readback2 - direction + start = setpoint2 - direction direction = -1.0 print 'End of span, changing direction to ' + str(direction) - - if endL>0.0 or ( direction < 0 and setpoint2 <= start ): + break + if endL>0.0 or ( direction < 0.0 and setpoint2 <= start ): #invert direction and swap start with end of translation end = endDefault - start = readback2 - direction + start = setpoint2 - direction direction = 1.0 print 'End of span, changing direction to ' + str(direction) - + break ################### beginning of E ##################