diff --git a/furka.py b/furka.py index c4bafa9..71144aa 100644 --- a/furka.py +++ b/furka.py @@ -1,6 +1,7 @@ #!/usr/bin/env python from slic.core.acquisition import SFAcquisition +from slic.core.acquisition import PVAcquisition from slic.core.adjustable import PVAdjustable, DummyAdjustable from slic.core.condition import PVCondition from slic.core.scanner import Scanner @@ -37,6 +38,13 @@ pvs = [ "SATFE10-PEPG046:PHOTON-ENERGY-PER-PULSE-AVG" ] +live_channels = [ + "SATES30-LSCP10-FNS:CH0:VAL_GET", + "SATES30-LSCP10-FNS:CH1:VAL_GET", +# "SATES30-LSCP10-FNS:CH4:VAL_GET" +] + + instrument = "furka" pgroup = "p19197" @@ -46,8 +54,15 @@ check_intensity = None daq = SFAcquisition(instrument, pgroup, default_channels=channels, default_pvs=pvs, rate_multiplicator=1) scan = Scanner(default_acquisitions=[daq], condition=check_intensity) + gui = GUI(scan) +daqPV = PVAcquisition(instrument, pgroup, default_channels=live_channels) +scanPV = Scanner(default_acquisitions=[daqPV], condition=check_intensity) + + + + print("To start the GUI, run: gui()") diff --git a/undulator.py b/undulator.py index f1bf97c..da80dd7 100644 --- a/undulator.py +++ b/undulator.py @@ -64,9 +64,9 @@ class Undulators(Adjustable): t = a.set_target_value(k_new, hold=False) tasks.append(t) wait_for_all(tasks) - # 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") + print("CHIC adjustment follows") + self.chic.set_target_value(value, hold=False) #TODO: test whether an additional sleep is needed + print("CHIC adjustment done") return self._as_task(change, hold=hold) @@ -172,9 +172,11 @@ class CHIC(PVAdjustable): def change(): sleep(1) print("CHIC setvalue") - self.pvs.setvalue.put(value, wait=True) + print(value) + self.pvs.setvalue.put(value, wait=False) + sleep(1) print("CHIC start") - self.pvs.start.put(1, wait=True) + self.pvs.start.put(1, wait=False) #TODO: test whether an additional sleep is needed sleep(1)