A specific technique combined Hartmann diaphragm with electronic measurement control system was brought forward to measure the spherical and prismatic powers or other optical parameters of an eyeglass, a novel lensmeter which can recognize the type of an eyeglass and focus automatically was designed adopted this method. A CMOS image sensor was utilized to acquire data, a SOPC based on FPGA embedded a soft core was used to process and control, an operation interface was designed according to the system function, a Boundary-Scan Testing method through the USB interface was realized. The experimental results show that the system is convenient, in high measurement accuracy and easy to be maintained.