Exactly what i meant ......

FOR X = 1 to 10
GOSUB ledpwm
NEXT