Breaking fets

eliasojala1234:
Yes I used DC. But why can't 17A 70W fet handle one halogen which is only 50W? And I want to dim the lights with pwm if it's possible.

The answer to that is in the datasheet. It can only flow 17A if you can keep the temperature at 25C. You have to derate that as the temperature goes up. Once it gets to about 160C, it is only rated for 5A. If you used a good heatsink, you wouldn't have any problems, but the IRL540 will dissipate less than half the power the IRL530 does at the same drain current.