Code. I am a Bad Student; or, Monkey See Monkey Do will not Do Do Dooo!

Over at YouTube University, I found this routine for spindle warmup:

(Spindle Warm-up) ;
(Run this program before machining) ;
T01 M06
S500 M03
G04 X100
S1000 M03
G04 X100
S2500 M03
G04 X100
S5000 M03
G04 X100
S7500 M03
G04 X100
S10000 M03
G04 X100
M30

Igor, my Journeyman, pays no mind to these commands and just sits there doing nothing. I did go into Igor’s controls and set the spindle minimum to 500RPM. No difference. I also tried entering just a portion of the script and Igor spun up to 500 and stayed there rather than dwelling at 500 and them moving up to 1000. I had to stop the spindle manually after it became clear that the script was not functioning correctly:

S500 M03
G04 X100
S1000 M03
G04 X100
M30

What am I missing?

Jim

Hey Jim,

“X” is not a valid address for G04 (Dwell) in the LinuxCNC and the Buildbotics G-code dialects. Try ‘G04 P100’ instead. Note that unlike historic CNC machines, LinuxCNC and Buildbotics assume the P value to be in seconds, not milliseconds.

Please be aware that running under 6,000 rpm is not recommended, especially on air-cooled, 24,000 rpm spindles (says my spindle manual)

See also

Spindle Warm-up Program

1 Like

Hey Jim,

I also ran both of your code examples. The Onefinity Controller always jumps to the line before the last line. Weird. But an explanation would be: It seems that the Onefinity Controller jumps immediately to the last line that contains a “G04 X…” that it considers as a syntax error, which is the line before the last line. So all your script does is M30 (program end).

After “search and replace” the “G04 X” with “G04 P”, your script works correctly.

2 Likes

Thanks, Aiph5u!

My understanding is that the warmup is designed to get the grease to travel through the entirety of all the bearings before the spindle is subjected to load, where heat becomes a problem with air-cooled because the fan can’t keep up. I’ve run the spindle through each of these RPM and noted little heat on the casing of the spindle. I’m going to go read the link you’ve provided. I hope all is well for you.

Jim

By the way - I wish I’d have had a T Shirt that had “M30” printed on it when I was in high school. When the teacher asked if I’d finished my homework, I’d have pointed at the “M30.”

2 Likes

Hey Jim,

it’s just what my spindle manufacturer wrote into the manual. I always tend to follow the manufacturer because in case of failures I can tell them I did :slight_smile:. Thanks, hope all is well with you too, Jim!

1 Like