PURPOSE: To prevent abnormalities in the self-diagnosis of a tool breakage sensor from erroneous detection when outputted in the detection of a cutting oil splash and the instantaneous deviation or the like of optical axis caused by vibrations.
CONSTITUTION: A photo-electric sensor provided with a function of outputting an abnormal self-diagnosis signal when a light receiving amount is outside the normal range is used for a tool breakage detector 4. A timer TA for setting a time (ta) for the self-diagnosis, a timer TB for setting the allowable duration (tb) of abnormal self-diagnosis output and an abnormal self-diagnosis judging means 9 are provided. The judging means 9 judges the abnormal self-diagnosis only in the detection of the abnormal self-diagnosis signal in the time (ta) for the self-diagnosis over the allowable duration (tb).