DiamondLightSource / hyperion

Unattended Data Collection using BlueSky / Ophyd
BSD 3-Clause "New" or "Revised" License
5 stars 5 forks source link

PandA grid scans: Safeguard against varying smargon speed #1474

Open olliesilvester opened 3 days ago

olliesilvester commented 3 days ago

Our current panda setup is meant to do the following:

  1. At the start of a row, wait for a GPIO signal from the motion controller
  2. After encoder counts go above a position, enable a PULSE block which sends perioidic triggers (period = deadtime+exposure time)
  3. After encoder counts goes above another postiion, disable this PULSE block so no more triggers are sent
  4. Other stuff not relevant to this issue

This assumes that the PandA is going at exactly the right speed by the time we get to bullet point 2. If we are going too quickly or too slowly, the number of triggers received may be off by a tiny amount. The last time we tested the panda, we saw an occasional missing trigger. We concluded that this was either down to what has just been described, or due to lost encoder counts due to accelerating the smargon too quickly.

We should instead do the following:

This will rule out missing triggers from the smargon going at the slight wrong speed. If the speed is wrong, we will still get the triggers, but they will be in a weird place (and this will be obvious from data collection). When PVT scans are working, it will setup the panda in a similar way, but it will be nice to do it here first so we can compare the times of panda scans using the motion controller and using the ophyd-async flyscan

Acceptance Criteria

Do the above, and update documentation https://github.com/DiamondLightSource/hyperion/wiki/PandA-constant%E2%80%90motion-scanning