Commit 44c5dd13 authored by augustin_s's avatar augustin_s 🐍
Browse files

updates

parent 0d69d263
......@@ -8,9 +8,7 @@ from slic.core.scanner.scanbackend import wait_for_all #, stop_all
# 14 is the CHIC
n_unds = [
#6, 7, 8, 9, 10, 11, 12,
13,
n_unds = [6, 7, 8, 9, 10, 11, 12, 13,
15, 16, 17, 18, 19, 20, 21, 22
]
......@@ -65,8 +63,9 @@ class Undulators(Adjustable):
t = a.set_target_value(k_new, hold=False)
tasks.append(t)
wait_for_all(tasks)
print("Warning: CHIC adjustment is still commented!")
# self.chic.set_target_value(value, hold=False).wait() #TODO: test whether an additional sleep is needed
print("CHIC adjustment follows")
self.chic.set_target_value(value, hold=False).wait() #TODO: test whether an additional sleep is needed
print("CHIC adjustment done")
return self._as_task(change, hold=hold)
......@@ -164,12 +163,19 @@ class CHIC(PVAdjustable):
def set_target_value(self, value, hold=False):
fudge_offset = 3
print("CHIC fudge offset is", fudge_offset)
value -= fudge_offset
value /= 1000
def change():
super().set_target_value(value, hold=False).wait()
sleep(1)
print("CHIC setvalue")
self.pvs.setvalue.put(value, wait=True)
print("CHIC start")
self.pvs.start.put(1, wait=True)
#TODO: test whether an additional sleep is needed
sleep(1)
return self._as_task(change, hold=hold)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment