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 09-07-2011, 09:39 AM
 
Join Date: Jul 2009
Location: US
Posts: 5
lclee is on a distinguished road
Bad Circles

G01 X3 Y0
G02 X5 Y5 I0 J0

The GCode is wrong.
It begins with a radius of 3, and ends with a radius of 5.

What is the expected behavior for this code?
Is the CAM program supposed to halt on some sort of data check?
How close do the starting and ending radii have to be?

Is it supposed to run until either the X or Y coordinates match?
That won't happen in the G Code above.

What would EMC or Mach do?

Thanks
Larry
Reply With Quote

  #2   Ban this user!
Old 09-07-2011, 09:52 AM
dcoupar's Avatar  
Join Date: Mar 2003
Location: USA
Posts: 2,312
dcoupar is on a distinguished road

Originally Posted by lclee View Post
G01 X3 Y0
G02 X5 Y5 I0 J0

The GCode is wrong.
It begins with a radius of 3, and ends with a radius of 5.

What is the expected behavior for this code? What machine/control?
Is the CAM program supposed to halt on some sort of data check?What CAM program?
How close do the starting and ending radii have to be?

Is it supposed to run until either the X or Y coordinates match?
That won't happen in the G Code above.

What would EMC or Mach do?

Thanks
Larry
Can you also post a couple of program blocks before and after the 2 you posted?
Reply With Quote

  #3   Ban this user!
Old 09-07-2011, 11:00 AM
 
Join Date: Jul 2009
Location: US
Posts: 5
lclee is on a distinguished road

Is this what you mean?

I'm just writing this code on the screen, it hasn't been tested.
Travel Height is a 1"
Cutting Height is 0"

G20
G90
F20
G17
G00 Z1
M03
G01 Z0
G01 X3 Y0
G02 X5 Y5 I0 J0
G00 Z1
G00 X0 Y0
M05
M30


Also to correct my original post,
I said the second radius was 5 inch,
and actually it was 7 inches.

Larry
Reply With Quote

  #4   Ban this user!
Old 09-07-2011, 11:13 AM
 
Join Date: Jul 2009
Location: US
Posts: 5
lclee is on a distinguished road

The question is not really about any specific machine
or particular CAM program. It's about what the proper behavior
should be. I'm currently using KCAM, but considering moving
to EMC or Mach which is why I asked about those programs.

I always find my misteaks after I hit send!

G20
G90
F20
G17
G00 Z1
M03
G00 X3 Y0
G01 Z0
G02 X5 Y5 I0 J0
G00 Z1
G00 X0 Y0
M05
M30
Reply With Quote

  #5   Ban this user!
Old 09-07-2011, 06:18 PM
dcoupar's Avatar  
Join Date: Mar 2003
Location: USA
Posts: 2,312
dcoupar is on a distinguished road

Originally Posted by lclee View Post
The question is not really about any specific machine
or particular CAM program. It's about what the proper behavior
should be. I'm currently using KCAM, but considering moving
to EMC or Mach which is why I asked about those programs.

I always find my misteaks after I hit send!

G20
G90
F20
G17
G00 Z1
M03
G00 X3 Y0
G01 Z0
G02 X5 Y5 I0 J0
G00 Z1
G00 X0 Y0
M05
M30
"Proper behavior" is very likely machine/control dependent, which is why I asked. Some controls interpret I and J as absolute coordinates of the circle center, and some interpret I and J as an incremental distance from the start-point of the arc to the center.

My assumption is your example would produce a curve (possibly a helix) with a starting radius of 3.0 and an ending radius of 7.0711, both of which are centered at 0,0. See attached .jpg.
Attached Thumbnails
Click image for larger version

Name:	Bad Circle.jpg‎
Views:	45
Size:	152.4 KB
ID:	141560  
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 09-08-2011, 09:29 AM
 
Join Date: Jul 2009
Location: US
Posts: 5
lclee is on a distinguished road

I appreciate that there aren't formal standards for G Code.

I didn't know that G02/G03 could work with anything other than a constant radius, therefore a circle or a portion of circle (arc).

Good to know.

Thanks for the information.
Larry
Reply With Quote

  #7   Ban this user!
Old 09-08-2011, 05:59 PM
dcoupar's Avatar  
Join Date: Mar 2003
Location: USA
Posts: 2,312
dcoupar is on a distinguished road

Originally Posted by lclee View Post
I appreciate that there aren't formal standards for G Code.

I didn't know that G02/G03 could work with anything other than a constant radius, therefore a circle or a portion of circle (arc).

Good to know.

Thanks for the information.
Larry
There ARE formal standards for G Code, but they were written a long time ago, and things have changed since then. Not all builders honor the standard in any case.

I'm not sure that you will get that curve on a functional CNC control. You may get a semi-circle the a line to the end point. You may get alarms. You may get vapor lock. Again, I'm sure it depends on the control.

If your post processor output this code, I'd ask for my money back.
Reply With Quote

  #8   Ban this user!
Old 09-08-2011, 09:39 PM
BobWarfield's Avatar  
Join Date: May 2005
Location: USA
Posts: 2,395
BobWarfield is on a distinguished road

That code should alarm on most any control, whether in incremental or absolute IJK mode. Having a different distance from one end point to the center from the other is not permitted and is a very common alarm to encounter.

Having it be off by 5 units is quite a lot. Many controls will have a parameter that lets you set the tolerance, but I would not expect it to be productive to allow that much difference.

It's not a helix, because there is no change in Z from one endpoint to the next on the arc.

You can check this in many g-code simulators, I used G-Wizard. With a simulator, it's easy to play with different options like absolute vs relative IJK to see the effect. G-Wizard displays this information about the arc on line 9:
G02: Clockwise circular interpolation (move in a circular arc at feed speed)
Distance from last move to center = 3.0000
Distance from this move to center = 7.0711
Arc endpoint: 3.0000, .0, .0
Arc center coordinates: .0, .0, .0, radius = 3.0000 (determined by IJK)
Arc angles: .0 to .0(.0 degrees total)

Time: 03.2
ERROR: Distance from each arc endpoint to center differs by 4.0711, more than allowable tolerance.
Mach3 will flag it as an error, "Radius from end of arc differs from radius to start."

Cheers,

BW
__________________
Try G-Wizard Machinist's Calculator for free:
http://www.cnccookbook.com/CCGWizard.html
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
Can't cut circles... Help! greygabe Syil Products 8 05-24-2011 01:31 PM
Ovals instead of circles??? X4 zaebis Syil Products 4 03-17-2010 09:09 PM
circles 1234567 General CAD Discussion 1 01-08-2010 04:32 PM
Need Help!- circles arent circles xlr8r DynaTorch 3 01-18-2009 11:26 AM
help with circles phe259 TurboCNC 3 12-18-2005 06:30 PM




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