1 week by cncdivi

Stretching

Your CNC machine needs some stretching and warmup before running hard just like any athlete…

Do you run a warm up program on your CNC machine at the beginning of your work day?

Why you need a Warm Up Program

If not, you should.  Here’s why:

  • It’ll help distribute way oil evenly and make sure the spindle bearing lubrication is also spread evenly.  This reduces friction and helps minimize wear.
  • It warms up the operating temperature of the machine and spindle.  Any friction while the lubricants are being spread around is converted into heat.  You’ll never get rid of all the friction, and so the machine generates heat throughout the day.  But it will reach a stable temperature.  As we all know, heat causes thermal expansion.   You want your machine to be at a stable temperature and not changing temperature to give it maximum repeatability.  If you adjust it for accuracy before it reaches its stable temp, it will be back out of adjustment once temps stabilize at a higher value.  A Warm Up Program just gets it to that stable temperature before you try to do any work with the machine.

Warming Up is such an important step that I baked it right into our Beginner’s Step-by-Step Guide on How to Make CNC Parts.

When you should run the Warm Up Program

It turns out, you may need to run more often than just the beginning of the day.  Think about running the Warm Up Program for the following conditions:

  • Any time the machine has been idle for more than about 4 hours.  Given how your day works out, once in the morning may cover it as there are no 4 hour idle periods once things are underway.
  • If your shop is in a cold climate and stays cold inside during the winter, you should warm up even after a much shorter lunch break.
  • If the job requires holding a really tight tolerance, considering leaving the Warm Up Program running if you take any break–bathroom, coffee break, deburring, or otherwise.  This will keep the conditions you have the machine all dialed in for relatively stable.

Haas has the following guidelines:

  • Run the spindle warmup if the spindle has not been in operation during the last 4 days.
  • Run spindle warmup if you intend to operate the spindle at high speeds immediately.

They recommend keeping a tool holder in the spindle during warm up as well.

What do Warm Up Programs Do?

OK, so you want to run a Warm Up Program, what should it do?

For starters, your CNC machine’s manufacturer may be able to provide you with a warm up program that’s tailor made and does everything needed.  If so, take advantage of it.

If you’re going to be writing your own Warm Up Program, think about how best to warm up both the spindle and the axes.

For the spindle:

  • Work through all the speed ranges, and run at each range for about 200 seconds (this is what Haas recommends).  By “all the speed ranges”, think about starting slow, say 500 rpm, and working up until you reach your spindle’s limit.  Haas’s spindle warmup routing uses 500, 1000, 2500, 5000, 7500, and 10000 rpm, for example.  Use the “S” word to set spindle rpms.
  • For high speed spindles, start at the low end of the rpm range and work up to the normal operating range, perhaps in larger rpm increments.
  • You don’t need to run at all these ranges except for the initial warm up.  Once warmed up, just leave the spindle running at its approximate operating range for your job if you need a quick warm up later in the day.  You an also run the speed range for a shorter duration since the full warm up was done early in the day.

For axis warmup, you want to move every axis through its full range of travel.  Be careful if fixtures limit travel to less than full range–you’ll have to keep your warmup to the range that’s possible without crashing into the fixture.  Like the spindle, it’s beneficial to start slow and work up to more like full speed.  I like to use feedrate programming (G01 plus “F” to set the feedrate) for that purpose.

What else?

Well, it’s probably worthwhile to cycle the toolchanger or lathe turret at least a few times, and perhaps also to turn on the coolant for a bit to make sure the pump and plumbing are primed and ready to go.

Sample Warmup Program

Let’s put together a sample Warmup Program.  You can use it as a starting point for your own warmup program if you like.  Writing programs like this is an ideal exercise for our G-Wizard Editor software, which makes it very simple to do.  I’m going to leave exercising the tool changer and coolant as an exercise for the reader to play with and just keep this simple.  The g-code dialect is Fanuc, but it should be fine for PathPilot, Mach3 and other similar dialects.

I’m going to write as a series of spindle rpm settings that call a subprogram to move the axes while the spindle warms up at the current speed. I’m also going to use some g-code variables to set up the X, Y, and Z travels.  Remember–you want to set those to your machine’s appropriate values and make sure the machine is properly homed and zeroed before running a program like this.  We don’t want any crashes!

I’ll talk through what the sample code is doing in the comments.  You can also download the program from our sample g-code page.

Note:  Don’t just download and run this program.  Make sure it is properly tailored for your machine’s travels, spindle speeds, and g-code dialect.

Sample Code

( CNC Machine Warmup Program – WWW.CNCCOOKBOOK.COM )

( Axis travel ranges. Be sure they’re right for your machine and setups! )
#100=0 (Min X Travel)
#101=18 (Max X Travel)
#102=0 (Min Y Travel)
#103=9 (Max Y Travel)
#104=0 (Min Z Travel)
#105=16 (Max Z Travel)

( Amount of dwell after axis travel. )
( Adjust so total time at each spindle rpm )
( is about 200 seconds )
#106=200

( Safe Starting Conditions )
G0 G40 G49 G50 G80 G94G17 G20 G40 G49 G54 G64 G80 G90 G98 M05

( Alternate spindle speed with axis warmup. )
( Adjust for your spindle’s speed ranges. )
G28
S500 M3
M98 P2000 (Warmup axes)
S1000
M98 P2000 (Warmup axes)
S2500
M98 P2000 (Warmup axes)
S3800
M98 P2000 (Warmup axes)
S5000
M98 P2000 (Warmup axes)

M5 G28

M30 (End of program)

O2000 (Axis warm up subprogram)
G28
F50 G01
Z#104 (Do Z first and leave Z parked high for the rest )
Z#105
X#101
Y#103
X#100
Y#102
G04 P#106
M99 (Return from subprogram)

 

 

Like what you read on CNCCookbook?

Join 100,000+ CNC'ers!  Get our latest blog posts delivered straight to your email inbox once a week for free. Plus, we’ll give you access to some great CNC reference materials including:

  • Our Big List of over 200 CNC Tips and Techniques
  • Our Free GCode Programming Basics Course
  • And more!

Just enter your name and email address below:

Full Name
Email *
100% Privacy: We will never Spam you!

Rate this post

Recently updated on March 10th, 2024 at 01:14 pm