DiamondLightSource / i22-bluesky

I22 specific bluesky plans and plan stubs
Apache License 2.0
0 stars 0 forks source link

Stopflow plan with 0 pre & post stop frames captures infinite frames #55

Open DiamondJoseph opened 5 months ago

DiamondJoseph commented 5 months ago

Potential fix

    # Wait for pre-delay then open shutter
    SeqTableRow(
        time1=in_micros(pre_delay),
        time2=in_micros(shutter_time),
        outa2=True,
    ),
    # Keeping shutter open, do n triggers
    SeqTableRow(
        repeats=pre_stop_frames,
        time1=in_micros(exposure),
        outa1=True,
        outb1=True,
        time2=in_micros(deadtime),
        outa2=True,
    ) if pre_stop_frames else TableRow(
        repeats=1,
        time1=0,
        time2=0,
    ),
    # Do m triggers after BITA=1
    SeqTableRow(
        trigger=SeqTrigger.BITA_1,
        repeats=post_stop_frames,
        time1=in_micros(exposure),
        outa1=True,
        outb1=True,
        time2=in_micros(deadtime),
        outa2=True,
    ) if post_stop_frames else TableRow(
        repeats=1,
        time1=0,
        time2=0,
    ),
    # Add the shutter close
    SeqTableRow(time2=in_micros(shutter_time)),
callumforrester commented 5 months ago

This should have been fixed in #53, need to check on the beamline

DiamondJoseph commented 5 months ago

Agreed that it looks like it should be fixed