From 44c5dd13088a4d15b900f8c3855e55c0eb0632c9 Mon Sep 17 00:00:00 2001 From: Sven Augustin Date: Sun, 27 Jun 2021 11:10:06 +0200 Subject: [PATCH] updates --- devices/undulator.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/devices/undulator.py b/devices/undulator.py index 895401f..c503935 100644 --- a/devices/undulator.py +++ b/devices/undulator.py @@ -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)