||In this research, we have developed an add-on online measurement system for CNC machine aimed at improving the accuracy, efficiency and productivity during the machining process. In order to achieve these goals, the effective probing structure has been designed with a selected sensor as its core, which could be used to measure the location error in all three dimensions. In comparison to the traditional measurment process, the inspection of the machined parts could be accomplished much easier by our system, as it takes the measurement on the machine and it is not necessary to remount the machined parts or change the milling tool's location. The check-up process becomes a relatively simple task and can be done with significantly less time and effort. While our system may not be quite as accurate as the commercial measuring system such as CMM or OMM, it provides a cost-effective means for inspection of the machined parts. The productivity could be enhanced while the cost of quality inspection of the machined parts could be greatly reduced. We have also applied the error compensation technique with the system aimed to improve the accuracy. As a result, we found out that the errors of general shapes, like polygonal and curve pockets are predictable by cutting test patterns with similar geometry and smaller scales. Futhermore, we could use these predictable errors to compensate the original cutting.