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  
Old 11-19-2006, 07:42 PM
Gold Member
 
Join Date: Dec 2004
Location: Newtown, CT, USA
Age: 68
Posts: 517
lerman is on a distinguished road
Need Help With Circular Pocketing Algorithm

I'm implementing gcode subroutines for a wizard I'm writing to do circular pocketing on a milling machine. The input will be: pocket diameter, tool diameter, pocket depth, depth per pass, tool stepover, ramp angle, center x and y, climb or conventional, finish depth pass, finish radial pass.

See: http://www.se-ltd.com/~lerman/gallery/G-Wiz/wizarddemo for a sample screendump.

I've found that it is a lot easier to generate the screen than it is to generate the gcode (this will be implemented as an EMC style gcode subroutine). Some of the issues I'm having are:

1 - Do I mill the pocket from the outside in or from the center out? Going from the outside has the advantage that I should be able to ramp to each step in the first half circle. Since there is more motion, the ramping should cut better.
In that case, I would start inside of the finish allowance, ramp down to the first step in the first circle, then do concentric circles (in a CW direction) with circular arcs connecting them until I got to the center. Then go back to the outside and do it again. One awkward aspect of this is that when I do the finish pass on the diameter, I would have to reverse the direction so as to continue to climb mill.

2 - Assume I'm going from outside to inside. Then, what does the final pass look like? I would take an extra circular pass to remove what is left of the ramp from the previous pass. The ramp down in a CW direction to the finish depth and cut the full circle. The spiral out in a CCW direction taking the finish pass on part of the bottom and the outside diameter. Come back in again taking a circular pass to remove the last ramp. Then go CW again and spiral in to the center to finish the bottom. Is all of this necessary? Would it be sufficient to cut the outside finish pass in a CCW direction so as to climb mill it and continue in that direction in the spiral to the center. It seems to me that since this is just a shallow bottom cut, it probably shouldn't matter if it is climb or conventional milled.

3 - I'm assuming that the ramp is specified as an angle. Is that the most convenient way? Would users prefer it as slope (drop/run).?

Any thoughts or comments would be appreciated. Does anyone have a paper describing an algorithm for this?

Thanks,

Ken
__________________
Kenneth Lerman
55 Main Street
Newtown, CT 06470
Reply With Quote

  #2   Ban this user!
Old 11-20-2006, 08:42 AM
 
Join Date: Mar 2004
Location: Iowa, USA
Posts: 264
rippersoft is on a distinguished road

Look at this site. The code is C, but is easy to follow.

http://jelinux.pico-systems.com/gcode.html

RipperSoftware
Reply With Quote

  #3  
Old 11-20-2006, 09:00 AM
Gold Member
 
Join Date: Dec 2004
Location: Newtown, CT, USA
Age: 68
Posts: 517
lerman is on a distinguished road

I'm familiar with Jon Elson's code. In fact, it served as the prototype for the first version of the pocketing gcode subroutine I wrote.

It doesn't address the issue of ramping into the material.

My current version of the code just plunges at the center of the pocket feeding at the current feed rate divided by five. That worked fine for the few different cases I tried. But they were very limited.

What I really need is a good, tried and tested algorithm. Does anyone know what the mach3 wizards do for this?

Ken
__________________
Kenneth Lerman
55 Main Street
Newtown, CT 06470
Reply With Quote

  #4  
Old 11-20-2006, 10:43 AM
ger21's Avatar
Community Moderator
 
Join Date: Mar 2003
Location: Shelby Twp, MI....USA
Posts: 20,454
ger21 is on a distinguished road
Buy me a Beer?

In my AutoCAD macro I think I ramp in from near the edge, or a fixed length from center, depending on the diameter and tool size, and start spiraling from the center, leaving the finish allowance.
__________________
Gerry

Mach3 2010 Screenset
http://home.comcast.net/~cncwoodworker/2010.html

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

  #5  
Old 11-20-2006, 10:55 AM
Gold Member
 
Join Date: Dec 2004
Location: Newtown, CT, USA
Age: 68
Posts: 517
lerman is on a distinguished road

Ger,

When you say "my autocad macro" do you mean one that you use or one that you wrote?

Does the user specify the ramp angle? If it is a fixed distance from center, how do you guarantee that the distance is great enough so that you can ramp deeply enough? Or do you ramp back and forth until you get to the depth? I would think that if you go back and forth, you would want the distance to depend on the tool diameter. You might want to go at least a few diameters so that you are not simply plunging.

