A Few Tricks With Machining Center Canned Cycles

Last month, we discussed some tricks with turning center canned cycles. This month we’ll do the same for Fanuc machining center canned cycles.

Columns From: 10/2/2006 Modern Machine Shop,

Last month, we discussed some tricks with turning center canned cycles. This month we’ll do the same for Fanuc machining center canned cycles.

All machining center controls provide helpful hole-machining canned cycles using commands G80 through G89. The most popular commands include G80 (to cancel the cycle), G81 (for drilling), G82 (for counter-boring), G83 (for deep-hole peck-drilling) and G84 (for tapping).

Clearing obstructions in X and Y. G98 and G99 send the machine along the Z axis to clear obstructions (like clamps) between holes. Though this is fine in most cases, there might be times when it is smarter to clear the obstruction by moving around it in X and/or Y. For example, let’s say the tool must move a long way in Z to clear the obstruction, but moving around it in X/Y requires less motion. You could cancel the cycle, move to the next hole with G00, and reinstate the cycle.

However, there is an easier way. An L word in the canned cycle specifies how many holes to machine in the command. If L is left out, as it normally is, only one hole will be machined. By specifying L0 in the current command, however, you can ensure that no holes will be machined and still clear the obstruction. Consider these commands:

N095 T04 M06 (Place center drill in spindle)
N100 G54 G90 G00 X4.0 Y3.0 S500 M03 (Move to first hole location, start spindle)
N105 G43 H04 Z0.1 M08 (Instate tool length compensation, turn on coolant)
N110 G81 R-3.9 Z-4.15 F3.0 G99 (Center drill first hole)
N115 Y5.0 L0 (Clear obstruction in Y, no hole is machined)
N120 X8.0 L0 (Clear obstruction in X, no hole is machined)
N125 Y3.0 (Machine second hole)
N130 G80 (Cancel cycle)

Why are two holes getting machined in the same location? Skipping lines can often make programs easier to read, especially at tool changes. Once you’ve instated a canned cycle, however, you must not place blank lines in the program. Remember that canned cycles are modal—a hole will be machined in every command, and the machine will interpret a blank line as a command.

Consider the following commands. Note that I’ve included the end-of-block character (the semicolon with Fanuc controls).

N085 G90 G28 Z0 M19; (Return to tool change position, orient spindle)
N090 M01; (Optional stop)
; (Blank line for clarification at tool changes – this is just fine)
N095 T04 M06; (Place center drill in spindle)
N100 G54 G90 G00 X1.0 Y1.0 S500 M03; (Move to first hole location, start spindle)
N105 G43 H04 Z0.1 M08; (In-state tool length compensation, turn on coolant)
N110 G81 R0.1 Z-0.15 F3.0 G99; (Center drill first hole)
N115 Y2.0; (Second hole)
N120 Y3.0; (Third hole)
; (Blank line – the third hole will be machined again!)
N125 Y4.0; (Machine fourth hole)
N130 G80; (Cancel cycle)

Another trick with L0. Some programmers like to include hole-machining coordinates in subprograms. This is helpful when there are a lot of holes and when each hole requires several machining operations (like center drill, drill and tap). Consider these commands:

N095 T04 M06 (Place center drill in spindle)
N100 G54 G90 G00 X1.0 Y1.0 S500 M03 (Move to first hole location, start spindle)
N105 G43 H04 Z0.1 M08 (Instate tool length compensation, turn on coolant)
N110 G81 R0.1 Z-0.15 F3.0 G99 L0 (Specify how the holes will be machined but don’t machine a hole)
N115 M98 P1000 (Execute subprogram that contains all hole locations)

Machine equally spaced holes in the incremental mode. Most programming is done in the absolute mode (G90). For canned cycles, this requires one command per hole. However, in the incremental mode and with the L word, you can machine any number of holes in one command. To do so, you must understand what happens to X, Y, R and Z in canned cycle commands in the incremental mode.

X and Y become the distance from the tool’s current position to the hole to be machined. R becomes the distance from the current tool position in Z to the rapid plane. Z becomes the distance from the R plane to the hole bottom (Z will always be negative, and if the R plane is 0.1 inch above the work surface, Z’s value will always be equal to the hole depth plus 0.1 inch). To keep things simple, you can even machine the first hole in the absolute mode and switch to the incremental mode for the balance of holes.

Consider these commands. Note that 50 equally spaced holes (0.5 inches apart along X) are being machined by two commands:

N095 T04 M06 (Place center drill in spindle)
N100 G54 G90 G00 X1.0 Y1.0 S500 M03 (Move to first hole location, start spindle)
N105 G43 H04 Z0.1 M08 (Instate tool length compensation, turn on coolant)
N110 G81 R0.1 Z-0.15 F3.0 G99 (Center drill first hole in absolute mode)
N115 G91 X0.5 L49 (Center drill 49 more equally spaced holes 0.5 apart along X)
N120 G80 (Cancel cycle)

Comments are reviewed by moderators before they appear to ensure they meet Modern Machine Shop’s submission guidelines.
blog comments powered by Disqus
MMS ONLINE
Channel Partners
  • Techspex