move_and_wait for dcm

This commit is contained in:
2018-03-08 15:59:16 +01:00
parent 69b2efb438
commit 29a0a991ec
+2 -2
View File
@@ -18,10 +18,10 @@ class Double_Crystal_Mono:
self.moving = PV(Id+':MOVING')
self._stop = PV(Id +':STOP.PROC')
def move_and_wait(self,value,checktime=.01):
def move_and_wait(self,value,checktime=.01,precision=.5):
self.energy_sp.put(value)
#sleep(.1)
while not self.moving:
while not abs(self.get_current_value()-value)>precision:
sleep(checktime)
def changeTo(self,value):