A computer readable recording medium recorded with the drive control program of a rack and pinion mechanism, which comprises a rack gear fixed to a stage moving on a carrying track while loading a carried object thereon and a plurality of pinion gears connected to a drive source and meshing with the rack gear, wherein at least two of the pinion gears are synchronized and rotate to mesh with the rack gear in sequence, whereby the rack gear is delivered from the pinion gear in the current process to the pinion gear in the subsequent process, so that the stage is carried, the program being characterized by causing a controller, which controls the rack and pinion mechanism, to execute the steps of:
- determining a reference point to the pinion gear in the current process and storing the reference point;
- obtaining an angle that the pinion gear in the current process rotates from the reference point from when the pinion gear starts to mesh with the rack gear till the termination of the meshing;
- calculating “360 degrees÷the number of teeth of the pinion gear” as one teeth number angle of the pinion gear in the current process;
- calculating a residual angle by dividing the rotating angle by the one teeth number angle;
- when the residual angle is more than half of the one teeth number angle, rotating the pinion gear in the subsequent process from the reference point in an advancing direction by “one teeth number angle−residual angle”;
- and
- meanwhile, when the residual angle is less than the half of the one teeth number angle, rotating the pinion gear in the subsequent process from the reference point in the opposite direction to the advancing direction by the residual angle.