Leadshine hybrid servo steppers and matching controllers use an encoder to feed back stepper position to the controller. If the stepper position is different to the demand position by a given number of steps it flags an error that can be used with Mach3. The number of steps for an error is a user choice if the default does not suit your needs.