Building Attached Photovoltaic(BAPV)is easily covered by dust,bird droppings and other stains due to exposure to outdoor environment,which seriously affects the power generation efficiency and equipment safety of photovoltaic system.In order to improve the dirt problem of photovoltaic roof system,the study designs a photovoltaic module cleaning control system based on PLC.Through the image acquisition of the UAV and the image recognition function of the computer system,as well as the communication between the upper computer and the PLC,the real-time monitoring and automatic cleaning function of the photovoltaic module is realized,which effectively improves the efficiency of photovoltaic power generation.