Hello everyone, I finally managed to set the spindle speed also from Gcode and I briefly list the steps.

I use LinuxCNC and these are the settings working with Stepconf:
pin 1 = PWM spindle, invert popped
pin 2 to 9 = 4 axes (XYZA)
pins 14 and 16 unused
pin 17 = Amplifier Enable
pin 10 = Estop In
pin 11 = probe
pin 12/13/15 = limit switch sensors

Spindle configuration
PWM Rate = 100
Speed1 = 0
Speed2 = 24000
PWM1 = 0
PWM2 = 1

I do not know if everything is set as originally, but after almost 2 years of hard work is back to work ****** ALL BIG !!!