move_and_wait for dcm
This commit is contained in:
+2
-2
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user