WEAVE is a wide-field spectroscopy facility for WHT which includes a multi-object dual-beam spectrograph which will operate in the visible wavelength range. The blue beam will cover the range 360-600 nm and the red arm will cover the 580-960 nm range. In these ranges the spectrograph will offer a mid-resolution ( 5000), while in three narrower wavelength intervals, two for the blue arm and one for the red one, the instrument will provide a high ( 20000) spectrograph resolution. The spectrograph is currently entering the assembly and integration phase and the first light is foreseen in 2019. The entire WEAVE project is managed by an international consortium led by the University of Oxford. The spectrograph is controlled by a coordination process, the so called High-Level Server, which is part of the Observatory Control System (OCS) software suite, and is the single point of access to the embedded control system, the so called Low-Level Control Software, which is based on PAC technology. This paper describes the design of the embedded software for the control of the spectrograph mechanisms. We first describe the interface between high and low level software, then we present the PAC architecture and discuss the low-level state machine. Finally, we provide details on the principal program routines and describe the engineering interface.