An on-machine real-time measurement method for a full-closed loop five-axis computer numerical control (CNC) machine tool, wherein an on-machine real-time measurement system comprises a displacement measurement component, signal converters, multifunctional evaluation electronics boxes, grating scales, a synchronous communication module and a host computer, wherein:
- the displacement measurement component comprises a non-contact displacement sensor and a high-precision coaxial fixture for measuring position points on a workpiece surface, which is installed on a CNC machine tool spindle during a workpiece measurement and is automatically placed in a tool magazine under an action of a tool changer in the full-closed loop five-axis CNC machine tool;
- the grating scales on the full-closed loop five-axis CNC machine tool is connected to the signal converters, and the signal converters route grating scale position signals in real time to the CNC measurement system and the multifunctional evaluation electronics box used for detection;
- the multifunctional evaluation electronics box synchronously reads the position signals of the grating scales on the full-closed loop five-axis CNC machine tool in real time, and simultaneously triggers the non-contact displacement sensor in real time to collect a surface information of the measured workpiece, wherein the grating scale position signals of each machine axis include position signals and timestamp index signals of each axis, and measurement signals of the sensor include light intensity signals, displacement signals and trigger index signals;
- the synchronous communication module caches data packets of the grating scale position signals and the measurement signals of the sensor to a first in first out (FIFO) rotation buffering module of the host computer through transmission control protocol/internet protocol (TCP/IP) in real time and concurrently to reduce a burden of high-speed transmission;
- the host computer reads the data in the FIFO rotation buffering module and synchronously sends data confirmation information to the multifunctional evaluation electronics box and the non-contact displacement sensor, so as to form a closed loop of information to ensure one-to-one correspondence between the position of each machine axis and the measurement signal measurement data;
- and on this basis, the host computer performs data processing and coordinate transformation of the grating scale position signals and the measurement data, and finally obtains a three-dimensional geometric information of the measured workpiece surface;
- the measurement method comprises the following specific steps:
- S1:
- setting an external trigger type, an output data type and a trigger index time of the non-contact displacement sensor through the host computer, and setting an operation mode, a sampled signal type, a sampling frequency and a triggering source of the multifunctional evaluation electronics box;
- S2:
- planning a measurement path that maintains an axis direction of the machine tool spindle is the same as a normal direction of the workpiece surface;
- and generating and importing numerical control (NC) code into the CNC measurement system;
- and then installing the displacement measurement component on the machine tool spindle;
- preparing the measured workpiece is to be scanned in whole;
- S3:
- setting the host computer to read data sets of the grating scale position signals of each axis and the measurement signals of the sensor in the FIFO rotation buffering module, and carrying out data comparison and data filtering;
- S4:
- according to the results of data comparison and data filtering, synthesizing the position data in the grating scale position signals of each axis and a displacement data in the measurement signals of the sensor in a following ways, so as to obtain the three dimensional geometric information of a measuring point p on the measured workpiece surface:
- Pw=Jm−1((d·Rqt+Nqt)+Tm)
- wherein pw=[xpw ypw zpw]T represents a coordinate information of the measuring point p on the measured workpiece surface in a workpiece w coordinate system x y z, T indicates a vector transpose operation, d is a distance signal of the non-contact displacement sensor or a sum of the distance signal and a thickness signal, Nqt is a relative coordinate [xqt yqt zqt] of an optical zero-point q of the non-contact displacement sensor corresponding to a measuring point relative to a base point of a tool movement t axis of the full-closed loop five-axis CNC machine tool, Rqt is a light extraction vector [iqt jqt kqt]T of the non-contact displacement sensor corresponding to the measuring point relative to the base point of the tool movement t axis of the full-closed loop five-axis CNC machine tool, where i j k are coordinates of the light extraction vector on the workpiece coordinate system x y z, Tm is a translation matrix composed of the position signals of the grating scale of each axis of the full-closed loop five-axis CNC machine tool, and Jm−1 is an inverse Jacobian rotation matrix composed of the grating scale position signals of each axis of the full-closed loop five-axis CNC machine tool;
- S5:
- repeating steps S3 and S4 until an end of scanning, and finally obtaining the three-dimensional geometric information of the measured workpiece surface;
- S6:
- upon completion of the workpiece measurement, automatically returning the displacement measurement component to the tool magazine.