diff --git a/config/devices.properties b/config/devices.properties index faf1d3f..c3334a5 100644 --- a/config/devices.properties +++ b/config/devices.properties @@ -1,2 +1,3 @@ crystal=ch.psi.pshell.epics.ChannelDouble|X10DA-OP-MO3:Bragg2dSpacAO|||true #bragg=ch.psi.pshell.crlogic.CrlogicPositioner|X10DA-OP-MO3:ROX X10DA-ES1-DCM:EC|||false +scaler=ch.psi.pshell.epics.Scaler|X10DA-ES-SCALER|||true diff --git a/script/crlogic.py b/script/crlogic.py index 47f31f0..84dfc10 100644 --- a/script/crlogic.py +++ b/script/crlogic.py @@ -1,6 +1,15 @@ + + caput("X10DA-ES-SCALER.CNT", 0) caput("X10DA-ES-SCALER.G1", 0) caput("X10DA-ES-SCALER.CONT", 0) +""" +scaler.stop() +scaler.channels[0].setPreset(False) +#scaler.channels[0].setPresetValue(0) +scaler.setOneShot() +""" + caput("X10DA-ES1:START-CSMPL", 1) caput("X10DA-ES1:TOTAL-CYCLES", 5) caput("X10DA-ES1:SMPL-BTN", 1) @@ -21,7 +30,7 @@ class ECalc(Readable): return 12.39842 / ( crystal.take() * math.sin( math.radians(bragg.take())) ) e_calc = ECalc() -sensors = [crystal, i0, i1, i2, ref, abs_calc, e_calc] +sensors = [RegisterCache(crystal), i0, i1, i2, ref, abs_calc, e_calc] bragg.initialize()