Jump to content

Welcome to eMastercam

Register now to participate in the forums, access the download area, buy Mastercam training materials, post processors and more. This message will be removed once you have signed in.

Use your display name or email address to sign in:

Haas - Machine Stroke Macro - Fully warm up your machine!


Colin Gilchrist
 Share

Recommended Posts

Hey Everyone,

I was playing around with breaking in a new Haas VF-4SS, and made just a few modifications to the Spindle Warm-Up Program. To be clear, this isn't a "spindle break-in program"; it is used to "fully warm-up the machine", after it has been sitting for a while.

This program should take anywhere from 10-30 minutes to run, depending on how you have the setup configured.

I added a few features that I thought would be useful to 80% of users, out-of-the-box.

Feel free to use, modify, or distribute this Macro; but use it at your own risk!

Selway Machine Tool Company is not responsible for any damage that should occur as a result of you using this Macro. This Macro causes Machine Motion, which is the whole purpose of it, but that cause a collision on your machine, if you aren't careful.

No Warranty is expressed, or implied, if you choose to use this code.

-----------

Ok, legal disclaimer out of the way, what does the Macro do, and How do you use it?

What it does

This Macro Program is designed to be run in 3 phases:

  1. Positions to 'safe start' location, and warms up the spindle by commanding Forward and Reverse alternately, through the RPM range, up to about 6,000 RPM. Then it ramps up to 12,000 RPM, and then "ramps down in reverse" (M04). This is the "initial spindle warm-up". It takes about 3 minutes, 10 seconds to complete.
  2. The machine then moves to the "home position" (controlled by variables, and user-defined). This is in "Machine Coordinates", and No Tool-Length-Compensation is used, so be careful! Once at the "home position", we turn on the Spindle at the "start RPM". We then "stroke the machine" in XY, and then in -Z. At the bottom, we increase the spindle speed by the Spindle Increment (default is 500 rpm). The "stroke to the endpoint", is done at "high feed" (variable). The "return stroke" is done in reverse, at the "slow speed". At each point (Start/End), the RPM increases, until we hit the "max RPM". That RPM increment is what breaks the "WHILE/DO/END" Loop.
  3. After we have "fast stroked/slow returned", the process is reversed. The machine follows the same "positions and strokes", but goes "slow stroked / fast returned".

Each of the "stroke cycles" takes about 6 minutes, on a VF-4SS, with 500 RPM as the "increment", 800 IPM as the "fast feed", and 200 IPM as the "slow feed".

So, roughly 18 minutes to do a "full warm-up".

But what does this get you?

  • A fully warm, and lubricated spindle.
  • A fully warm, and lubricated set of Linear Axes.
  • At the end of the Macro, the program sets the "S" value to a "safe RPM". (Default 80 RPM) It also sets Spindle Direction to CW (M03), and orients the spindle at the end of the cycle.

How do you use it?

