bluesky / ophyd-async

Hardware abstraction for bluesky written using asyncio
https://blueskyproject.io/ophyd-async
BSD 3-Clause "New" or "Revised" License
10 stars 23 forks source link

Make a PandA flyer that is implemented with a PCOMP block #375

Closed abbiemery closed 2 months ago

abbiemery commented 3 months ago

Want something similar to https://github.com/bluesky/ophyd-async/blob/5474cf4210c15994854fc29f77a2842212b1c1ea/src/ophyd_async/panda/_trigger.py#L15-L39 but for PCOMP

To work in tandem with #376

prepare

Takes a dataclass listing:

Set these values on the PandA PCOMP block, and set ENABLE to ZERO

kickoff

Set ENABLE to "ONE" and wait for ACTIVE to be 1

complete

Wait for ACTIVE to be 0

plan

Add to the plan that we made in #376 calling prepare for both at the same time, then kickoff the PandA before the motor, then complete them both.

Calculate values for prepare for both and raise if step is not an integer.

@jwlodek what should we do if start-end/npulses is not an integer number of counts we can put in step?