1. A numerical controller that outputs a position command corresponding to a synchronous position in consideration of a servo
delay of a slave axis, to the slave axis from a real position of a master axis, in order to perform position control of the
slave axis, thereby making a real position of the slave axis synchronously follow the real position of the master axis,
wherein a position control gain of the slave axis is changed based on a predetermined physical quantity during the synchronous
control and a compensation value for the position command for the slave axis is varied depending on the amount of change of
the position control gain of the slave axis.