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 02-12-2011, 05:58 PM
 
Join Date: Oct 2004
Location: USA
Posts: 395
OCNC is on a distinguished road
G41/42 question

I'm trying to generate a g-code program that zig-zags. In order to keep the tool on the correct side of the cut I need to change the cutter offset at the end of each zig and zag motion. The change from G41 to G42 and back again seems like it might be happening at maximum rapid speed. What speed is used for the cutter compensation move and is there any strategy that applies to making a smooth transition between G41 and G42?
Thanks.

Chris
Reply With Quote

  #2   Ban this user!
Old 02-12-2011, 06:08 PM
 
Join Date: Sep 2009
Location: USA
Posts: 74
jvangelder is on a distinguished road

I could be wrong not seeing exactly what your doing, however

You are going to need a lead for each new movement when you enable cutter comp

Is there any reason you cant program the path without cutter comp, just programming it with the tool center?

-Jacob
Reply With Quote

  #3   Ban this user!
Old 02-12-2011, 09:49 PM
 
Join Date: Oct 2004
Location: USA
Posts: 395
OCNC is on a distinguished road

Originally Posted by jvangelder View Post
I could be wrong not seeing exactly what your doing, however

You are going to need a lead for each new movement when you enable cutter comp

Is there any reason you cant program the path without cutter comp, just programming it with the tool center?

-Jacob
I could do it by changing the centerline path. I just thought that changing the comp would be simpler. I'm new to working with g-code so wasn't sure which way to approach the problem. What's involved in creating a lead for the comp change?

Thanks.

Chris
Reply With Quote

  #4   Ban this user!
Old 02-13-2011, 01:43 AM
 
Join Date: Feb 2006
Location: india
Posts: 1,187
sinha_nsit is on a distinguished road

You can change G41 to G42, and vice versa, in compensation mode, but I cannot imagine any practical example of this application. Pl let me know where you are using it
Reply With Quote

  #5   Ban this user!
Old 02-13-2011, 03:31 AM
Algirdas's Avatar  
Join Date: Mar 2009
Location: Lithuania
Posts: 858
Algirdas is on a distinguished road

I agree with Mr jvangelder and Mr. sinha_nsit. Post Your part sketch or picture here. Can't imagine necessity to change compensation direction without retracting the tool away from cutting point
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 02-13-2011, 07:15 AM
 
Join Date: Oct 2004
Location: USA
Posts: 395
OCNC is on a distinguished road

Originally Posted by sinha_nsit View Post
You can change G41 to G42, and vice versa, in compensation mode, but I cannot imagine any practical example of this application. Pl let me know where you are using it
The shape is the top surface of an airfoil. The chord is in the y direction and the camber or thickness is in the z direction. The span is in the x direction. The cutting path then zig-zags back and forth along the x axis (the same distance on each pass) and y/z vary to get the shape. In other words I'm extruding a profile along x. The cutter always needs to be to the same side of the center path line relative to the x-y plane (rather than relative to the path direction) and therefore the compensation has to change depending on whether the motion along x is + or -. Of course the other way to do this is to shift each alternate path line to reflect the change in compensation but this is, at least it seemd so to me, more complex than just telling the cutter to move to the other side of the centerline. Asking the same question in the Artsoft Mach forum it was pointed out to me that I need to turn off compensation with G40 before I change it from G41 to G42 or vice-versa which I wasn't doing. This may have been causing the behavior I was seeing which was a kind of snapping motion and it's the 'snap' of this motion that I'm trying to eliminate. If this is still unclear I'll post a drawing. I'm generating the code using a script in Rhino with a simple profile curve so there really isn't any significant graphic that would enhance the present description. I appreciate the input.

Chris

Last edited by OCNC; 02-13-2011 at 07:47 AM.
Reply With Quote

  #7   Ban this user!
Old 02-13-2011, 05:44 PM
 
Join Date: Sep 2010
Location: Australia
Posts: 733
angelw is on a distinguished road

Originally Posted by OCNC View Post
The shape is the top surface of an airfoil. The chord is in the y direction and the camber or thickness is in the z direction. The span is in the x direction. The cutting path then zig-zags back and forth along the x axis (the same distance on each pass) and y/z vary to get the shape. In other words I'm extruding a profile along x. The cutter always needs to be to the same side of the center path line relative to the x-y plane (rather than relative to the path direction) and therefore the compensation has to change depending on whether the motion along x is + or -. Of course the other way to do this is to shift each alternate path line to reflect the change in compensation but this is, at least it seemd so to me, more complex than just telling the cutter to move to the other side of the centerline. Asking the same question in the Artsoft Mach forum it was pointed out to me that I need to turn off compensation with G40 before I change it from G41 to G42 or vice-versa which I wasn't doing. This may have been causing the behavior I was seeing which was a kind of snapping motion and it's the 'snap' of this motion that I'm trying to eliminate. If this is still unclear I'll post a drawing. I'm generating the code using a script in Rhino with a simple profile curve so there really isn't any significant graphic that would enhance the present description. I appreciate the input.

