# Connecting an Encoder

An optional encoder can be connected to the -Q or -Si drives using an HD15 male connector. You'll have to add this connector yourself according to the diagram below. It is not essential to connect the Z (index) channel.

If you are using an encoder with single ended outputs, beware! Differential connections are far less sensitive to electrical interference and permit longer cable runs. If you must use a single ended encoder, keep the wiring distance to a minimum and be sure to use a good quality shielded cable with the drain wire soldered to the connector shell at the drive end. The encoder output signals should be connected to the A+ and B+ terminals. Leave A- and B- unconnected. They are internally biased to the proper voltage for best results. You'll also need to select the "single ended" box in the encoder dialog or the drive will think you have a broken encoder wire. That's another good reason to use a differential encoder: the drive can detect a broken wire or bad signal and alert you to the problem.

Encoder Feedback Options

Stall Detection continuously compares the actual motor position, as reported by the encoder, against the theoretical motor position. If the motor strays so far out of position that it can produce no torque, a position fault occurs. This includes a motor at rest being driven out of position by an external force.

Check the box below Stall Detection if you want the drive to fault when the motor stalls. This fault can be reported by the Fault output and cleared by the Alarm Reset input (see I/O Dialog).

Stall Prevention can prevent many stalls before they occur. The drive achieves this by using the encoder to monitor the lead angle of the motor, a measure of torque utilization. If the motion profile begins to demand more torque than the motor can produce, the velocity is automatically reduced before the motor stalls. To engage stall prevention, simply check the Stall Prevention box and enter the maximum torque utilization you want to allow.

In the event that the motor cannot move at all, such as hitting a hard stop, you can fault the drive after a given amount of time by checking the Hard Stop box and entering a time limit.

The encoder resolution must be at least 2000 counts/rev for stall prevention to operate correctly. At lower resolutions, the drive cannot accurately measure the motor's lead angle.