摘要 |
A method for controlling a stepping motor that moves an object from an initial position by a target distance. The method includes calculating a moved distance of the object, calculating a remaining moving distance of the object, updating a first velocity value until the moved distance exceeds a first reference value, updating a first position value indicating the present position of the accelerated object by adding the updated first velocity value to the first position value, updating a second velocity value when the remaining distance is less than the second reference value by subtracting a second acceleration value from the second velocity value, and updating a second position value indicating the present position of the decelerated object by adding the updated second velocity value to the second position value.
|