This study presents a control design for a grid connected wind energy conversion system based on a gearless PMSG. The generation system structure comprises a three blade turbine, a 2 MW multi-pole PMSG and a full-scale backto-back frequency converter linked to the utility grid. The proposed control scheme allows following dynamical specifications taking into account operational requirements and ancillary services imposed by the recent grid connection codes, that is, reactive power regulation and fault ride-through (FRT) capabilities. The control actions to be applied during normal grid operation are designed through second-order sliding mode techniques using a two-stage cascade structure. The multi-variable controller designed attains to regulate the active and reactive powers delivered to the grid, minimising the resistive losses into the generator and maintaining important internal variables into the desired range. This controller presents attractive advantages such as robustness against unmodelled dynamics and external perturbations, finite time convergence to the sliding surfaces and chattering mitigation. To endorse the controlled system with FRT capabilities, a switching control scheme based on voltage grid measurements is also proposed. The performance of the whole control approach is analysed through representative simulations which include parameter variations, external perturbations and three-phase voltage dips.