Skip to content
This repository has been archived by the owner on Sep 2, 2024. It is now read-only.

Save and restore lower gonio poisitions before/after robot load #1439

Closed
DominicOram opened this issue Jun 11, 2024 · 5 comments · Fixed by DiamondLightSource/dodal#653 or #1467
Closed
Assignees

Comments

@DominicOram
Copy link
Collaborator

DominicOram commented Jun 11, 2024

The smargon is mounted on a set of lower gonio stages BL03I-MO-GONP-01:X etc. The robot is taught to load/unload on to the smargon when these stages are at 0. However, throughout the run this gonio is recalibrated to make sure pins are still correctly aligned with the OAV when they are mounted.

Acceptance criteria

For every robot load we need to:

  • Cache where these lower gonio positions are
  • Move to 0 so that the robot can load to the known position
  • Do the robot load (move of gonio must have finished)
  • Move back to the cached positions so that the sample is still well aligned (this must be finished by the time we start on pin tip centring but doesn't need to be finished for robot load snapshots)
@DominicOram
Copy link
Collaborator Author

GDA does this by doing the following:

  • The positions for correct alignment are in /dls_sw/i03/software/gda_var/mx_parameters.xml
  • These are updated:
    • By GDA when a pin is aligned
    • By controls when the Save to XML button is pressed on the gonio EDM, this calls /dls_sw/apps/mx-scripts/beamline_tools/xmlwriter.py which will save the info to /dls_sw/i03/software/gda_var/mx_parameters.xml
  • After robot load GDA reads this xml file and uses the values from here to recalibrate

@DominicOram
Copy link
Collaborator Author

Discussed with scientists at https://diamondlightsource.slack.com/archives/C048RD0KFFF/p1718118995771029. Happy to not read the xml in hyperion and just cache the motor positions before load then reapply them

@ndg63276
Copy link

A couple of minor points:

  • Don't move to 0 if abs(position) < 20 microns. Robot is tolerant of small imperfections, no need to wear out the stages.
  • Can send move to 0 asynchronously, the robot will check they have got to 0 just before it gets there.

GDA does both of these things already.

@DominicOram
Copy link
Collaborator Author

Additionally, we should have a limit of if the cached position is > 0.2 mm away from 0 then do not do the robot load. GDA currently does this too

@DominicOram
Copy link
Collaborator Author

Made an initial start at doing this in a plan at https://github.com/DiamondLightSource/dodal/tree/hyperion_1439_cache_lower_gonio but it may be easier to do by using the reset_positions_wrapper pre-processor see https://diamondlightsource.slack.com/archives/C04TCA0AF2P/p1718201303789869.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.