The device has a flanged housing with a shaft (26) rotatable in the flange (20) and connected to a code plate (28) and a code plate sensing unit (30). The sensing unit has at least one light source (32) and at least one associated light receiver (34). The code plate is arranged in the light path between the light source and receiver, and the sensing unit is adjustable with respect to the code plate. The sensing unit can be moved along a circular arc, with a centre eccentrically offset with respect to the shaft axis (52).