Spindle ramp-up speeds for 3018 20k spindle

I’ve upgraded to the 20K spindle for my 3018 and have the upgraded power supp;y as well.
I would still like to use the ramp-up spindle settings as I don’t like the jerk I get when the spindle starts (I’m running $30=16000).
Trouble is that even though SainSmart lists the code to use, they don’t tell me how to put it into grbl. Whenever I try, using Candle or UGS I get an error message.
Here’s the recommended code:
$30=S4000
M3
G4 P.25
S6000
M3
G4 P.25
S8000
M3
G4 P.25
S10000
M3
Does anyone know what I’m doing wrong? Please use small words as I’m just learning this stuff.
Thx,
Bill P

This is your max spindle rpm. It can’t have an S in it.

Every website shows the S.
And if I don’t put it in the speed setting in Grbl doesn’t change.
Or do you mean no S after the first $30?

should read $30=4000. No S
Pete

This ahould not include the $30 at all for the ramp up code.

Delete $30= and save it as a macro so you can get the spindle up yo speed before stsrting the file and it will ramp the spindle from stopped up to 10,000 rpm

As a seperate line of code you should set $30 to 20000 by sending this command in the console section:
$30=20000

This code needs sent only once thogh, not at the start of each carve… and this changes your spindle max rpm from 10,000 to 20,000 kinda…