Patent ID: 7194339

Claim:
A method of controlling a motor, comprising the steps of: preparing a motor control device provided with a motor for moving an object to be moved, said motor control device causing said motor to move said object to be moved to a target position by first accelerating said object to be moved and then moving said object to be moved at a constant velocity; storing in advance an acceleration-period power consumption value corresponding to a power consumption of said motor during the accelerating movement; storing in advance a current value of a current flowing through said motor when said object to be moved is moved at said constant velocity; detecting a time for which said object to be moved is moved at said constant velocity when said object to be moved is moved to said target position; calculating a constant-velocity-period power consumption value corresponding to a power consumption of said motor during the constant velocity movement of said object to be moved based on said time that has been detected and said current value; and calculating a power consumption of said motor for a period during which said object to be moved is moved to said target position based on said acceleration-period power consumption value and said constant-velocity-period power consumption value.