ophyd_async.core.set_and_wait_for_value#
- async ophyd_async.core.set_and_wait_for_value(signal: SignalRW[T], value: T, timeout: float = 10.0, status_timeout: float | None = None) AsyncStatus [source]#
Set a signal and monitor it until it has that value.
- Useful for busy record, or other Signals with pattern:
Set Signal with wait=True and stash the Status
Read the same Signal to check the operation has started
Return the Status so calling code can wait for operation to complete
- Parameters:
signal – The signal to set
value – The value to set it to
timeout – How long to wait for the signal to have the value
status_timeout – How long the returned Status will wait for the set to complete
Notes
Example usage:
set_and_wait_for_value(device.acquire, 1)