I wanted to avoid the separate ramping because then the cut would be broken as the cutter crossed the ramp area. Also, the bottom would not appear as regular. Am I worrying about things that shouldn't matter?

Thanks for commenting,

Ken
__________________
Kenneth Lerman
55 Main Street
Newtown, CT 06470
Reply With Quote

Sponsored Links
  #6  
Old 11-20-2006, 12:30 PM
ger21's Avatar
Community Moderator
 
Join Date: Mar 2003
Location: Shelby Twp, MI....USA
Posts: 20,454
ger21 is on a distinguished road
Buy me a Beer?

Originally Posted by lerman View Post
Ger,

When you say "my autocad macro" do you mean one that you use or one that you wrote?

Both.

I wrote it to just ramp to the depth of cut for that pass, with the max depth per pass specified by the user. I don't specify the ramp angle, but I think I have a fixed ramp length that gets smaller if the tool and hole size need it. Just a single ramp to the center. I work with wood, so I didn't think about breaking tools when I wrote it.
__________________
Gerry

Mach3 2010 Screenset
http://home.comcast.net/~cncwoodworker/2010.html

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

  #7  
Old 11-20-2006, 03:47 PM
Gold Member
 
Join Date: Dec 2004
Location: Newtown, CT, USA
Age: 68
Posts: 517
lerman is on a distinguished road

I think I may have an approach.

1 - Position off the center by a the distance corresponding to the stepover. If this is larger than the rough diameter reduce to fit.

2 - Then helically ramp into the material at the specified angle. Do this in whole circles, taking as many loops as necessary to get to the step depth. If this is the last step before the rough bottom, it may be smaller than previous steps. Also if this is the last step, take an extra loop around the circle to remove the ramp.

3 - Circularly loop outwards to the next stepover. Repeat this until at the rough diameter.

4 - At the rough diameter, loop all the way around.

5 - The lift the cutter off the bottom and head back to the center (where the ramp is started).

6 - Now loop back to step 1 to do the next step. (Unless this was the last step).

7 - Ramp down to the finish depth. Take an extra loop around the circle to remove the ramp.

8 - Now spiral out (a stepover at a time) to the finish diameter, taking a final loop around at the end. Loop back to the center. Raise the cutter.

9 - DONE

ONE MORE QUESTION:

Should I provide different feed and speed rates for the rough and final passes? My inclination is to NOT provide them. In fact, I'd like to assume that the speed and feed have been preset prior to entering this subroutine.

If the user needs different values, he can do a separate subroutine call to do the finish passes.

Any comments?

Thanks,

Ken
__________________
Kenneth Lerman
55 Main Street
Newtown, CT 06470
Reply With Quote

  #8   Ban this user!
Old 11-20-2006, 04:14 PM
 
Join Date: Jul 2005
Location: Canada
Posts: 11,563
Geof will become famous soon enough

Originally Posted by lerman View Post
I think I may have an approach......Any comments?

Thanks,

Ken
This seems very similar to the Haas circular pocket routine with the advantage that it is not necessary to prebore the center hole because you have included the center helical interpolation down to the cut depth.

Regarding different speeds/feeds do you plan on doing the central helical operation at the same feed that you then use for the spiralling out? I find it sometimes necessary to do the initial helical ramp a bit slower because there is not as much space for the cutter to eject chips; once you are going round the inside of the spiral things can move faster.
Reply With Quote

  #9  
Old 11-20-2006, 04:33 PM
Gold Member
 
Join Date: Dec 2004
Location: Newtown, CT, USA
Age: 68
Posts: 517
lerman is on a distinguished road

Geof,

I wasn't planning a different feed. I could add that, but it's just another thing for the user to (mis)understand. If the user find it to be a problem, he could pre-bore the initial hole by using the same routine with a slower feed.

Do you have any documentation on the Haas routines? I'm building a conversational gcode wizard (called G-Wiz) to work with EMC, and could use some definitions for a bunch of routines. It's relatively easy to find info on what they do and what parameters they take; but what I really need is HOW they are done.

Thanks,

Ken
__________________
Kenneth Lerman
55 Main Street
Newtown, CT 06470
Reply With Quote

  #10   Ban this user!
Old 11-20-2006, 04:41 PM
 
Join Date: Jul 2005
Location: Canada
Posts: 11,563
Geof will become famous soon enough

The only Haas information I have is from the manual about using the routine. If you went to the Haas website and dug your way down to their literature page you would find it in the mill manual. I think you would find Haas very reluctant to tell you how theirs is done.
Reply With Quote

Sponsored Links
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





All times are GMT -5. The time now is 08:15 PM.





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