The invention discloses an X-
ray automatic focusing method based on a semi-focusing multi-capillary lens. According to the invention, a plurality of single-axis precision displacement tables are combined to form a four-dimensional adjusting structure, the real-
time signal acquisition and feedback functions of a
diode detector are combined, and the lower
machine position is controlled by using Labview
control software in the upper
machine position, so that the automatic focusing positioning of the semi-focusing multi-capillary lens is realized. According to the method, accurate adjustment of the capillary lens is achieved through dynamic circulation of
signal detection, data calculation and position correction, and in a medium-energy X-
ray focusing
signal feedback scene, a high-performance
signal feedback element such as a
diode detector can be adopted for real-time judgment of the focusing state. The moving direction and the step length of the displacement table are dynamically controlled based on the signal analysis result, automatic and accurate focusing of the capillary lens is achieved, the problem of insufficient focusing can be effectively solved, the operation steps are simplified, and the adjusting time is shortened.