Control machine as function of position, angle of workpiece