ophyd_async.epics.adcore.start_acquiring_driver_and_ensure_status#
- async ophyd_async.epics.adcore.start_acquiring_driver_and_ensure_status(driver: ADBaseIO, good_states: Set[DetectorState] = {DetectorState.Aborted, DetectorState.Idle}, timeout: float = 10.0) AsyncStatus [source]#
Start acquiring driver, raising ValueError if the detector is in a bad state.
This sets driver.acquire to True, and waits for it to be True up to a timeout. Then, it checks that the DetectorState PV is in DEFAULT_GOOD_STATES, and otherwise raises a ValueError.
- Parameters:
driver – The driver to start acquiring. Must subclass ADBaseIO.
good_states – set of states defined in DetectorState enum which are considered good states.
timeout – How long to wait for driver.acquire to readback True (i.e. acquiring).
- Returns:
An AsyncStatus that can be awaited to set driver.acquire to True and perform subsequent raising (if applicable) due to detector state.
- Return type: