CNCzone.com-The Largest Machinist Community on the net!



Home Page Mark Forums Read Today's Posts My Replies Classifieds Reviews Photo Gallery Web Links Share Files Advertise With Us Ad List
Go Back   CNCzone.com-The Largest Machinist Community on the net! > Machine Controllers Software and Solutions > G-Code Programing


G-Code Programing Discuss G-code programing and problems here!


This forum is sponsored by:

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Ban this user!
Old 06-05-2009, 06:55 PM
 
Join Date: Sep 2008
Location: Great Britain
Posts: 32
cossiegaz is on a distinguished road
G17, G18 and G19 explanation please

Can somebody explain to me exactly what the purpose is of the G17, G18 and G19 codes please?
I am aware that they somehow relate to which of the machine axis are being used but i get confused by the fact that a G17 specifys X and Y axis yet the program being excecuted will use X, Y and Z axis so why is there not a code to specify all 3 axis?
Reply With Quote

  #2   Ban this user!
Old 06-05-2009, 07:31 PM
 
Join Date: Jul 2005
Location: Canada
Posts: 11,565
Geof will become famous soon enough

You have it correct, G17 is XY plane, G18 is XZ plane and G19 is YZ, but it really only applies when you are doing circular interpolation; G03 or G02.

In G17 your circle goes around the Z axis, in G18 around the Y axis and G19 around the X axis.
__________________
An open mind is a virtue...so long as all the common sense has not leaked out.
Reply With Quote

  #3  
Old 06-05-2009, 08:45 PM
HuFlungDung's Avatar
Moderator
 
Join Date: Mar 2003
Location: Canada
Posts: 4,825
HuFlungDung is on a distinguished road

I think I used a G18 or a G19 once in my programming life thus far, and even then, it was just a manual tryout

Would it not be the case that arc commands in the various planes all have different formats?
G17 G02 X,Y, I,J
G18 G02 X,Z, I,K
G19 G02 Y,Z, J,K

Hence my question: why wouldn't the control just know what plane to execute the arc in by its syntax? Of course, modal coordinates could never be assumed, I guess, but still....
__________________
First you get good, then you get fast. Then grouchiness sets in.

(Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)
Reply With Quote

  #4   Ban this user!
Old 06-05-2009, 10:14 PM
 
Join Date: Sep 2008
Location: Great Britain
Posts: 32
cossiegaz is on a distinguished road

Originally Posted by Geof View Post
You have it correct, G17 is XY plane, G18 is XZ plane and G19 is YZ, but it really only applies when you are doing circular interpolation; G03 or G02.

In G17 your circle goes around the Z axis, in G18 around the Y axis and G19 around the X axis.

So does this mean that G18 and G19 will only ever be used on a machine with more than 3 axis as thats the only sort of machine that will allow you to produce a circle around the X or Y axis whereas on a 3 axis vertical mill you will only ever be able to produce a circle around the Z axis so would only ever use G17?
And like HuFlungDung said - Why would the machine not just know what axis to use? Obviously it needs to be told otherwise we wouldnt use these codes, but i dont understand why.
Reply With Quote

  #5   Ban this user!
Old 06-06-2009, 02:42 AM
dcoupar's Avatar  
Join Date: Mar 2003
Location: USA
Posts: 2,312
dcoupar is on a distinguished road

Remember, these codes were invented when controls weren't as smart as they are now.

G17, G18 & G19 also select which two axes get cutter comp when you activate G41 or G42 (remember, unless you buy the option, you only get two at a time) and which axes do what when drilling with canned cycles.
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 06-06-2009, 06:42 AM
Superman's Avatar  
Join Date: Dec 2008
Location: Krypton
Age: 51
Posts: 1,555
Superman is on a distinguished road
Buy me a Beer?

dcoupar is on the money

Another way to look at the G17/G18/G19 issue is that:
there is 6 axes of motion
the first 3 are linear ( XYZ )
the remaining 3 are rotational ( ABC ), around XYZ

On a drill cycle when all XYZ are defined, which 2 are the positioning axes, and the remaining axis is the drilling line ( eg G18 XZ=positioning Y=drill line ) this is useful to know when programming for a right-angled head

Mills use the plane command as a point of view that the arc is described as " a true arc ".
An arc with it endpoints and centre points in the X,Y or Z plane would be seen as a line in either of the other planes.

Think about the motion of a skateboarder in a 1/2 pipe, if you wanted a cutter to form this inside radii like the skater, then G17 is wrong, as with using G17, it would only create a big C.
If viewed from the top, the skater is only moving in a line, but we all know he's moving in an arc when viewed from the side
Reply With Quote

  #7   Ban this user!
Old 06-06-2009, 10:56 AM
beege's Avatar  
Join Date: Feb 2008
Location: USA
Posts: 518
beege is on a distinguished road

Originally Posted by HuFlungDung View Post
Would it not be the case that arc commands in the various planes all have different formats?
G17 G02 X,Y, I,J
G18 G02 X,Z, I,K
G19 G02 Y,Z, J,K
This is correct. On machines that have helical interpolation, all of the words X,Y,Z, I,J,K could be used on one line. The plane selection G17 18 and 19 dictate which plane the arc is generated, and which axes create each arc.

