Thermal error of machine tool is the main in total machine tool error, and obviously impairs the accuracy of the machined workpieces. Ram is a very important component of heavy-duty floor type boring-milling machine, and its thermal deformation is a significant source causing errors in machining process. Aiming at the thermal elongation of heavy type milling boring machine tool ram, the machine tool thermal errors are measured and compensated. Temperature compensation function in NC system is applied. Experiment results shows that 90% ram positioning error can be compensated.