Skip to content
Snippets Groups Projects
Commit 670804c8 authored by Marcel Bajdel's avatar Marcel Bajdel :rocket:
Browse files

include asyncio readout

parent 6847a9f0
No related branches found
No related tags found
No related merge requests found
...@@ -104,8 +104,10 @@ class TerminalProgressBar(ProgressBarBase): ...@@ -104,8 +104,10 @@ class TerminalProgressBar(ProgressBarBase):
#ask the motor position, if smt goes wrong print "n.a." #ask the motor position, if smt goes wrong print "n.a."
try: try:
motor_name=name.replace("_", ".")+".readback.get()" axis=name.replace("_", ".")
motor_position = np.round(eval(motor_name, self.user_ns),3) command = f"asyncio.run({axis}.read())"
print(f"pbar command: {command}")
motor_position = np.round(eval(command, self.user_ns),3)
except: except:
try: try:
motor_name=name.replace("_", ".")+".user_readback.get()" motor_name=name.replace("_", ".")+".user_readback.get()"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment