Closed cbteeple closed 3 years ago
The routine measures the position offset from the home position each time the origin shift button is pressed. This means any error in position from the previous "origin shift" motion is measured as a user-desired position shift rather than an error shifting to the desired position (relative to home).
Only update the "offset position" when the user is pressing a move button or using the joystick. This way the desired stage position (relative to home) is only updated when the user intends to move it.
If you shift the origin several times, the position error gets larger and larger.