diff --git a/csaxs_bec/devices/epics/delay_generator_csaxs/ddg_2.py b/csaxs_bec/devices/epics/delay_generator_csaxs/ddg_2.py index d9169bc..9b9c76b 100644 --- a/csaxs_bec/devices/epics/delay_generator_csaxs/ddg_2.py +++ b/csaxs_bec/devices/epics/delay_generator_csaxs/ddg_2.py @@ -103,6 +103,14 @@ class DDG2(PSIDeviceBase, DelayGeneratorCSAXS): burst_pulse_width = exp_time - DEFAULT_READOUT_TIMES["ab"] self.set_delay_pairs(channel="ab", delay=0, width=burst_pulse_width) self.burst_enable(count=frames_per_trigger, delay=0, period=exp_time) + + def on_pre_scan(self): + """ + The delay generator occasionally needs a bit extra time to process all + commands from stage. Therefore, we introduce here a short sleep + """ + # Delay Generator occasionaly needs a bit extra time to process all commands, sleep 50ms + time.sleep(0.05) def on_trigger(self) -> DeviceStatus | StatusBase | None: """ diff --git a/csaxs_bec/devices/epics/delay_generator_csaxs/delay_generator_csaxs.py b/csaxs_bec/devices/epics/delay_generator_csaxs/delay_generator_csaxs.py index a04b9c9..981f09c 100644 --- a/csaxs_bec/devices/epics/delay_generator_csaxs/delay_generator_csaxs.py +++ b/csaxs_bec/devices/epics/delay_generator_csaxs/delay_generator_csaxs.py @@ -140,7 +140,6 @@ class StatusBitsCompareStatus(SubscriptionStatus): name = 'no object received' else: name=obj.name - logger.info(f"Receive update for {name} with value {value}") if any((STATUSBITS(value) & state) == state for state in self._raise_states): self.set_exception( ValueError( @@ -149,7 +148,6 @@ class StatusBitsCompareStatus(SubscriptionStatus): ) return False if self._add_delay !=0: - logger.info(f"Sleeping for {self._add_delay} for {name}") time.sleep(self._add_delay) return (STATUSBITS(value) & self._value) == self._value @@ -671,7 +669,6 @@ class DelayGeneratorCSAXS(Device): raise ValueError( f"Length of width {len(width)} must match length of channel {len(channel)}." ) - logger.info(f"setting widths of channels {channel} to {width}") for ii, ch in enumerate(channel): delay_channel = getattr(self, ch) delay_channel.width.put(width[ii])