There are several types of encoder mounting styles to choose from when selecting an encoder for your application. Typically, you will choose between hollowshaft, shafted, hubshaft, and ring (or c-faced) mounting styles for encoders. Hollowshaft encoders allow the shaft of the motor to go through the encoder, and secures to the shaft by the shaft collar. Shafted encoders attach to the motor with a flexible coupling or possibly a belt (gear). Hubshaft encoders mount to motor shafts similarly to hollowshaft encoders. The difference in the hubshaft is that the motor shaft can only go about halfway into the encoder rather than completely through. Lastly, the ring (c-faced) option allows the encoder to bolt directly to the flange of the motor for bearingless designs. You will need to choose the mounting style that best suits your motor or application.
Optical encoders use a glass disk with a pattern of lines deposited on it, a metal or plastic disk with slots (in a rotary encoder), or a glass or metal strip (in a linear encoder). Light from an LED shines through the disk or strip onto one or more photodetectors, which produce the encoder’s output. An incremental encoder has one or more of these tracks, while an absolute encoder has as many tracks as it has output bits.