From f25d605c019fee0645f08af66fd3b0637344ec3d Mon Sep 17 00:00:00 2001 From: Thierry Zamofing Date: Thu, 24 Jan 2019 13:53:41 +0000 Subject: [PATCH] cleanup MXTuning.py --- python/MXTuning.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/python/MXTuning.py b/python/MXTuning.py index fde1d42..576931e 100755 --- a/python/MXTuning.py +++ b/python/MXTuning.py @@ -44,10 +44,13 @@ class MXTuning(Tuning): Tuning.__init__(self,comm,gather) - def init_stage(self): + def init_stage(self,force=True): comm=self.comm if comm is None: return gpascii=comm.gpascii + if force==False and gpascii.get_variable('Motor[1].HomeComplete', int) == 1: + return + sys.stdout.write('homing stage');sys.stdout.flush() gpascii.send_line('enable plc1') time.sleep(.2) @@ -59,8 +62,6 @@ class MXTuning(Tuning): sys.stdout.write('.');sys.stdout.flush() time.sleep(.2) - #Coord[%d].ProgActive if a running proc - def bode_model_plot(self, mot,base): self.bode_full_plot(mot,base) fig=plt.gcf()