According to the development idea of virtual instrument, the hardware structure of the ultrasonic testing (UT) system for numerical control (NC) machine tool was designed, and the front panel and diagram program of the system was completed by using platform of LabVIEW. It realizes the on-line UT of workpiece in the machining process of NC machine tool.