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

Automatic opening of fast shutter #319

Closed
canismarko opened this issue Dec 6, 2024 · 1 comment
Closed

Automatic opening of fast shutter #319

canismarko opened this issue Dec 6, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@canismarko
Copy link
Contributor

Beam damage may be a big problem for operando experiments. One easy solution is a fast shutter that stays closed and only open briefly when actually triggering a detector. Bluesky makes this easy, since we can intercept and inspect messages as they go by. For example, this plan produces the following messages:

bp.count([ic], num=2) (assuming ic is a device)

'stage',
 'open_run',
 'checkpoint',
 'checkpoint',
 'trigger',
 'wait',
 'create',
 'read',
 'save',
 'checkpoint',
 'checkpoint',
 'trigger',
 'wait',
 'create',
 'read',
 'save',
 'close_run',
 'unstage'

The strategy can be:

  1. Watch for "trigger"
  2. Yield Msg("read", shutter)
  3. check the return value to see if the shutter is closed
  4. If it was yield Msg("set", shutter, 0)
  5. Yield the original trigger
  6. Watch for the subsequent wait message
  7. Afterwards, yield Msg("set, shutter, 1) if the shutter was originally closed

One tricky bit, not all plans and not all devices need this behavior. We can make it a plan decorator, but then we need to know which devices have this requirement.

@canismarko canismarko added the enhancement New feature or request label Dec 6, 2024
@canismarko
Copy link
Contributor Author

Added this support in #338

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant