Scanning unit, designed for scanning a measuring graduation of a scale for position measurement in a measuring direction, comprising: a housing having a detector for generating position-dependent scanning signals; an electric line which, extending through the housing in the measuring direction, is led to the outside, characterized in that the electric line is guided in a rotary body, wherein the rotary body has a first tubular section, which extends rectilinearly in the measuring direction, and has a second section, which extends in a second direction that extends at an angle with respect to the measuring direction, and in that the first section of the rotary body is mounted such that it can rotate about an axis of rotation in an opening of the housing, said axis of rotation extending in the measuring direction wherein the rotatable mounting of the rotary body is carried out by a circumferential groove (6.1) introduced into the first section of the rotary body, which groove cooperates with pins (6.2, 6.3) which extend transversely with respect to the axis of rotation and which are introduced into a wall of the housing that extends transversely with respect to the measuring direction, and wherein the groove (6.1), in conjunction with the pins (6.2, 6.3), forms an axial pull-out safeguard between the housing and the rotary body, and in that the rotary body can be locked in a set rotational position on the housing by means of a blocking element, wherein the blocking element is a screw that is screwed into the wall of the housing transversely with respect to the axis of rotation of the rotary body, and can be actuated from outside, which screw fixes the rotary body in a clamping manner in a fixed location on the housing. a housing having a detector for generating position-dependent scanning signals; an electric line which, extending through the housing in the measuring direction, is led to the outside, characterized in that the electric line is guided in a rotary body, wherein the rotary body has a first tubular section, which extends rectilinearly in the measuring direction, and has a second section, which extends in a second direction that extends at an angle with respect to the measuring direction, and in that the first section of the rotary body is mounted such that it can rotate about an axis of rotation in an opening of the housing, said axis of rotation extending in the measuring direction wherein the rotatable mounting of the rotary body is carried out by a circumferential groove (6.1) introduced into the first section of the rotary body, which groove cooperates with pins (6.2, 6.3) which extend transversely with respect to the axis of rotation and which are introduced into a wall of the housing that extends transversely with respect to the measuring direction, and wherein the groove (6.1), in conjunction with the pins (6.2, 6.3), forms an axial pull-out safeguard between the housing and the rotary body, and in that the rotary body can be locked in a set rotational position on the housing by means of a blocking element, wherein the blocking element is a screw that is screwed into the wall of the housing transversely with respect to the axis of rotation of the rotary body, and can be actuated from outside, which screw fixes the rotary body in a clamping manner in a fixed location on the housing.