Closed tboegi closed 4 years ago
It might be better to change the documentation than to change the behavior. This change could possibly affect systems in a negative way. I can't think of a specific example at the moment, but I can imagine there's plenty of motors that use retries that might often rely on the '>=' condition.
The documentation about the RDBD field says: "When the motor has finished a complete motion, possibly including backlash takeout, the motor record will compare its current position with the desired position. If the magnitude of the difference is greater than RDBD, the motor will try again, as if the user had requested a move from the now current position to the desired position. Only a limited number of retries will be performed (see RTRY)."
The comparision in code code uses "if ((fabs(pmr->diff) >= pmr->rdbd)" which is too strict. Loosen the if and use ">" instead of ">=".