Presentation is loading. Please wait.

Presentation is loading. Please wait.

Some Additional G code Features

Similar presentations


Presentation on theme: "Some Additional G code Features"— Presentation transcript:

1 Some Additional G code Features

2 G43 Turns on Cutter Height compensation
G43 Turns on Cutter Height compensation. Many controls (The A2100 for instance) do not require G43. These controls adjust for cutter height when the tool change command occurs (M6T__) . Other controls require that a G43 command accompany the tool change. Typically they require the use of a H__ word to indicate which value in the data base to use. The compensation will be in the positive direction. The cutter height compensation won’t be invoked until a move in the Z axis occurs.

3

4 Rules for using cutter radius compensation:
A cutter compensation command (G41, G42 or G40) must be on the same block with an X and/or Y linear command when moving onto or off of the part using cutter comp. You cannot turn on or off cutter compensation with a Z axis move. 2. You cannot turn cutter comp on or off in a G02 or G03 move it must be a linear G00, G01. 3. Select a clearance point, without cutter compensation, to a start point in the X and Y axis at least half the cutter diameter off the part before you start initiating cutter comp. 4. When turning cutter compensation off pick a clearance point in X and/or Y that is at least half the cutter diameter off the part. 5. Do not cancel cutter comp on any line that is still cutting the part. 6. Turn off the cutter comp and then ramp off to your clearance point. Sometimes two moves (on in X and one in Y) are required to ensure that both axes will position to the location you want.

