A control apparatus for controlling processing including a plurality of steps, wherein the processing is for moving, by driving a servo motor, a control target, which is a machine or equipment, from an initial position to a predetermined position in a total driving time during which the plurality of steps are processed, the control apparatus comprising: an input reception unit configured to receive the total driving time, the initial position, end positions of the steps and end velocities of the steps for executing the processing; a time allocation setting unit configured to set a time allocation of the steps in the total driving time; and an operation value calculation unit configured to calculate the minimum operation values needed for the processing of the steps, for the times set by the time allocation setting unit, an input locus generation unit configured to generate an input locus for moving the control target in the steps, wherein the control apparatus is configured to determine whether or not a difference between the minimum operation values of the steps, which were calculated by the operation value calculation unit, falls within a predetermined range, and if it is determined that the difference between the minimum operation values of the steps falls not within the predetermined range, the time allocation setting unit is configured to re-set the time allocation of the steps in the total driving time and the operation value calculation unit is configured to re-calculate the minimum operation values needed for the processing of the steps, for the times re-set by the time allocation setting unit repeatedly until the difference between the minimum operation values of the steps, which were calculated by the operation value calculation unit, falls within the predetermined range, by using a numerical value analysis method, wherein the operation value calculation unit is configured to calculate the torque values as the minimum operation values for the times set by the time allocation setting unit, the torque values being calculated by using the initial position, the initial velocity, the end positions of the steps, and the end velocities of the steps; and the input locus generation unit is configured to generate the input locus based on a torque waveform obtained by using the torque values calculated by the operation value calculation unit for which the difference between the minimum operation values falls within the predetermined range. an input reception unit configured to receive the total driving time, the initial position, end positions of the steps and end velocities of the steps for executing the processing; a time allocation setting unit configured to set a time allocation of the steps in the total driving time; and an operation value calculation unit configured to calculate the minimum operation values needed for the processing of the steps, for the times set by the time allocation setting unit, an input locus generation unit configured to generate an input locus for moving the control target in the steps, wherein the control apparatus is configured to determine whether or not a difference between the minimum operation values of the steps, which were calculated by the operation value calculation unit, falls within a predetermined range, and if it is determined that the difference between the minimum operation values of the steps falls not within the predetermined range, the time allocation setting unit is configured to re-set the time allocation of the steps in the total driving time and the operation value calculation unit is configured to re-calculate the minimum operation values needed for the processing of the steps, for the times re-set by the time allocation setting unit repeatedly until the difference between the minimum operation values of the steps, which were calculated by the operation value calculation unit, falls within the predetermined range, by using a numerical value analysis method, wherein the operation value calculation unit is configured to calculate the torque values as the minimum operation values for the times set by the time allocation setting unit, the torque values being calculated by using the initial position, the initial velocity, the end positions of the steps, and the end velocities of the steps; and the input locus generation unit is configured to generate the input locus based on a torque waveform obtained by using the torque values calculated by the operation value calculation unit for which the difference between the minimum operation values falls within the predetermined range.