pcdshub / nabs

Not a Beamline Scientist
https://pcdshub.github.io/nabs
Other
3 stars 7 forks source link

BUG: daq scans fail when `duration` is passed in without specifying `events` #64

Closed tangkong closed 2 years ago

tangkong commented 2 years ago

Expected Behavior

DAQ scans should correctly consider both arguments, and respect the defaults.

Current Behavior

Reported by @vespos

RE(bp.daq_count([], duration=10, record=False))
...
RuntimeError: Cannot start daq in scan step, did not configure events or duration.
# If I specify a events argument, then it runs fine, but ignores the duration.

Possible Solution

It seems the DAQ interface only works with one of events and duration, but not both. The daq scans are passing the arguments to bps.configure(daq, ... ), which must house the error.

Context

Vincent encountered this when some scans failed

Your Environment

pcds-5.4.1?