A storage medium having a program stored thereon, said program for use in a driving apparatus comprising a driving source which drives a driven member through a power transmission mechanism and position detecting circuit detecting a driving position of said driving source, and outputting a speed command to said driving source to perform speed control, said program for performing control such that the driving position detected by said position detecting circuit reaches a target position, said program comprising:
- a first speed control routine of changing said speed command to an acceleration side at a change rate to drive said driving source with acceleration by at least a driving amount corresponding to a maximum mechanical dead zone of said power transmission mechanism;
- a second speed control routine of maintaining said speed command constant or changing said speed command to the acceleration side at a change rate lower than the change rate at said first speed control routine during driving of said driving source by a driving amount required for a driving speed of said driven member to reach a speed corresponding to a speed of said driving source and a design speed change ratio of said power transmission mechanism after said first speed control routine;
- a third speed control routine of changing said speed command to the acceleration side after said second speed control routine;
- a fourth speed control routine of changing said speed command to a deceleration side at a change rate to decelerate said driving source by at least the driving amount corresponding to the maximum mechanical dead zone of said power transmission mechanism after said third speed control routine;
- a fifth speed control routine of maintaining said speed command constant or changing said speed command to the deceleration side at a change rate lower than the change rate at said fourth speed control routine during driving of said driving source by a driving amount required for the driving speed of said driven member to reach a speed corresponding to a speed of said driving source and the design speed change ratio of said power transmission mechanism after said fourth speed control routine;
- and
- a sixth speed control routine of changing said speed command to the deceleration side to stop said driving source at said target position after said fifth speed control routine.