A feedback mechanism based on fuzzy logic has been applied to operate a combined atomic force microscope (AFM)/scanning tunneling microscope (STM), which is able to measure the resonance frequency shift Δf of the cantilever-type spring and the mean tunneling current Īt simultaneously. Using a decision making logic, the microscope can be scanned over a heterogeneous surface without tip crash. On the conductive parts of the sample, the STM mode is preferred, whereas the noncontact (nc)-AFM mode is used on the poorly conductive parts of the surface. The transition from the STM mode to nc-AFM mode is performed smoothly with the fuzzy logic feedback.