Chris
I imagine that you would be using a ball nose cutter or an end mill with a corner radius to generate your shape. If the generated code gives the true position of the cutter, I can't see any reason in using cutter rad comp; you may have to enlighten us with a picture of the workpiece and cutter arrangement.

If for some reason cutter radius comp is required, and given that your cutting is mono directional, after you lift off at the end of the cut you could apply G40 to cancel the comp on the rapid back to the start point and reapply the cutter radius comp on your Y move to engage the next cut.

Regards,

Bill
Reply With Quote

  #8   Ban this user!
Old 02-13-2011, 10:54 PM
 
Join Date: Feb 2006
Location: india
Posts: 1,187
sinha_nsit is on a distinguished road

I tried to study the manual, but the logic is not very clear.
But it is clear that you can switch offset mode without canceling it.
I do not know if this would help, but try switching offset mode after YZ-motion at the end.

And, as Angelw has said, if you have generated the profile using a CAM software, what is the need for using radius compensation? Just specify the radius of the tool before toolpath generation, and select its reference point. The software would automatically adjust the cutter path.
Reply With Quote

  #9   Ban this user!
Old 02-15-2011, 01:19 PM
Algirdas's Avatar  
Join Date: Mar 2009
Location: Lithuania
Posts: 858
Algirdas is on a distinguished road

You have one (the best) advice already. Set Your CAM to generate tool center path. You can't change the cutter to another size nor You can't compensate tool tip wear while cutting. The advantage is, that You will get simple and fast program. Depending on Your control specifications (NURBS, Hi-NURBS or Super Hi-NURBS as for Okuma like instance) You can increase or reduce the speed. One more advantage - You can get perfect surface. Each tool stop makes clearly visible dot, so - no stops no dots.
Another way is to use machine tool provided "three dimensional cutter radius compensation". It's is optional for Your machine, suppose.
The third solution is to use spiral approach instead of zig-zag
Reply With Quote

  #10   Ban this user!
Old 02-15-2011, 06:54 PM
 
Join Date: Jul 2003
Location: New Zealand
Posts: 1,039
Kiwi is on a distinguished road

Originally Posted by OCNC View Post
.....I'm generating the code using a script in Rhino with a simple profile curve so there really isn't any significant graphic that would enhance the present description. I appreciate the input......
If you can get your script to generate code as per example this should help.
You will need to reverse the offset when cutting the half when the Z is decreasing.

G40 G01 X-10. Y0. Z10
G42 G01 X0. Y10
G01 X200.
G40 G01 X210.
G41 G01 X200. Y20. Z12
G01 X0.
G40 G01 X-10.
Attached Thumbnails
Click image for larger version

Name:	OCNC1.jpg‎
Views:	36
Size:	23.5 KB
ID:	126600  
Reply With Quote

Sponsored Links
  #11   Ban this user!
Old 02-16-2011, 09:26 PM
 
Join Date: Oct 2004
Location: USA
Posts: 395
OCNC is on a distinguished road

Originally Posted by Kiwi View Post
If you can get your script to generate code as per example this should help.
You will need to reverse the offset when cutting the half when the Z is decreasing.

G40 G01 X-10. Y0. Z10
G42 G01 X0. Y10
G01 X200.
G40 G01 X210.
G41 G01 X200. Y20. Z12
G01 X0.
G40 G01 X-10.
Thanks. I'll give this a try tomorrow. I can easily modify the script to embed the offset in the path and will probably not use the compensation but I would like to implement it just to see how it works and to get a feel for what's involved in using it. Your example will be a good starting point for me.
Thanks again.
Chris
Reply With Quote

  #12   Ban this user!
Old 02-16-2011, 10:22 PM
 
Join Date: Jul 2003
Location: New Zealand
Posts: 1,039
Kiwi is on a distinguished road

Chris. May be better to put the Z move in a separate line.
G40 G01 X210.
G01 Z12. ;<<<<<<<<<<<<<<<<<<<<<<<<<<<
G41 G01 X200. Y20.
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





All times are GMT -5. The time now is 07:54 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