The Moire gratings technology and CCD are integrated and applied in an intelligent displacement and angle measurement system.A virtual grating produced by diffraction self-imagery forms Moire fringe with another grating.Using CCD,the period of Moire lines is measured,and the angular between the two gratings can be obtained.When any of the two gratings moves perpendicular to its grating lines,the displacement of the grating can be obtained by measuring the changes of the Moire lines.This paper also analyzes the measurement errors.