A machine having X- and Y-axis linear moving axes and a pivot axis B for
rotationally pivoting a pivot member having a tool arranged at a distal
end thereof about an axis parallel to a Z axis is controlled. A moving
command obtained by a command program commanded by a position expressed
by X, Y, and Z in a three-dimensional orthogonal coordinate system is
subjected to an interpolation process to calculate amounts of
interpolation movement (.DELTA.X, .DELTA.Y, and .DELTA.Z) of the
respective orthogonal axes. An amount of rotation .DELTA..theta. of the
pivot axis required for moving the tool by the amount of movement
.DELTA.Y in the Y-axis direction is calculated. An amount of correction
movement .delta.x for canceling the movement in the X-axis direction
caused by the rotation .DELTA..theta. of the pivot axis B is calculated.
Values (.DELTA.X+.delta.x), .DELTA..theta., and .DELTA.Z are outputted to
the X axis, the pivot axis B, and the Z axis, respectively.