backlash correction function

Each time the operation direction changes, a number of pulses is added by the amount of the backlash to correct an error.