Programmable servo-actuated mechanisms can enhance the flexibility and the reconfigurability of modern manufacturing systems. Differently from fully mechanical design solutions (such as mechanical cams) and especially in the case of high-dynamic motions, servomechanism performance depends on several interacting factors, namely electric motor and linkage dynamics, controller efficacy, and requested motion law. In particular, point-to-point (PTP) trajectories are usually designed in order to comply with technological constraints, imposed by the required interaction with the handled product, and to maximize some optimality criterion such as, for instance, energy efficiency or limited actuation torques. In this context, the present paper proposes a novel method for designing energy and peak-power optimal PTP motions. A standard optimization problem is solved by means of either cubic or quintic splines. Nonetheless, differently from previous approaches, the optimization cost functions are based on a virtual prototype of the system, which comprises behavioral models of power converter, controller, and electric motor coupled with the mechanical system. Results are then compared with experimental data obtained on a physical prototype. The comparison quantitatively shows that better-behaved PTP trajectories can be designed by including the dynamic contribution of each subsystem component.