Presentation on theme: "CANNED CYCLES AND SUBROUTINES"— Presentation transcript:
1CANNED CYCLES AND SUBROUTINES Chapter 2CANNED CYCLES AND SUBROUTINES
2CANNED CYCLES"Canned" ?The word "canned" has probably been borrowed from canned goods, which one usually stores away for later use.
3CANNED CYCLES"Cycle" ?Because the instructions represented a set of routine like repetitive patterns.
4Canned cycles & G-code address These canned cycles are filed away under a standardized G-code addressG84G81G82G83G76G85G86
5Types of canned cycles1-Milling and Drilling Canned cycles2- Turning Canned cycles
6Usually, in one tape block, the canned cycle will control all or most of the following motions: • Positioning the tool in the X-Y plane• Rapid motion to the "R" level, Rapid Down To• Controlled feed motion to the "Z" level,• Commanded motions at "Z" level, such as dwell, spindle stop, spindle reverse, spindle orientation, spindle lateral shift, etc.,• Rapid or feed return to "R" level, as applicable, and• Rapid return to INITIAL level.
7Tapping canned cyclesConsist of the following steps:Clockwise rotating of the tap at the correct rpm• Rapid advancing of the tap to (R-level)- Rapid Down To• Feeding the rotating tap to a set depth at a rate of one thread pitch per revolution (or mm/rev, or in in. /rev.)• Reversing both feed and spindle rotationFeeding the rotating tap until the tap reaches the R-Level• Returning spindle rotation to its original clockwise directionThe spindle is now ready to rapidly return "home" for a tool change, relocate to another position or carry out any other instruction of the program.Similar motion patterns are available for drilling, boring, turning, threading, etc.
10General format of the fixed Milling canned cycle is the following: N G G X Y Z R Q P F LN is the sequence number of the blockG is the respective canned cycle (e.g., G81, G84, G73, G76, etc.)The second G may be G98 or G99.G98 will return the tool point to the initial level. ( Save Rapid Level)G99 will return the tool point to R level;X and Y are the coordinates of the location to be machined
11Z is the level attained by the tool in feed mode R is the level reached by the tool at the end of its rapid motionQ is the depth of cut in feed in peck drillingP is the dwell in spot facing or boring operationsF is the feedL is the number of repeats, if applicable
12The following observations apply to canned cycles for machining centers in general: • The tool motion starts in canned cycle from an Initial Level.• The tool will move in Rapid mode to the programmed X-Y location• The quill will move in Rapid mode to the R (for Rapid) Level.The tool will feed to the Z-Level,Z-Level is measured from Initial in absolute mode (G90)Z-Level is measured from R in incremental mode (G91).
13Three levels of tool position in any canned cycle: • The Initial level, which is the specific position of the tool at the moment the canned cycle becomes effective,• The "R" for Rapid level, which is the end of the rapid quill motion, usually to inches (0.5 to 2.5 mm) from the part surface, and• The "Z" level which is the end of the feed (metal cutting) motion.
14•If the tool is already on location, there is no need to program X andY. • A canned cycle is in effect until canceled (or replaced by another canned cycle). Accordingly, subsequent locations can be machined by simply programming X and Y in subsequent blocks.If you do not intend to perform the canned cycle at the next location, you must cancel it first (G80).
15Z-Level is measured from Initial- Level in absolute mode (G90) Z-Level is measured from R- Level in incremental mode (G91).AbsoluteIncremental
16• Cutter Compensation ..................No. Since X-Y motions are strictly for positioning and the programmed machining patterns take place in the Z-axis, no canned cycles are to be used in cutter diameter compensation mode.•Canned Cycles for all systems are standard No.Most systems provide numerous canned cycles as standard equipment, but not all systems use the same codes to designate the same cycles. Always use the codes provided by your system manual.
17Drilling Canned Cycle G81: G81 Is a canned cycle for drilling holes in a single drill stroke. Its motion is rapid motion to R plane, feed down (into the hole) and rapid up (out of the hole) to the R level or to the initial Z level (Zinitial)G81 Xn Yn Zn Rn Fn
18Counter boring or countersinking holes cycle G82: G82 Xn Yn Zn Rn Fn PnIts action is similar to G81, except that it has a timed dwell at the bottom of the Z-stroke.Will spot face, bore, or counter bore. The canned cycle will perform as follows:Rapid to "R" ,Feed to "Z,"Dwell at "Z" for a duration given by "P"Rapid return to "R" or Initial depending on whether G99 or G98 was called in the program.One second is P100 and 3 seconds are P300,
19Counter boring or countersinking holes cycle G82: G82 Xn Yn Zn Rn Fn PnRapid to "R" ,Feed to "Z,"Dwell at "Z" for a duration given by "P"Rapid return to "R" or Initial depending on whether G99 or G98 was called in the program.One second is P100 and 3 seconds are P300,
20Deep drilling canned cycle G83 : Hole depth > 3 times the drill's diameter.Prevent chips from packing in the drill's flutes, resulting in drill breakage.G83 Xn Yn Zn Qn Rn Fn
21Deep drilling canned cycle G83 : Drill in at feed rate a small distance (called the peck نقر increment) and then retract at rapid travel.Then the drill advances at rapid travel back down to its previous depth, feeds in another peck increment, and rapids back out again.Then it rapids back in, feeds in another peck increment, etc., until the final Z-depth is achieved.G83 Xn Yn Zn Qn Rn Fn
23G83 will:G83 Xn Yn Zn Qn Rn FnRapid to X-Y location and to "R" level,Feed by the amount "Q"Rapid return to "R"Rapid in by "Q-d,"Feed "Q" from there,Rapid return to "R" thus removing the swarf from the part,Rapid in by "2Q-2d"Rapid return to "R" etc.
24The G84The programmed feed must be fully synchronized with the spindle speed Before starting the tapping portion of the program, we have to set tapping speeds and calculate tapping feeds.
25G84 Is a canned cycle for tapping. It coordinates the spindle's rotary motion to the Z-axis motion for feeding the tap into and out of the hole without breaking off the tap.G84 Xn Yn Zn Rn FnG81 Xn Yn Zn Rn Fn
26G84 Xn Yn Zn Rn FnThe G84 canned cycle will perform the tapping of one or more holes as follows:Rapid to "R" level,Feed to "Z-" level,Reverse direction of rotation at "Z-" level,Feed up to "R" level,Reverse direction of rotation to original direction.
27Suppose the tapping speed has been selected to be 100 rpm (S100), What is the tapping feed (ipm) for 3/8 "-16 ?1. Calculate the pitch in inch: Sixteen tpi represent a pitch of 1/16 or inch.2-Find the feed per rev:Feed / rev = Pitch in inches = inch/ rev.3- Calculate the feed per minuteFeed per minute = feed per rev * Speed (rpm)100 x = 6.25 ipm, ( F6.25 )Short Formula:Divide the selected speed by the number of tpi.Therefore, 100/16 = 6.25 and we program F6.25.
28Using an "inch" tap in a metric program Multiplying 6.25 ipm by the factor 25.4 = F mm/min.
29Metric threads in a metric program M 6 x l , Using 125 rpm F mm/min.?We just multiply the pitch by the selected rpmFeed will be 1 X 125 = 125F125.
30Metric threads in an inch program F125 mm/min = inc/min.We simply divide the feed obtained by 25.4.Hence, 125 (mm/min) / 25.4 will be programmed as F ipm
31Fine boring canned cycle G76 G Xn Yn Zn Rn Q n Fn1- Rapid to "R" (point A).2- Feed to "Z" (point B),3- Spindle stop4- Orient, shift the tool point by the programmed amount Q away from the hole wall,5- Rapid return to "R" or Initial as programmed6-Restart of spindle.
37سؤال:How many ridges will be remains on the hole after executing the above CNC program (600 rpm, F inch/min) ?الاجابة:At 600 rpm, F inch/min will ensure 800 tool marks or ridges in 1 inch of bored surface. How?Feed per rev = ÷ = inch per rev = Ridge ThicknessNumber of Ridges in 1 inch = 1 ÷ = 800
38How to produce finer surface ( Increase Number of Ridges) الاجابة: سؤال:How to produce finer surface ( Increase Number of Ridges)الاجابة:Feed per rev = Feed per min ÷ Speed= inch per rev = Ridge ThicknessNumber of Ridges in 1 inch = 1 ÷ Ridge Thickness =Should a finer surface be required, we can increase S, reduce F, or both. In a production situation, a carbide-tipped boring tool could run at speeds to 3,000 rpm and feeds to 3.5 ipm.
39Canned cycle cancellation G80 G80 deactivates (cancels) any of the G80-series canned Z-axis cycles.Each of these canned cycles is modal. Once put in effect, a hole will be drilled, bored, or tapped, each time the spindle is moved to a new location.This code is normally used in three situations:
401-When different programs are run consecutively on the same machine, it issued before the first motion statement, in conjunction with other codes as a safety feature, to cancel potential leftover canned cycles from a previous program. On some controls, a previously used canned cycle may remain active even if the control is reset or the power is turned off.N0010 G20 G40 G80 G49 G91 G00
412-When a canned cycle is canceled, as it should be, as soon as it is no longer needed in the program.N0040 G803-When it is required to reposition the spindle without any machining taking place at that location (such as an intermediary position in a change of direction).N0090 G80 X3.0 Y4.5
53Longitudinal turning cycle G84 Turning Canned cyclesLongitudinal turning cycle G84A G0 command is used to bring the tip of the tool to starting position S.
54The G84 command will make the tool move in a series of rectangular paths cutting material axially until the tool tip reaches target point K where the cycle ends.Cutting movements will be at the cutting feed rate. All other movements will be at rapid traverse rate.
55N Block NumberG84 Longitudinal Turning CycleX,Z Absolute, Incremental Coordinates of the contour joint point KPo Taper dimension in X DirectionP2 Taper dimension in Z DirectionDo Allowance in XD2 Allowance in ZD3 Cut divisionF Feed
56N Block NumberG85 Threading CycleX,Z Absolute, Incremental Coordinates of the thread end point K or NP2 Thread run outD3 Depth or Number ( From Table)D4 Number of no load cuts to cleanD5 Angle of threadD6 Total thread depthD7 Identification number (from table)F Feed
59Plunge – cut cycle G86A G0 command brings the right-hand corner of the tool to starting position P. The G86 command will make the tool move forward, back and left repeatedly to cut the groove. The movements continue until the left-hand corner of the tool tip reaches target point K where the cycle ends.
60N Block NumberG86 Plung Cut CycleX,Z Absolute, Incremental Coordinates of the contour joint point KD3 Feed per Cut ( feed /rev)D4 Dwell timeD5 Tool widthF Feed
61G25 Subroutine CallCanned cycles could be made even more efficient by the use of the Subroutine feature, when sevral operations (center drill, drill, booring, tap, etc. ) are performed at the same location. The location pattern is placed in a Subprogram known as Subroutine and called as needed by the main program
62Write a program for milling the shown 4 rectangular pockets in the shown part, use G25 subroutine call to facilitate your programming.