5 % O00041 G90 G20 G80 G40 M06 T1 G54 G43 H01 M03 S2000 G00 Z1. X3. Y-1. (Ramp on start point) G41 D01 (Cutter Comp On) Y0 G01 Z-0.2 F10 X0 Y2.041 X1.153 Y3. X2.002 G02 X3. Y2.064 R1. G01 Y0 G40 G00 Z1. (HAAS Book says you can't do this) Y-1. (Ramp Off) M02 The cutter diameter in this case is but that doesn’t matter when using machine comp so long as the diameter/radius in the tool table is correct. See program 41 on teachers

6

7 Pocket Milling Routines
% O00042 G90 G20 G40 G80 M06 T1 G43 H01 G54 M03 S2000 G00 Z1. X1.5 Y1.375 G150 P43 Z-0.5 Q0.1 R0.1 J0.125 K0.05 G42 D01 F10. G40 G01 X-1. Y-1. M02 Pocket Milling Routines P – Subprogram number Z – pocket depth Q - Incremental Z-depth R – Clearance Plane I or J – Axis Shift K – Finish Allowance G41 or G42 Cutter comp % O00043 G01 X0.375 Y2.375 X2.625 G02 X3.625 Y1.375 R1. G01 Y0.375 X1.375 G02 X0.375 Y1.375 R1. M99

8 Spot Drill Canned Cycle for HAAS
% O123 T1M6 G90 G54 G0 X.565Y S1275 M03 G43H1 Z.1M08 G82 Z-.175P.3R.1F10. X1.115Y-2.75 X3.365 Y-2.875 X4.188Y-3.13 X5.Y-4. G80G0Z1.M09 (Cancel canned cycle) F Feed rate L number of Holes if Incremental is used P Dwell Time at Bottom of Hole R Position of Rapid Plane X axis hole location Y axis hole location Z position of bottom of hole

9 Peck Drill Canned Cycle for HAAS
G83 Z-.72Q.175 R.1F15 X1.12Y-2.75 X3.365Y-2.875 X4.12Y-3.313 G80 G00 Z1.0M09 G83 F feed rate I size of first cutting depth (Optional) J amount to reduce cutting depth each pass K Minimum Depth of cut L Number of holes if Incremental (G91) P Dwell at last peck depth in seconds Q Cut depth always incremental R Position of the R plane above the part X hole location Y hole location Z position of the Z axis bottom of hole

10 Subroutines with the HAAS
A subroutine is a program within a program Our goal in this example is to machine around the outside perimeter several times going lower each time. We will leave some material for a final finish cut. See program 491 on teach station

11 Subroutine Main Program T1 M06 G90 G80 G20 G40 G54 G43 H01 M03 S1000
G00 Z1. G90 G00 X6. Y-1. G01 Z0 F5. G41 D01 (Cutter Comp Left on Location #1) M97 P10 L3 (Subroutine call 10 Run three times) Z1. G40 Y-1. (End of outside pass G00 X6. (Move back to start point) G01 Z0 G41 D04 (Cutter Comp Left Location #4) M97 P10 L3 (Subroutine call 10 2nd time) Y-1. M02 (End of main program) Subroutine N (Start of Subroutine 10) G (Switch to incremental) G01 Z-0.1 F5 (Move down .100) G (Back to absolute programming) Y0.5 X1. Y3. X2. Y4. X4. G2X5.Y3.R1. G1 Y0.5 X2. M (Return to block below sub call) %

12 Outside boundary is the first subroutine call using G41D1
Inside boundary is 2nd subroutine call. It’s identical to the first but I’ve changed the tool offset to G41D4 Ramp off Move Ramp on move

13 Another approach would be to just change the tool radius value to
Another approach would be to just change the tool radius value to .3 Note that I used a very large number to exaggerate the offset for illustration purposes. Note the number in the tool wear column. This tricks the machine control into thinking that the tool diameter is smaller than it is and moves the tool path over accordingly.

14 M0 – this is a handy command that pauses the program until you press cycle start again. The only drawback is that you can’t have cutter comp active. M1 – “Optional Stop” This does the same thing as M0 the only difference is there is a button on the machine that must be pressed in order for the machine to pause at these commands.

15 Machine Cutter diameter compensation G40,G41, G42
m06t1 g00 x-1y0 g01g41x.187f15 m3 s1500 g0 z.1 g1z-.1f15 y1.6 x.9y1.9 x2.5 y1.4 x2.8y1 y.187 x2.05 g3x1.25p.4 g1x0 x-1y-1 g40 m02

16 Scaling A2100 control Pro Light control g90
g00 x.5 y.5 z1; moves tool to lower left of 1st square m03s1000 g01z-.1f20 x2.5 y2.5 x.5 y.5 g00z1; finishes big square g151 i1.5 j1.5 p.6; Turns on scaling. about X,Y rat.6 g00x.5y.5; moves to start point g150; turns off scaling so Z depth g01z-.1f20; g151 i1.5 j1.5 p.6; Turns scaling back on to finish g00z1 g150 m2 g90 g00 x.5 y.5 z1; moves tool to lower left corner of big square m03s1000 g01z-.1f30 x2.5 y2.5 x.5 y.5 g00z1; finishes big square g51 x1.5 y1.5 p.6; Turns on scaling. scales about X1.5 Y1.5 factor is 6 g00x.5y.5; moves to start point g50; turns off scaling so Z depth will remain the same as 1st square g01z-.1f30; g51 x1.5 y1.5 p.6; Turns scaling back on to finish inner square g00z1 g50 m30

17

18

19 Rotation A2100 control Pro Light Control g90
g00 x.5 y.5 z1; moves tool to lower left corner of big square m03s1000 g01z-.1f30 x2.5 y2.5 x.5 y.5 g00z1; (ROT, G1x1.5 y1.5 r45) rotates about x1.5y degrees g00x.5y.5; (ROT, A0) turns off rotation m30 Pro Light Control g90 g00 x.5 y.5 z1; moves tool to lower left corner of big square m03s1000 g01z-.1f30 x2.5 y2.5 x.5 y.5 g00z1; g68 x1.5 y1.5 r45; rotates about x1.5y degrees g00x.5y.5; g69; turns off rotation m30

20

21 Inverting or mirroring tool path
G00Z1 m03 g52x1.5y1; G52 sets up a local coordinate system X0Y.7 G1Z-.1F20 G3X-.7Y0P.6 G1X0Y-.7 (INV,X1Y0) INV inverts the following code about the Y axis G0Z1 G1Z-.1 (INV,X0Y0) M2 The G52 used in the example above would establish a temporary coordinate system with the origin at the middle of this 3 X 2 block Using INV,X0Y1 would invert about the X axis.

22 Canned Cycles See Text Chapter 12 for additional information on canned cycle. Canned cycles are codes that the machine control uses to do common operations, thereby minimizing programming steps. Examples include: Drilling Peck Drilling Tapping Boring Pocket Milling Frame Milling In the example to the left a G83“Peck Drilling Cycle” is used Q – Depth of cut (depth of each peck not the hole) R – This the Z plane where the cycle will start Z – Depth of hole

23 Canned cycles give you an easy way of programming repetitive operations like drilling holes or roughing stock off of a surface. The A2100 control has a variety of canned cycles. The following example could be used to make a rectangular pocket that’s X X .5 deep. G0 M3 F40 G22 X0 Y0 U1 V1 P80 K.100 R0 Z-.500 Q1 G22 Calls the cycle X0 Y0 This identifies the location of the center of the pocket U1V1 This identifies the length and width of the pocket P80 Tells the machine what percentage of the cutter width to use on each pass. A .25 diameter cutter would use a .200 overlap each pass. K.100 Tells it to make the depth of cut .100 on each pass R0 Tells it where in the Z axis to start the cycle. This would cause it to start on the surface of the part or Z zero. Z-.5 Tells it how deep to make the pocket Q1 Tells which type of cycle to use. Q1 does a rough then finish cut

24 Basic Subroutine Set up

25 In this case G54 is the same as the work coordinate system
In this case G54 is the same as the work coordinate system. In other words it doesn’t shift at all. The G55 towards the bottom causes the coordinate system to shift four units to the right. The rest of the program (below the G55) is exactly the same as the previous program. There are two more offsets in this program (G56 and G57) that come later on. They are used to make the shape in the upper right corner and the upper left corner. G54 g90 g00 x.5 y.5 z1; m03s1000 g01z-.1f30 x2.5 y2.5 x.5 y.5 g00z1; g68 x1.5 y1.5 r45; g00x.5y.5; g69; g55 This program illustrates what are called Fixture Offsets. Typically G54-G59 are used to turn on alternative coordinate systems or Fixture Offsets. The alternative systems are defined, an advance, by you. When the program gets to G55 for instance, the coordinate system shifts to that location

26 HAAS work offset screen
Using a G54, G56, etc defines the work offset. In other words it tells the control where the part origin is with respect to the machines zero. From that point forward if you tell the machine to go to X0.000 it will go to the parts X origin. This workforce solution was funded by a grant awarded by the U.S. Department of Labor’s Employment and Training Administration. The solution was created by the grantee and does not necessarily reflect the official position of the U.S. Department of Labor. The Department of Labor makes no guarantees, warranties, or assurances of any kind, express or implied, with respect to such information, including any information on linked sites and including, but not limited to, accuracy of the information or its completeness, timeliness, usefulness, adequacy, continued availability, or ownership. This work is licensed under the Creative Commons Attribution 4.0 International License. To view a copy of this license, visit


Download ppt "Some Additional G code Features"

Similar presentations


Ads by Google