Code indexing in gitaly is broken and leads to code not being visible to the user. We work on the issue with highest priority.

Skip to content
Snippets Groups Projects
Commit dbd0d7cf authored by augustin_s's avatar augustin_s :snake:
Browse files

print name of undulator if it arrives; changed the undulator K accuracy

parent 44914036
No related branches found
No related tags found
No related merge requests found
......@@ -88,7 +88,7 @@ class Undulators(Adjustable):
def change():
#TODO: replace by set_all_target_values_and_wait when print not needed anymore
tasks = []
tasks = {}
for (name, a), k_old, k_new in zip(self.adjs.items(), ks_current, ks_target):
delta = k_old - k_new
print(f"{name}: {k_old}\t->\t{k_new}\t({delta})")
......@@ -96,8 +96,14 @@ class Undulators(Adjustable):
print(f"{name} skipped since target K is nan")
continue
t = a.set_target_value(k_new, hold=False)
tasks.append(t)
wait_for_all(tasks)
tasks[name] = t
# wait_for_all(tasks)
for n, t in tasks.items():
print("waiting for ", n)
t.wait()
print("target reached ", n)
print("starting radial motors")
# make sure new K values have been written TODO: needed?
sleep(2) # check if this can be shortened back to 0.5
......@@ -156,7 +162,7 @@ class Undulators(Adjustable):
class Undulator(PVAdjustable):
def __init__(self, name, accuracy=0.0005):
def __init__(self, name, accuracy=0.1):
pvname_setvalue = name + ":K_SET"
pvname_readback = name + ":K_READ"
super().__init__(pvname_setvalue, pvname_readback=pvname_readback, accuracy=accuracy, active_move=True, name=name, internal=True)
......
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