Connect the shield of the encoder cable on the encoder, the encoder connector, the grounding terminal in the terminal box, or the grounded housing of the encoder connector over a wide area.