There are Machine Variables at the top of the Macro, which control the following:

  • Make sure you load a Short and Balanced Tool Holder. Gauge Length should be kept to a minimum. (I used a 2.5" OAL Holder for this test.)
  • #10301 through #10303, control the XYZ Home Position. Typically, all three are 0.0, however, on a machine where there is added travel "above the Z Zero Point", you could have something like #10303=4.0.
  • #10304, #10305, and #10306 control the "XYZ Stroke Position". This is the "endpoint" in Machine Coordinates, of each Axis. WARNING: Make sure you adjust all three of these numbers, if your machine is not a VF-4!!! BE VERY CAREFUL WITH THE -Z STROKE! This Macro does not use Tool Length Compensation. We are driving the "gauge point" of the spindle, not the Tool Tip.
  • At the end of the cycle, there is a "Park Position". This is #10324, #10325, and #10326. This is the final place where the machine stops after warming up.
  • It is possible to change either the "XYZ Start" position, or the "XYZ Park Position" to use any of your Work Offsets. BUT BE CAREFUL!
  • For example, consider if we set XY Park to #10324=#5221, and #10325=#5225, but set Z as follows: #10324=#10303. This would put us at G54 XY, but "Machine Zero" for the Z Position.

Feel free to experiment and modify this Macro to suit your own needs, but I highly recommend the following:

  • Run the program through in Graphics Mode 1st, before running it on the control.
  • Turn down the Feed and Rapid Overrides, until the machine has cycled through a complete "stroke" of XYZ. The cycle is designed to -Go Home, -Stroke XY, -Stroke Z, -Return Z, -Return XY. Once you have completed a cycle, and you see the WHILE/DO Loop is "incrementing the Spindle Speed", you should be safe to set Rapid and Feed to 100%. Just remember you're still responsible for operating the machine safely.
  • Make sure you check for clearance, and that all "Park, Stroke, Home, Feed, and Spindle values, are set appropriately for your machine.
  • If you only have an 8,100 RPM Spindle: Remove from N222 - to - N233. (cut out of NC Program)

 

Here you go:

%
O02222 (WARM-UP-SPINDLE-AND-XYZ-AXES)
(MACRO DEVELOPED FOR NGC HAAS MACHINES)
(BY SELWAY MACHINE TOOL COMPANY)
(CREATED BY: COLIN GILCHRIST, SELWAY AE)
(CREATED ON: 01/08/2020. 01:28 PM)
(***********************************)
(WARNING: YOU MUST CHECK FOR MACHINE CLEARANCE)
(BEFORE RUNNING THIS PROGRAM)
(THE PROGRAM IS DESIGNED TO "STROKE" THE MACHINE)
(XY AXES, AND THE Z-AXIS, ON SEPARATE LINES)
(VARIABLES ARE USED TO CONTROL EACH AXIS STROKE)
(WE RECOMMEND STOPPING ABOUT .400 FROM THE STROKE LIMIT)
(THE MACHINE STROKES IN "BOTH DIRECTIONS")
(, WITH A COMBINATION OF RAPID AND FEED)
(***********************************)
(NOTE: FOR CLASSIC HAAS CONTROL:)
(      YOU MUST CHANGE VARIABLE NUMBERS)
(      #10300 = #500, #10301 = #501, ETC.)
(***********************************)
N100 (MAIN START BLOCK)
(YOU MUST USE NEGATIVE XYZ POSITION VALUES!)
(#10301=X-HOME,#10302=Y-HOME,#10303=Z-HOME)
#10301=0.
#10302=0.
#10303=0.
(#10304=X-STROKE,#10305=Y-STROKE,#10306=Z-STROKE)
#10304=-49.5
#10305=-19.5
#10306=-24.
(#10307=SPIND/INC,#10308=SPIND/MAX,#10309=FEED/MAX)
#10307=500.
#10308=12000.
#10309=800.
(VARS FOR RETURN)
(#10310=SLOW/FEED,#10311=SPIND/START,#10312=SAFE/RPM)
(NOTE: PROGRAM SETS FINAL RPM TO #10312 FOR SAFETY)
#10310= 200. 
#10311=#10307
#10312=80.
(XYZ PARK POSITIONS AT START OF WARM UP)
(NOTE: CHANGE TO #5221-#5226, FOR G54 XYZABC)
(#10324=#5221)
(#10325=#5222)
(#10326=#5223)
(NOTE: CHANGE TO #5241-#5246, FOR G55 XYZABC)
(#10324=#5241)
(#10325=#5242)
(#10326=#5243)
#10321=-25. (X-START)
#10322=-1.  (Y-START)
#10323=-4.  (Z-START)
#10324=-25. (X-PARK)
#10325=-1.  (Y-PARK)
#10326=-4.  (Z-PARK)
(SAFETY LINES)
G00 G17 G20 G40 G80 G90 G94 G98
G187 P1 E.04
G00 G90 G53 G49 Z#10303 (1ST - CLEAR Z, CANCEL TLO)
G00 G90 G53 X#10301 Y#10302 (GO XY HOME)
(PARK THE MACHINE FOR INITIAL/FINAL POSITION)
G01 G90 G53 Z#10321 F #10309 (FAST Z START)
S#10312 M03 (SAFE SPINDLE AND DIRECTION)
G01 G90 G53 X#10321 Y#10322 F #10309 (FAST XY START)
N200 (QUICK SPINDLE WARM-UP)
S222 M03
G04 P8.
S333 M03
G04 P8.
S345 M03
G04 P8.
S444 M03
G04 P8.
S555 M03
G04 P8.
S678 M03
G04 P8.
S777 M03
G04 P8.
S888 M03
G04 P8.
S999 M03
G04 P8.
S1234 M03
G04 P8.
S1800 M03
G04 P8.
S3600 M03
G04 P8.
S4444 M03
G04 P8.
S5555 M03
G04 P8.
S7777 M03
G04 P8.
S8100 M03
G04 P8.
N222 S8888 M03
G04 P8.
S9999 M03
G04 P8.
S10234 M03
G04 P4.
S11111 M03
G04 P4.
S11789 M03
G04 P4.
S12000 M03
G04 P4.
M05
G04 P4.
S10000 M04
N233 G04 P4.
S8000 M04
G04 P4.
S6000 M04
G04 P4.
S4000 M04
G04 P4.
S2000 M04
G04 P4.
S1000 M04
G04 P4.
S500 M04
G04 P4.
M05
G04 P4.
S250 M03
G04 P4.
M05
N300
(SAFETY LINES)
G00 G17 G20 G40 G80 G90 G94 G98
G00 G90 G53 G49 Z#10303 (1ST - CLEAR Z, CANCEL TLO)
G00 G90 G53 X#10301 Y#10302 (GO XY HOME)
(PARK THE MACHINE FOR INITIAL/FINAL POSITION)
G01 G90 G53 Z#10323 F #10309 (FAST Z START)
S#10312 M03 (SAFE SPINDLE AND DIRECTION)
G01 G90 G53 X#10321 Y#10322 F #10309 (FAST XY START)
N400 (STROKE XY, THEN Z)
(NEGATIVE STROKE IS FAST)
(HOME STROKE IS SLOW)
(SET VAR AT START)
#10311=#10307
G00 G90 G53 G49 Z#10303 (1ST - CLEAR Z, CANCEL TLO)
G00 G90 G53 X#10301 Y#10302 (GO XY HOME)
WHILE[#11LT#10308]DO1
S#10311 M03 (START SPINDLE)
G01 G90 G53 X#10304 Y#10305 F#10309 (FEED FAST TO XY -STROKE)
G01 G90 G53 Z#10306 F#10309 (FEED FAST TO Z -STROKE)
#10311=#10311+#10307 (INC SPEED)
S#10311 M03 (START SPINDLE)
G01 G90 G53 Z#10303 F#10310 (SLOW FEED TO Z HOME)
G01 G90 G53 X#10301 Y#10302 F#10310 (SLOW FEED TO XY HOME)
#10311=#10311+#10307 (INC SPEED)
END1
(WE NOW RUN THE SAME STROKE CYCLE, WITH REVERSED FEEDS)
(AND REVERSED SPINDLE DIRECTION)
N500 (STROKE XY, THEN Z)
(HOME STROKE IS FAST)
(NEG STROKE IS SLOW)
(SET VAR AT START)
#10311=#10307
G00 G90 G53 G49 Z#10303 (1ST - CLEAR Z, CANCEL TLO)
G00 G90 G53 X#10301 Y#10302 (GO XY HOME)
WHILE[#11LT#10308]DO1
S#10311 M04 (START SPINDLE)
G01 G90 G53 X#10304 Y#10305 F#10310 (SLOW FAST TO XY -STROKE)
G01 G90 G53 Z#10306 F#10310 (SLOW TO Z -STROKE)
#10311=#10311+#10307 (INC SPEED)
S#10311 M04 (START SPINDLE)
G01 G90 G53 Z#10303 F#10309 (FAST FEED TO Z HOME)
G01 G90 G53 X#10301 Y#10302 F#10309 (FAST FEED TO XY HOME)
#10311=#10311+#10307 (INC SPEED)
END1
N999 (PROGRAM END)
G187 P1 E.04
G00 G90 G53 G49 Z#10303 (1ST - CLEAR Z, CANCEL TLO)
G00 G90 G53 X#10301 Y#10302 (GO XY HOME)
G01 G90 G53 Z#10326 F#10309 (FAST Z PARK)
S#10312 M03 (SAFE SPINDLE AND DIRECTION)
G01 G90 G53 X#10324 Y#10325 F#10310 M05 (SLOW XY PARK)
M19 (ORIENT SPINDLE)
G187
M30
%

 

 

 

  • Like 5
Link to comment
Share on other sites
3 hours ago, Newbeeee™ said:

Colin - very interesting ref the M04? I've never come across (or read) any MTB warming a spindle in both directions? Is this unusual? Any data available that says it's better?

:cheers:

I've got no data other than a hunch. I just figured running through both CW and CCW should let you hear any difference between the dynamic loading in each direction. And I figured it might help even out the load path on the bearing races. 

  • Like 1
Link to comment
Share on other sites
3 minutes ago, content creator said:

Is this still macro B in haas or haas has their own language please?

It is basically Macro B. The variables are using the Next Generation Control ranges, but you could replace the #10,000 series variables with #500's, and it will run on a Classic Haas Control, or any other Fanuc Control, provided you have the Macro capability. 

One easy way to tell is "do you have Probing" on the machine? Machines with Probing have Macro capabilities for sure.

Link to comment
Share on other sites
8 minutes ago, Colin Gilchrist said:

It is basically Macro B. The variables are using the Next Generation Control ranges, but you could replace the #10,000 series variables with #500's, and it will run on a Classic Haas Control, or any other Fanuc Control, provided you have the Macro capability. 

One easy way to tell is "do you have Probing" on the machine? Machines with Probing have Macro capabilities for sure.

Thank you.

Link to comment
Share on other sites

What are the benefits of running something like this? Does it help the longevity of the machine or does it help parts with repeat-ability since things get warmed up? Isn't the standard warm-up that comes loaded on the controller good enough? I am just curious not trying to bash your efforts since it looks like a lot of work went into this and i have never seen anything like it.

Link to comment
Share on other sites
7 hours ago, JoshC said:

What are the benefits of running something like this? Does it help the longevity of the machine or does it help parts with repeat-ability since things get warmed up? Isn't the standard warm-up that comes loaded on the controller good enough? I am just curious not trying to bash your efforts since it looks like a lot of work went into this and i have never seen anything like it.

A normal "warmup program" typically just warms up the spindle. But adding 'stroking of the linear axes', warms them up as well. In addition to generating and distributing heat through the guideways and ball-screws. It also ensures those guideways and ball-screws are well lubricated.

I typically see a change of .0001-.0002, when performing Calibration of a Tool Probe, between a cold and a warm machine. When calibrating a Spindle Probe, it is about a .00008-.00015 difference in measured diameter.  (I notice a slightly greater difference in the Z-Axis, regarding thermal effects.)

This will also depend on your shop's temperature. If your machines are kept in a temperature controlled building, that doesn't see a temperature swing during the night, then simply warming up the spindle is probably adequate.

What kind of parts are you tasked with making? Some people are chasing tenths - while ohers are cutting wood, eyeballing work offsets, and touching off tools with a scrap of paper.

 

As far as the work goes, that was maybe 45 minutes of work to write the code, and an hour testing it across two machines that I'm preparing for an upcoming class. I also tested the code on a DM-2 machine, and simply tweaked the variables at the top. I set the RPM increment to 250., the max RPM to 15,000., and the Slow Feed to 300. It took close to 22 minutes to run the program complete, due to the increased number of strokes.

I just like sharing tips and tricks; especially when it comes to using Macros.

  • Like 4
Link to comment
Share on other sites
5 hours ago, Leon82 said:

We do a spindle and axis warmup on all our machines.

One of our parts that has close profile tolerances we set a 5 min dwell and m99 so it always runs without a part in the fixture. During lunch, break, and waiting for QC. It works pretty good

Warm machines make the most accurate parts. I love the idea of keeping the machine warm during any non-cutting time. 

  • Like 2
Link to comment
Share on other sites
8 hours ago, Colin Gilchrist said:

A normal "warmup program" typically just warms up the spindle. But adding 'stroking of the linear axes', warms them up as well. In addition to generating and distributing heat through the guideways and ball-screws. It also ensures those guideways and ball-screws are well lubricated.

I typically see a change of .0001-.0002, when performing Calibration of a Tool Probe, between a cold and a warm machine. When calibrating a Spindle Probe, it is about a .00008-.00015 difference in measured diameter.  (I notice a slightly greater difference in the Z-Axis, regarding thermal effects.)

This will also depend on your shop's temperature. If your machines are kept in a temperature controlled building, that doesn't see a temperature swing during the night, then simply warming up the spindle is probably adequate.

What kind of parts are you tasked with making? Some people are chasing tenths - while ohers are cutting wood, eyeballing work offsets, and touching off tools with a scrap of paper.

 

As far as the work goes, that was maybe 45 minutes of work to write the code, and an hour testing it across two machines that I'm preparing for an upcoming class. I also tested the code on a DM-2 machine, and simply tweaked the variables at the top. I set the RPM increment to 250., the max RPM to 15,000., and the Slow Feed to 300. It took close to 22 minutes to run the program complete, due to the increased number of strokes.

I just like sharing tips and tricks; especially when it comes to using Macros.

that makes perfect sense, thanks for the explanation.

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.

Join us!

eMastercam - your online source for all things Mastercam.

Together, we are the strongest Mastercam community on the web with over 56,000 members, and our online store offers a wide selection of training materials for all applications and skill levels.

Follow us

×
×
  • Create New...