Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Looping daq.begin #51

Open
ZLLentz opened this issue Nov 14, 2018 · 0 comments
Open

Looping daq.begin #51

ZLLentz opened this issue Nov 14, 2018 · 0 comments

Comments

@ZLLentz
Copy link
Member

ZLLentz commented Nov 14, 2018

Expected Behavior

It should be easy to loop daq.begin to do simple data collection, then ctrl+c to exit the loop.

Current Behavior

ctrl+c is caught by daq.begin and then then loop enters the next phase too quickly to be stopped

Possible Solution

  1. Add an option to begin for doing N runs or infinite runs and handle the interrupts all together within the class. So this would look something like "daq.begin(duration=600, wait=True, num_runs='inf')". The rationale is that this is a common enough thing to want to do, so maybe it should just be a built-in. We wouldn't need a separate "daq_repeat" function in the beamline file.
  2. Add an option to begin for disabling the ctrl+c handling. E.g. "daq.begin(duration=600, wait=True, handle_interrupts=False)". This would let you handle interrupts yourself if doing something more complicated than a daq.begin loop.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant