On-line detection system and detection method of machining accuracy of parts for numerically controlled lathe

The invention relates to an on-line detection system and detection method of machining accuracy of parts for a numerically controlled lathe. The detection system comprises a chuck, a workpiece and a lathe probe, wherein the workpiece is arranged on the chuck, and the lathe probe is arranged at the side of the workpiece; and a signal output terminal of the lathe probe is connected with a controller of the detection system. The detection method comprises the following steps that 1) the lathe probe is arranged at the side of the workpiece; 2) the lathe probe is calibrated; 3) the measuring path and code generation of geometrical parts and curved-surface parts are planned; and 4) the heat distortion temperature error compensation and machining error analysis of parts are carried out by the controller of the detection system. The parts do not need to leave the lathe after being machined, a touch probe is used for replacing a turning tool, and the detection path of the probe is automatically planned and the detection code is generated according to the geometric outline and detection items of the machined workpiece; and through a communication interface of the numerically controlled lathe, the detection code is driven, so that the automatic measurement of the size and precision of size and form of the machined part is realized, and the detection accuracy and efficiency of the workpiece are improved.