Abstract: A method and apparatus for controlling the output to a drive for moving a workpiece and/or tool along a defined path in a machine tool. The drive output can be modified according to a periodic controlling variable or a periodic disturbance variable. The defined path of the workpiece is divided into equidistant subdivisions and a control deviation corresponding to each subdivision of the defined path is determined and stored. A control variable is derived from the control deviation and utilized to control the drive output.