The invention relates to a roof 
wind driven generator with a windproof function. The roof 
wind driven generator comprises a supporting column, a 
fan blade mechanism, a gearbox, a low-speed rotating shaft, an 
electricity generation mechanism, a PLC, a waterproof bucket and a lifting mechanism. The 
fan blade mechanism comprises fan blades, a high-speed rotating shaft, an 
encoder and a telescopic 
assembly. The telescopic 
assembly comprises a fixing block, a motor, a lead screw and a walking rod. The lifting mechanism comprises a lifting block, a hydraulic box, a hydraulic groove and a pump body. According to the roof 
wind driven generator with the windproof function, the design structure is ingenious, practicability is high, and the 
encoder detects the rotating frequency of the high-speed rotating shaft when 
wind power is too high; when the rotating frequency is too large, the distance between every two adjacent fan blades is reduced through the PLC under the assistance of the telescopic mechanism, so that the sectional area for wind is reduced, the speed of the fan blades is reduced, and the problem that equipment is damaged due to the too large rotating frequency is avoided; and when the rotating frequency is still too large, at the moment, 
wind power is quite large, the fan blades are moved by the lifting mechanism into the windproof bucket, and the roof wind driven generator with the windproof function is prevented from being broken by high wind.