Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DS402: Restore operation mode after homing only on explicit request. (#…
…262) * ds402: Remove set_new_home functionality from BaseNode402.homing(). The homing() method will try to manipulate the Home Offset (0x607C) parameter by default. That's not the way the parameter is intended to work. After a successful homing procedure, the drive should set the Actual Position (0x6063) to the Home Offset (0x607C) by itself. By default that is zero, so the selected reference switch flank will mark the new zero position. The library's default behavior here is backwards, and can only work with absolute position encoders. The whole point of homing is to find a physical reference and align the logical coordinate system to it. Trying to determine the desired offset from the value which an unreferenced encoder had at the physical reference point actually destroys that logical alignment. The functionality of set_new_home=True is trivial to do from the application, so remove it completely from homing(). * ds402: Restore operation mode after homing only on explicit request. Add a new parameter restore_op_mode which defaults to False, and skip changing back to the previous mode unless it is explicitly enabled by passing True. Note that most applications will decide on the needed mode after homing and therefore do not need this behavior, hence the new default. Co-authored-by: André Filipe Silva <[email protected]>
- Loading branch information