From 4d40ed5c15507c1a5a2e2a7734bd3de7e0ffcae6 Mon Sep 17 00:00:00 2001 From: gac-x03da Date: Tue, 9 Jul 2019 16:16:05 +0200 Subject: [PATCH] Script execution --- script/develop/ManipulatorYZFlyScan.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/script/develop/ManipulatorYZFlyScan.py b/script/develop/ManipulatorYZFlyScan.py index 210e4fac..3028c187 100644 --- a/script/develop/ManipulatorYZFlyScan.py +++ b/script/develop/ManipulatorYZFlyScan.py @@ -13,7 +13,6 @@ SENSORS = (Counts, Scienta.dataMatrix, SampleCurrent, RefCurrent, MachineCurrent RANGE_Y = (-5., +5) RANGE_Z = (114., 116.) STEPS_Y = 20 -# actual number of positions will be +1! STEPS_Z = 2 RELATIVE = False LATENCY = 0.0 @@ -34,6 +33,9 @@ scienta_time = (time2 - time1) print "scienta_time: ", scienta_time # time for one Y scan in seconds +speed = (RANGE_Y[1] - RANGE_Y[0]) / scienta_time / STEPS_Y +speed = min(max(speed, ManipulatorY.getMinSpeed()), ManipulatorY.getMaxSpeed()) +STEPS_Y = (RANGE_Y[1] - RANGE_Y[0]) / scienta_time / speed fly_time = scienta_time * STEPS_Y print "Y time: ", fly_time