|
8 | 8 |
|
9 | 9 |
|
10 | 10 | class CephlaStage(AbstractStage):
|
| 11 | + _BACKLASH_COMPENSATION_DISTANCE_MM = 0.005 |
| 12 | + |
11 | 13 | @staticmethod
|
12 | 14 | def _calc_move_timeout(distance, max_speed):
|
13 | 15 | # 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):
|
70 | 72 | # NOTE(imo): It seems really tricky to only clear backlash if via the blocking call?
|
71 | 73 | final_rel_move_mm = rel_mm
|
72 | 74 | 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 |
78 | 76 | final_rel_move_mm = -backlash_offset
|
79 | 77 | # Move past our final position, so we can move up to the final position and
|
80 | 78 | # 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):
|
117 | 115 |
|
118 | 116 | # NOTE(imo): It seems really tricky to only clear backlash if via the blocking call?
|
119 | 117 | 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 |
125 | 119 | # Move past our final position, so we can move up to the final position and
|
126 | 120 | # rest on the downside of the drive mechanism. But make sure we don't drive past the min position
|
127 | 121 | # to do this.
|
|
0 commit comments