Patent ID: 7061203

Claim:
A method for controlling a stepping motor, the stepping motor being connected to a controller and a loading device, the method comprising: utilizing the controller for outputting a control signal to the stepping motor according to a target displacement and a first index parameter, utilizing the stepping motor to move the loading device according to the control signal; utilizing the controller for calculating a difference between the target displacement and an actual displacement of the loading device; and utilizing the controller for generating a second index parameter according to the first index parameter, the difference, and the actual displacement, wherein the first and second index parameters each represent a number of driving pulses output from the controller to the stepping motor through the control signal that are required to move the stepping motor a predetermined displacement, and generating the second index parameter comprises: when the actual displacement is greater than the target displacement, utilizing the controller for calculating a deviation value between the difference and a threshold value, utilizing the controller for calculating a modified displacement by subtracting the target displacement from the deviation value, and utilizing the controller for subtracting a compensation value from the first index parameter to generate the second index parameter wherein the compensation value is calculated from a product of the deviation value and the first index parameter divided by the modified displacement.