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 44bcc08..d1151bb 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 @@ -13,9 +13,9 @@ status = False try: print "Running test with the following parameters:" print parameters - middle = int(parameters["midPoint"]["value"]) + middle = float(parameters["midPoint"]["value"]) loopTimes = int(parameters["repeatTimes"]["value"]) - span = int(parameters["spanFromMidPoint"]["value"]) + span = float(parameters["spanFromMidPoint"]["value"]) except: print "Could not retrieve testing parameters: ", sys.exc_info()[0] ret = 'Could not retrieve testing parameters - ' + traceback.format_exc() @@ -81,11 +81,12 @@ startDefault = middle - span endDefault = middle + span end = endDefault+1 #find position: it will be the middle point of the test +print 'Moving to middle point ' + str(middle) idInkr.put(middle, timeout=None) # TODO: Set appropriate timeout start = idInkr.get()+direction countSteps = 0 count = 0 - +print 'Moving arond middle point (+-' + str(span) + ')' for setpoint1 in range(0, loopTimes): count = count + 1 sleep( 2 ) # Settling time