Aiming to deal with thermal error of NC machine tool which can cause reduce of machining accuracy, this paper uses an external error compensation which interacts with NC controllers and PMAC multi-axis and then revises the tool path by adding the error tested in real-time by PMAC card. The processing accuracy is improved eventually. This method can compensate machine geometric errors and thermal errors in real-time. Comparing with other methods of error preventing, this method is more effective and affordable.