AFM_controller