A contactlessly measuring measuring system having a contactlessly measuring measuring device, with a light transmitter portion and a light receiver portion, for determining the position of a tool or for determining the longest cutting edge of a rotating tool in a tool machine, wherein - a light barrier system is formed by the light transmitter portion and the light receiver portion, each being associated with a leg (18, 20) of an essentially U-shaped support structure of the measuring device, having i. a protective/closing device at the light transmitter portion and/or the light receiver portion of the measuring device designed as a light barrier measuring system, wherein ii. the at least one protective/closing device is detachably connected to the light barrier measuring system, wherein a displaceable closure piston of the protective/closing device is situated in an attachment (36, 38) containing a light beam through opening, and wherein iii. the attachment has a sloped contour or wall which, in the state of the attachment (36, 38) mounted on the light barrier measuring system, is closer to a free upper end of the respective leg of the carrier structure than its lower end, and this contour or wall is inclined with respect to a light beam going from the light emitting part to the light receiving part in such a way that the attachment (36, 38) is tapered towards the opposite leg (18, 20) of the carrier structure. - a light barrier system is formed by the light transmitter portion and the light receiver portion, each being associated with a leg (18, 20) of an essentially U-shaped support structure of the measuring device, having i. a protective/closing device at the light transmitter portion and/or the light receiver portion of the measuring device designed as a light barrier measuring system, wherein ii. the at least one protective/closing device is detachably connected to the light barrier measuring system, wherein a displaceable closure piston of the protective/closing device is situated in an attachment (36, 38) containing a light beam through opening, and wherein iii. the attachment has a sloped contour or wall which, in the state of the attachment (36, 38) mounted on the light barrier measuring system, is closer to a free upper end of the respective leg of the carrier structure than its lower end, and this contour or wall is inclined with respect to a light beam going from the light emitting part to the light receiving part in such a way that the attachment (36, 38) is tapered towards the opposite leg (18, 20) of the carrier structure. i. a protective/closing device at the light transmitter portion and/or the light receiver portion of the measuring device designed as a light barrier measuring system, wherein ii. the at least one protective/closing device is detachably connected to the light barrier measuring system, wherein a displaceable closure piston of the protective/closing device is situated in an attachment (36, 38) containing a light beam through opening, and wherein iii. the attachment has a sloped contour or wall which, in the state of the attachment (36, 38) mounted on the light barrier measuring system, is closer to a free upper end of the respective leg of the carrier structure than its lower end, and this contour or wall is inclined with respect to a light beam going from the light emitting part to the light receiving part in such a way that the attachment (36, 38) is tapered towards the opposite leg (18, 20) of the carrier structure.