As a high-precision position sensor,the grating ruler is widely used in various displacement measuring systems,numerical control machine tools,and microelectronics packaging devices for position detection devices because of its high measurement accuracy,high reliability,and high response speed,realize the closed-loop control of the system.Therefore,as a kind of precision measuring instrument,grating ruler products need to be tested for accuracy before leaving the factory to ensure product quality.In this paper,according to the requirements of a company’s large-scale accuracy detection of grating ruler,a grating ruler data collector based on USB2.0 interface chip CY7C68013 A and Altera Corporation’s Cyclone IV series of FPGA chips was proposed.Combined with the software of the host computer,a grating ruler accuracy detection system was constructed,in order to achieve the task of precision detection function for the grating ruler.In this paper,firstly,the principle of grating ruler precision detection is introduced,and the existing schemes and defects of the grating ruler accuracy detection system are analyzed.In combination with the requirement of large-scale detection of grating ruler,a design proposal for a grating ruler accuracy detection system is proposed.Secondly,the working principle of the incremental grating ruler and the absolute grating ruler is introduced.The performance and characteristics of the data collecting device in the precision detection system are analyzed.Participated in and put forward a grating ruler data collector that adopts the embedded scheme to realize position signal acquisition of the grating ruler.Furthermore,based on a careful study of the USB2.0 communication protocol,USB driver and related data,this paper completed the design of the USB interface chip firmware program in the data collector and verified the function of the firmware program.Participate in and complete the design of the communication protocol between the system data collector and the host computer software,and implement the communication module part of the host computer software,so that the host computer software of the system can communicate with the data collector through the USB interface,and control the data collector to complete various inspection tasks.Finally,through the analysis of the functions of the system PC software,the database software,multithreading technology and MFC are used to develop the software of the host computer.The database management module,the software configuration module,the graphic drawing module and the product inquiry are realized.The function of multiple modules such as modules,combined with the data collector of the system,the accuracy detection system can meet the task of the company to produce various types of scales with high accuracy and real-time detection.At the end of this paper,through the establishment of a grating ruler accuracy detection platform,collecting a number of data to analyze the original accuracy of the reference grating ruler,to obtain the reference scale compensation data table.Finally,verify the system’s reference scale accuracy compensation module to confirm the system can achieved detection accuracy,thus ensuring the reliability of the detection system. |