This invention discloses an online
contour error compensation method and
system for a
machining-inspection synchronized
machine tool, belonging to the field of CNC related technology. It constructs a generalized tool space kinematic model including the spindle, tool, and scanning probe, establishing the transformation relationship between the probe coordinate
system and the tool coordinate
system; plans the cooperative trajectory of the tool
machining path and the probe scanning path, avoiding the probe in non-inspection areas and constraining its posture and feed rate in the inspection area; during
machining, it collects workpiece contour
point cloud data in real time, maps it to tool tip coordinates using the transformation relationship, reconstructs the actual contour surface, and calculates its
contour error compared to the desired surface; it decouples the error into
servo axis components, generates axis compensation commands, and corrects the
servo drive signals to achieve real-time closed-loop compensation. This invention solves the problem of difficulty in
synchronizing online inspection and error compensation in complex surface machining, realizing real-time contour accuracy control under integrated machining-inspection.