This paper deals with the design of the control structure of a lower-limbs rehabilitation device in closed muscular chain called Sys-Reeduc. This control structure aims at providing a safe behavior to the user when performing rehabilitation exercises. It is based on two levels. The first level is concerned with the robust trajectory tracking of robotic device and has been the subject of previous studies. Nevertheless, it does not allow, by itself, the user to voluntarily drive the device. Therefore, a trajectory generator constituting the second level is presented in this paper to complete the whole control structure. This high-level control layer is described by a set of dedicated discrete state machines that provide the appropriate sequencing of elementary rehabilitation movements. These elementary movements are dynamically characterized so that clinician may choose the required trajectory parameters to adapt rehabilitation protocols and training to each individual. To realize a complete rehabilitation exercise, the sequence of elementary movements is triggered by thresholds relative to the measurement of the efforts applied by the user on the device. This allows the user to play an active role in its rehabilitation exercises and safely drive the machine at his/her own initiative. The design of the main exercises (isokinetic, isometric, and isotonic) used in the context of lower limbs rehabilitation is described, and simulation results illustrate the effectiveness of the proposed trajectory generator-based control approach.