Patent attributes
A tool detector including a right-angle triangular base and an automatic controller is revealed. A light source of the right-angle triangular base emits a main light ray to a plane mirror to generate a reflected light ray which is incident to a quadrant detector to create a light receiving area. The automatic controller is for measuring a tool length and a tool radius. A control device of a computer numerical control machine tool sets up a standard value by a standard bar and drives an unfinished tool and a processed tool to set up an original value set and a measured value set. The automatic controller performs an error analysis on the original and measured value sets to get a relative difference of a tool length and radius of the processed tool for measuring the tool length and radius and compensation of thermal variables of the CNC machine tool.