Magnetic particle inspection is suitable for detecting surface defects and defects several millimeters deep below the surface. It requires DC (or AC) magnetization equipment and magnetic powder (or magnetic suspension) for inspection operations. Magnetizing equipment is used to generate a magnetic field on the inner and outer surfaces of the casting, and magnetic powder or magnetic suspension is used to reveal defects. When a magnetic field is generated within a certain range of the casting, the defects in the magnetized area will generate a leakage magnetic field. When the magnetic powder or suspension is sprinkled, the magnetic powder is attracted, so that the defects can be displayed. The defects displayed in this way are defects transverse to the magnetic field lines, and the long-shaped defects parallel to the magnetic field lines cannot be displayed. Therefore, the magnetization direction needs to be changed continuously during operation to ensure that each defect in an unknown direction can be detected.