diff --git a/beamlinetools/utils/pbar_bessy.py b/beamlinetools/utils/pbar_bessy.py index 168f4598d24cb95fe429a1b34434d424387635d5..35b06714bbf26cc8eed24fb98529d8c2ad9468f8 100644 --- a/beamlinetools/utils/pbar_bessy.py +++ b/beamlinetools/utils/pbar_bessy.py @@ -104,8 +104,10 @@ class TerminalProgressBar(ProgressBarBase): #ask the motor position, if smt goes wrong print "n.a." try: - motor_name=name.replace("_", ".")+".readback.get()" - motor_position = np.round(eval(motor_name, self.user_ns),3) + axis=name.replace("_", ".") + command = f"asyncio.run({axis}.read())" + print(f"pbar command: {command}") + motor_position = np.round(eval(command, self.user_ns),3) except: try: motor_name=name.replace("_", ".")+".user_readback.get()"