Using a beam current of an ion beam, and a dose amount to a substrate, and an initial value of a scan number of the substrate set to 1, a scan speed of the substrate is calculated. If the scan speed is within the range, the current scan number and the current scan speed are set as a practical scan number and a practical scan speed, respectively. If the scan speed is higher than the upper limit of the range, the calculation process is aborted. If the scan speed is lower than the lower limit of the range, the scan number is incremented by one to calculate a corrected scan number. A corrected scan speed is calculated by using the corrected scan number, etc. The above steps are repeated until the corrected scan speed is within the allowable scan speed range.