|
17 | 17 | from dodal.common.maths import AngleWithPhase |
18 | 18 | from dodal.devices.motors import XYZOmegaStage |
19 | 19 | from dodal.devices.util.epics_util import SetWhenEnabled |
20 | | - |
| 20 | +from dodal.log import LOGGER |
21 | 21 |
|
22 | 22 | class StubPosition(Enum): |
23 | 23 | CURRENT_AS_CENTER = 0 |
@@ -123,6 +123,29 @@ async def set(self, value: CombinedMove): |
123 | 123 | axes will move at the same time. The put callbacks on the axes themselves will |
124 | 124 | only come back after the motion on that axis finished. |
125 | 125 | """ |
| 126 | + |
| 127 | + #Sticky Y motor on i03 - try to move chi before the other motors to see if this helps |
| 128 | + # issues. |
| 129 | + # Nb smargon motors also appear to be ignoring max velocity during combined moves |
| 130 | + LOGGER.info("Unwrapping target values...") |
| 131 | + for motor_name, new_setpoint in value.items(): |
| 132 | + if new_setpoint is not None and isinstance(new_setpoint, int | float): |
| 133 | + mapped_value = await self._get_target_value( |
| 134 | + motor_name, new_setpoint |
| 135 | + ) |
| 136 | + LOGGER.info(f"Unwrapped {motor_name} {new_setpoint} -> {mapped_value}") |
| 137 | + value[motor_name] = mapped_value |
| 138 | + |
| 139 | + LOGGER.info("Doing smargon move...") |
| 140 | + if "chi" in value.keys() and value["chi"] is not None: |
| 141 | + LOGGER.info("Doing chi.set") |
| 142 | + await self.chi.set(value["chi"]) |
| 143 | + LOGGER.info("Chi move done") |
| 144 | + else: |
| 145 | + LOGGER.info("Chi not moving in this smargon move") |
| 146 | + if "omega" in value.keys() and value["omega"] is not None: |
| 147 | + LOGGER.info("Doing omega set") |
| 148 | + await self.omega.set(value["omega"]) |
126 | 149 | await self.defer_move.set(DeferMoves.ON) |
127 | 150 | # TODO Hotfix required here until https://github.com/DiamondLightSource/dodal/issues/1998 |
128 | 151 | # is implemented in separate PR |
|
0 commit comments