a rotary encoder is coupled to the drive for a printing head to detect and encode movement of the drive and produce signals therefrom which are used to control the direction and positioning of the printing head . a rotating disc - like wheel in the encoder has a plurality of peripheral window openings which act in conjunction with a light source and detector to produce a signal train from which the movement and instantaneous location of the printing head is determined .