Abstract: The grinding machine of the invention uses a grinding wheel, and is primarily intended for descaling and cleaning billets before being rolled. An instrument for measuring, for instance, electromagnetic radiation is directed to the flow of matter and energy from the contact zone between the grinding wheel and a workpiece. Continuous measurement is performed and an output signal from the instrument is used for changing grinding data of the grinding machine to restore conditions in the flow of matter and energy from the contact zone.