Skip to content

Commit fcb3e07

Browse files
committed
stage: cephla: change backlash comp from 30um to 5um for speed
1 parent 583fd1d commit fcb3e07

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

software/squid/stage/cephla.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99

1010
class CephlaStage(AbstractStage):
11+
_BACKLASH_COMPENSATION_DISTANCE_MM = 0.005
12+
1113
@staticmethod
1214
def _calc_move_timeout(distance, max_speed):
1315
# We arbitrarily guess that if a move takes 3x the naive "infinite acceleration" time, then it
@@ -70,11 +72,7 @@ def move_z(self, rel_mm: float, blocking: bool = True):
7072
# NOTE(imo): It seems really tricky to only clear backlash if via the blocking call?
7173
final_rel_move_mm = rel_mm
7274
if blocking and need_clear_backlash:
73-
backlash_offset = -abs(
74-
self.get_config().Z_AXIS.convert_to_real_units(
75-
max(160, 20 * self.get_config().Z_AXIS.MICROSTEPS_PER_STEP)
76-
)
77-
)
75+
backlash_offset = -CephlaStage._BACKLASH_COMPENSATION_DISTANCE_MM
7876
final_rel_move_mm = -backlash_offset
7977
# Move past our final position, so we can move up to the final position and
8078
# rest on the downside of the drive mechanism. But make sure we don't drive past the min position
@@ -117,11 +115,7 @@ def move_z_to(self, abs_mm: float, blocking: bool = True):
117115

118116
# NOTE(imo): It seems really tricky to only clear backlash if via the blocking call?
119117
if blocking and need_clear_backlash:
120-
backlash_offset = -abs(
121-
self.get_config().Z_AXIS.convert_to_real_units(
122-
max(160, 20 * self.get_config().Z_AXIS.MICROSTEPS_PER_STEP)
123-
)
124-
)
118+
backlash_offset = -CephlaStage._BACKLASH_COMPENSATION_DISTANCE_MM
125119
# Move past our final position, so we can move up to the final position and
126120
# rest on the downside of the drive mechanism. But make sure we don't drive past the min position
127121
# to do this.

0 commit comments

Comments
 (0)