摘要 |
PROBLEM TO BE SOLVED: To provide a motor controller capable of appropriately controlling a motor on the basis of an accurately estimated motor current even when heat generation and the like are caused in the motor.SOLUTION: A motor controller comprises: a PWM output section 152 setting a duty value of PMW control with respect to a feed motor 53; a rotational speed calculation section 142 acquiring a rotational speed of the feed motor 53; a temperature estimation section 162 acquiring a temperature variation of the feed motor 53; a coefficient correction section 163 correcting a first coefficient and a second coefficient on the basis of the acquired temperature variation; a current estimation section 161 estimating a motor current being a current flowing through the feed motor 53 on the basis of a value obtained by multiplying the set duty value by the corrected first coefficient and a value obtained by multiplying the acquired rotational speed by the corrected second coefficient; and a feed motor driver 106c driving the feed motor 53 on the basis of the motor current estimated by the current estimation section 161. |