Narrative:

Air interrupt. After takeoff at 3000 ft, right generator began cycling on and off. Cycling continued until power was reduced. A smell with an electrical odor was present. Odor disappeared after cycling stopped. An emergency was declared. Returned to land at dfw. Landing was normal and not overweight.

Google
 

Original NASA ASRS Text

Title: MD80 CREW HAD #2 GENERATOR FAIL, AND HAD ELECTRICAL ODOR IN THE COCKPIT. RETURNED TO LAND.

Narrative: AIR INTERRUPT. AFTER TKOF AT 3000 FT, R GENERATOR BEGAN CYCLING ON AND OFF. CYCLING CONTINUED UNTIL PWR WAS REDUCED. A SMELL WITH AN ELECTRICAL ODOR WAS PRESENT. ODOR DISAPPEARED AFTER CYCLING STOPPED. AN EMER WAS DECLARED. RETURNED TO LAND AT DFW. LNDG WAS NORMAL AND NOT OVERWT.

Data retrieved from NASA's ASRS site as of July 2007 and automatically converted to unabbreviated mixed upper/lowercase text. This report is for informational purposes with no guarantee of accuracy. See NASA's ASRS site for official report.