A population based real-time optimization method for tuning dynamic position control parameters of robot manipulators has been proposed. Conventionally, the positional control is achieved by inverse dynamics feedforward and PID feedback controllers. The proposed method allows to tune the PID controller parameters using population based optimization methods to minimize the error while tracking a repeated desired trajectory on real-time. The stability of the system is granted by switching the inappropriate settings to a stable default using a real-time cost evaluation function. The proposed tuning method is tested on a two-joint planar manipulator with Cross-Entropy optimization, and on a planar inverted pendulum both with Cross Entropy, and Differential Evolutionary search methods. The test results indicated that the proposed method improves the settling time and reduces the position error over the repeated paths for both population based evolutionary optimization.