And yes, G41 and G42 are cutter offsets applied in each plane.
And yes, (parameter enabled) canned cycles like drilling allow a peck by the third axis (G17-Z axis drilling, G18-Y axis drilling, etc).

As a visual aid, picture the contour you need to cut as you are standing in the plus-plus-plus quadrant of the contour you want to generate, looking back at the origin. On the XZ plane, a G02 will look counterclockwise from the front of the machine, because you are on the backside of that quadrant. Same goes for comp. The offset will need to be reversed because of that same viewpoint.

I once had a machine with spindles in three directions, one pointing from the Z+ (as any VMC), and some pointing from Y+, and some pointing from X+, so we got used to programming everything in all planes. Even tool lengths!

G19G43H01X1.
G18G43H11Y0.
G17G43H21Z1.

HTH
Reply With Quote

  #8  
Old 06-06-2009, 11:11 AM
HuFlungDung's Avatar
Moderator
 
Join Date: Mar 2003
Location: Canada
Posts: 4,825
HuFlungDung is on a distinguished road

Ah, yes, thanks Beege, the requirements for helical interpolation would require the plane to be specified.
__________________
First you get good, then you get fast. Then grouchiness sets in.

(Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)
Reply With Quote

  #9   Ban this user!
Old 06-06-2009, 11:48 AM
Torsten's Avatar  
Join Date: Nov 2004
Location: U.S.A.
Posts: 260
Torsten is on a distinguished road

Originally Posted by HuFlungDung View Post
I think I used a G18 or a G19 once in my programming life thus far, and even then, it was just a manual tryout

Would it not be the case that arc commands in the various planes all have different formats?
G17 G02 X,Y, I,J
G18 G02 X,Z, I,K
G19 G02 Y,Z, J,K

Hence my question: why wouldn't the control just know what plane to execute the arc in by its syntax? Of course, modal coordinates could never be assumed, I guess, but still....
You could not rely on I and J or I and K or J and K been called out, because only one of each may be called out if the other happends to be zero.
The G17, G18 or G19 code lets the controller know wich plane to use for circular interpolation.
Reply With Quote

  #10   Ban this user!
Old 06-09-2009, 01:21 PM
 
Join Date: Sep 2008
Location: Great Britain
Posts: 32
cossiegaz is on a distinguished road

Thanks for the replies, ive read them over and over again and am slowly getting my head round it a little more each time i read through.
Whilst the subject of helical interpolation has been raised can i also ask exactly what that means as it may make it clearer to me why the planes need to be specified, would it be referring to circular interpolation whilst also moving in the axis that the arc is being formed around? So as to be creating like a spiral effect?
Reply With Quote

Sponsored Links
  #11   Ban this user!
Old 06-09-2009, 01:33 PM
 
Join Date: Jul 2005
Location: Canada
Posts: 11,565
Geof will become famous soon enough

Originally Posted by cossiegaz View Post
.......would it be referring to circular interpolation whilst also moving in the axis that the arc is being formed around? So as to be creating like a spiral effect?
Exactly!

Going around in a circle why moving along in a direction parallel to the axis of rotation; getting all screwed up in other words.

Very useful for interpolating holes; you ramp down into the hole the cutter is making, or for milling a boss by ramping down the OD. You can also mill threads by having the Z movement per circle equal to the turns per inch; for internal threads G03 starting at the bottom is used and for external G02 starting at the top.
__________________
An open mind is a virtue...so long as all the common sense has not leaked out.
Reply With Quote

  #12   Ban this user!
Old 06-18-2009, 06:18 PM
 
Join Date: Sep 2008
Location: Great Britain
Posts: 32
cossiegaz is on a distinguished road

Right ive been thinking about this again and am still a little confused, i understand that G17 would be used when producing an arc around Z axis using X and Y plane, G18 for producing an arc around Y axis using X and Z plane and G19 for producing an arc around X axis using Y and Z plane. Now if i was producing an arc starting from for instance X0 Y0 and finishing at X10 Y10 (which would be at a 45 degree angle across both the X and Y axis) and produced the arc using the Z axis then the arc would be equally around the X and Y axis so what G code would i need to use in this case?
Hopefully i've written my question clearly enough to be understood, sorry if it doesnt make sense.
Reply With Quote

Reply




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need Help!- G41 and G42/40 explanation noshoesnoshirt G-Code Programing 3 05-09-2009 11:57 PM
g02 g03 explanation valmet58 CNCzone Club House 4 03-19-2008 09:36 PM
I need some explanation grebator Stepper Motors and Drives 0 04-04-2007 07:03 AM
G64 & G61 Explanation Please weaston G-Code Programing 1 01-31-2007 04:34 AM
CNC explanation Alex S.A General Metal Working Machines 2 10-01-2004 12:23 PM




All times are GMT -5. The time now is 12:17 AM.





Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Content Relevant URLs by vBSEO
Template-Modifications by TMS

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361