An encoder cable transmits encoder output, which may include multiple channels, to a control device. Encoder cable signal transmission can be degraded by many factors including, long transmission runs, high cable capacitance and extreme EMI. Index pulse is a pulse that occurs once per rotation. It’s duration is nominally one A (or B) electrical cycle, but can be gated to reduce the pulse width. The Index (Z) pulse can be used to verify correct pulse count.
An encoder is classified into four types: mechanical, optical, magnetic, and electromagnetic induction types. There are four types of information necessary to rotate the motor with high accuracy: rotation amount, rotational speed, rotational direction, and rotational position.
The connections are quite simple. Start by connecting the +V pin on the module to 5V on the Arduino and the GND pin to Ground. Now connect the CLK and DT pins to digital pins #2 and #3 respectively. Lastly connect the SW pin to digital pin #4.