The invention relates to a controller and especially to a controller with the cleaning function. The technical problem to be solved by the present invention is to provide a controller having a cleaning function which is simple in cleaning process and saves time and labor and has long service life. To solve the above technical problem, the invention provides a controller with the cleaning function. The controller comprises a slide rail, sliding block, a rack, a first air outlet
pipe, an intake
pipe, a suction hood, a support rod, a first guide plate, a first guide rod, a first
sponge, a first stay wire, a first link, a gear, a swing rod, an elastic member, a third
sponge, a second link, an electric push rod, a second guide plate, a second guide rod, a second
sponge, a second stay wire, a cabinet body, a controller, a second
pulley, a first
pulley and an
air pump; the lower part of the right wall of the cabinet body is provided with a through hole. The controller with cleaning function in the invention has simple cleaning process, saves time and labor, has long service life, and saves large labor and financial resources.