diff --git a/src/aare/daq/daq.py b/src/aare/daq/daq.py index ab5ced80..d252b579 100644 --- a/src/aare/daq/daq.py +++ b/src/aare/daq/daq.py @@ -1996,13 +1996,15 @@ class AareDAQ: if request.dtz is not None: if request.dtz < self.__cfg.cached_dtz_low: - raise ValueError( - f"Requested DTZ {request.dtz} is less than low detector limit {self.__cfg.cached_dtz_low}" + logger.error( + f"Requested DTZ {request.dtz} is less than low detector limit {self.__cfg.cached_dtz_low}. Truncating to the nearest allowable value." ) + request.dtz = self.__cfg.cached_dtz_low elif request.dtz > self.__cfg.cached_dtz_high: - raise ValueError( - f"Requested DTZ {request.dtz} exceeds high detector limit {self.__cfg.cached_dtz_high}" + logger.error( + f"Requested DTZ {request.dtz} exceeds high detector limit {self.__cfg.cached_dtz_high}. Truncating to the nearest allowable value." ) + request.dtz = self.__cfg.cached_dtz_high logger.info(f"requesting dtz to move to {request.dtz}") self.__cfg.dtz = request.dtz else: