A new type of mathematical modelling tool is utilized to formulate an LCD glass-handing robot driven by a permanent magnet synchronous motor (PMSM). In this paper, MapleSim software is easily used for dynamically modelling this mechatronic system and tracking a trajectory by using a proportional, integral, and derivative (PID) controller without complex mathematical derivations. The input absolute electrical energy (IAEE) point-to-point (PTP) trajectory is generated by a 12-degree polynomial with constraints at the initial and final times. For system identification, the real-coded genetic algorithm (RGA) is used to search for the unknown parameters of the mechatronic system and the gains of the PID controller. Comparing the results of numerical simulations for tracking the designed trajectory between the linear and nonlinear systems, it is found that the results are very similar because the system is a weakly nonlinear one. Through the experimental results, it is seen that the mechatronic system can track the designed trajectories successfully by an optimal PID controller.