We have built an adaptive optics (AO) system enables the measurement and subsequent compensation of ocular aberrations in real time. The system constis of an illumination channel from a IR Superluminescent diode, a Hartmann-Shack (HS) wavefront sensor a 52-actuators electromagnetic deformable Mirror (MIRAO, Imagine Eyes), an eye tracking channel and a channel for presentation of visual stimuli. The system operates in close loop by measuring the wave aberrations in real time (13 Hz), and controlling the shape of the deformable mirror to continously achive the desired wavefront (i.e. corrected from aberrations or with a particular induced aberration pattern). The system is used to assess the effect of optical aberrations on visual performance, and on the dynamic accommodative system, among others.