Energy policies along with technological advancements in power electronics have allowed a high penetration of photovoltaic installations. To normalize grid connections, in particular for solar photovoltaic (PV) installations, an arrangement of requirements have been set as a grid code to prove that this penetration can provide support and fully control during both steady-state and transient conditions of the grid. In this paper, a control system for a PV installation connected to the grid is developed to accomplish the requirements raised in the 2010 draft version of the Spanish grid code P.O. 12.2. Control loops for steady-state conditions as well as transient conditions (voltage dips, swells, and frequency control) have been implemented. Simulations have been performed using PSCAD/EMTDC™ program and supported by field tests of an existing PV installation in Spain using the voltage dip generator.