In this paper, we investigate the theory of energy distribution when divergent light undergoes harmonic conversion in KDP crystals, and based on this theory, we design and construct a precision measuring instrument for the detuning angle of (KDP) Crystals (MIDC). The device can obtain the detuning angle of the crystal by a single measurement with an average measurement error of 72.78 urad. At the same time, it also has the function of scanning the full aperture of the crystals. Using the MIDC, it is possible to quickly measure the KDP crystal at a single point and quickly scan the crystal detuning angle at full aperture. In addition, we conduct a theoretical study on the variation of detuning angle caused by gravity-influencing factors under online conditions, propose an optimization formula for the offline measurement results of detuning angle, and calculate the optimized values of detuning angle for two kinds of crystals under 45° online conditions. We finally study the error source of the MIDC device, analyze the trend of the influence of positioning errors of the crystal and optical elements on the detuning angle measurement results, and provide theoretical support for the error monitoring and correction of MIDC.