Add i09-2 stage using StandardMovable#2093
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2093 +/- ##
=======================================
Coverage 99.16% 99.16%
=======================================
Files 347 350 +3
Lines 13578 13633 +55
=======================================
+ Hits 13464 13519 +55
Misses 114 114 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…fferent between python versions
…/dodal into add_i09_2_stage
Relm-Arrowny
left a comment
There was a problem hiding this comment.
A few minor things.
| await wait_for_value(self.within_tolerance, True, timeout=timeout) | ||
|
|
||
|
|
||
| def _within_tolerance_read(setpoint: float, readback: float, tolerance: float) -> bool: |
There was a problem hiding this comment.
It is not really doing read?
| def _within_tolerance_read(setpoint: float, readback: float, tolerance: float) -> bool: | |
| def _is_within_tolerance(setpoint: float, readback: float, tolerance: float) -> bool: |
|
|
||
| self.user_setpoint = epics_signal_rw(float, prefix + ":MOV:RD") | ||
| self.tolerance = soft_signal_rw(float, initial_value=tolerance) | ||
| self.motor_stop = epics_signal_w(int, prefix + ":HLT:WR.PROC") | ||
| super().__init__( | ||
| tolerance=self.tolerance, | ||
| setpoint=self.user_setpoint, | ||
| readback=self.user_readback, | ||
| name=name, | ||
| ) |
There was a problem hiding this comment.
This feel really wrong, PiezoElectricMotor now has both user_setpoint(feedback) and self._setpoint(feedback)_ref pointing to the exact same underlying signal. Since the singalRW already use standard setpoint and readback as names, it’s probably better to just standardise on those names here and eliminate the duplicate references.
| async def stop(self) -> None: | ||
| await self.motor_stop.set(1) |
There was a problem hiding this comment.
Does epics do the cleanup after motor_stop is call? If a move is currently in progress, it will be stuck awaiting within_tolerance until timeout as the readback never get to the setpoint.
| await wait_for_value( | ||
| movable_with_tolerance.movable_logic.setpoint, setpoint, timeout=1 | ||
| ) | ||
| assert ( | ||
| await movable_with_tolerance.movable_logic.setpoint.get_value() == setpoint | ||
| ) |
There was a problem hiding this comment.
The are doing the same thing here.
| await wait_for_value( | |
| movable_with_tolerance.movable_logic.setpoint, setpoint, timeout=1 | |
| ) | |
| assert ( | |
| await movable_with_tolerance.movable_logic.setpoint.get_value() == setpoint | |
| ) | |
| await wait_for_value( | |
| movable_with_tolerance.movable_logic.setpoint, setpoint, timeout=1 | |
| ) |
Fixes #2107
Instructions to reviewer on how to test:
Checks for reviewer
dodal connect ${BEAMLINE}