Optical encoders are used to measure either angular or linear positions. œose used for angular detection are commonly called rotary or sha£ encoders, since they usually detect the rotation of a sha£. Optical encoders encompass a variety of devices, all of which use light as the means to transform movement into electrical signals. All devices have two basic building blocks: a main grating and a detection system. It is the position of one with respect tothe other that is detected. œe main grating represents the measurement standard. For linear measurements, the main grating, commonly called the scale, is one or more sets of parallel lines of constant or specially coded pitch supported by a substrate. Similarly, a rotary encoder has a grating with radial lines on a disk.