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

Create a PandA flyer that uses a SEQ table to do time based triggers within a position based gate #448

Open
coretl opened this issue Jul 11, 2024 · 3 comments · May be fixed by #565
Open
Assignees

Comments

@coretl
Copy link
Collaborator

coretl commented Jul 11, 2024

Want something similar to

class StaticSeqTableTriggerLogic(TriggerLogic[SeqTableInfo]):
def __init__(self, seq: SeqBlock) -> None:
self.seq = seq
async def prepare(self, value: SeqTableInfo):
await asyncio.gather(
self.seq.prescale_units.set(TimeUnits.us),
self.seq.enable.set("ZERO"),
)
await asyncio.gather(
self.seq.prescale.set(value.prescale_as_us),
self.seq.repeats.set(value.repeats),
self.seq.table.set(value.sequence_table),
)
async def kickoff(self) -> None:
await self.seq.enable.set("ONE")
await wait_for_value(self.seq.active, True, timeout=1)
async def complete(self) -> None:
await wait_for_value(self.seq.active, False, timeout=None)
async def stop(self):
await self.seq.enable.set("ZERO")
await wait_for_value(self.seq.active, False, timeout=1)
but for a SEQ table implementing the following scheme:

image

prepare

Take:

  • a deadtime for between frames
  • a List[scanspec.Frames[str]]
  • The str axis to compare against
  • The PandA MRES and OFFSET for that axis

calculate the entire trajectory (this will later be only the first 4000 points), find the gaps, in each gap insert:

  • Wait for BITA=1 for GPIO
  • Wait for POSA to exceed the value of the first compare point
  • Generate N triggers for the row

At the moment we should fail if there are more than 4096 rows generated

kickoff

Set ENABLE=ONE and wait for ACTIVE

complete

Wait for ACTIVE to drop

@subinsaji subinsaji self-assigned this Jul 18, 2024
@coretl
Copy link
Collaborator Author

coretl commented Jul 25, 2024

image

@subinsaji
Copy link
Contributor

A picture to remind ourselves of the logic and conversations

Image

@coretl
Copy link
Collaborator Author

coretl commented Jul 26, 2024

I had some better ideas for structure. We make a TimeBasedSeqController where the position compare part is optional. In prepare() we optionally additionally take a PositionCompareInfo with a motor: Motor, resolution: float and offset: float. If supplied then we put in the lines for the compare, otherwise we omit them. This will give us both GPIO gate and time trig, as well as position gate and time trig.

@subinsaji subinsaji removed their assignment Aug 21, 2024
@tomtrafford tomtrafford self-assigned this Aug 30, 2024
@tomtrafford tomtrafford linked a pull request Sep 10, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

3 participants