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-25-2007, 10:19 PM
 
Join Date: Sep 2007
Location: USA
Posts: 6
RedSoxFox is on a distinguished road
total noob to g-code, pretty simple (i think) arc problem.

I just started learning G-Code, and one of my first assignments is to do a simple design to be carved into a block of wood. I chose to do the NFL logo/crest so I could use some arcs a little more complicated than a semi-circle or quarter circle.

Unfortunately, those arcs are what's causing me all my trouble.

Here's the first bit of code giving me a problem:

Code:
N0100 G01 X0.8 Y2.9
N0110 G02 X0.5 Y1.75 I-0.595 J-0.44
The arc should be from (0.8, 2.9) to (0.5,1.75) with the arc rising 0.3 over the line drawn between those points.

The distance between the points is roughly 1.19, so by using (A^2+B^2)/2B, I got that the radius should be roughly .74.

That I think should mean the center point of that arc comes out as -0.595, and -0.44 away from the origin point.

Unfortunately, Benchman keeps giving me a bad arc error at that line. I tried using exact figures of Cx=-0.443125 from Ax, and Cy=-0.5942432162 from Ay, and it still gives me the bad arc error. What's bugging me is that if I tell it to continue with the program, it appears to draw the arc as I'd intended.

I'm assuming the center point coordinates are wrong, but what are the right ones? And how do I find them?
Reply With Quote

  #2   Ban this user!
Old 09-26-2007, 04:08 AM
 
Join Date: Jun 2005
Location: us
Posts: 210
timlkallam is on a distinguished road

Ok a .74 raduis between points(0.8, 2.9) to (0.5,1.75)
Center point of radius x.22329 y2.43632

Try this
G01 X0.8 Y2.9
G02 X0.5 Y1.75 I-.27671 J.68632
or
G01 X0.8 Y2.9
G02 X0.5 Y1.75 R.74
__________________
Tim
Reply With Quote

  #3   Ban this user!
Old 09-26-2007, 05:05 AM
 
Join Date: Sep 2007
Location: USA
Posts: 6
RedSoxFox is on a distinguished road

Originally Posted by timlkallam View Post
Ok a .74 raduis between points(0.8, 2.9) to (0.5,1.75)
Center point of radius x.22329 y2.43632

Try this
G01 X0.8 Y2.9
G02 X0.5 Y1.75 I-.27671 J.68632
or
G01 X0.8 Y2.9
G02 X0.5 Y1.75 R.74
The first one was WAY off, but just specifying the radius worked like a charm. I'm wondering why my professor didn't mention it in the first place...
Reply With Quote

  #4   Ban this user!
Old 09-26-2007, 08:32 AM
 
Join Date: May 2005
Location: canada
Posts: 1,149
cyclestart is on a distinguished road

Try this;

G00 X .8 y2.9
G02 X.5 Y1.75 I-.57671 J-.46368 F20

The math for the arc center is tricky than it might appear *. Not much fudge-factor with I's and J's.

* I cheated, cad is a wonderful thing.
__________________
Anyone who says "It only goes together one way" has no imagination.
Reply With Quote

  #5   Ban this user!
Old 09-26-2007, 09:13 AM
 
Join Date: Sep 2007
Location: USA
Posts: 6
RedSoxFox is on a distinguished road

Originally Posted by cyclestart View Post
Try this;

G00 X .8 y2.9
G02 X.5 Y1.75 I-.57671 J-.46368 F20

The math for the arc center is tricky than it might appear *. Not much fudge-factor with I's and J's.

* I cheated, cad is a wonderful thing.
Those I's and J's worked too. Thanks. What's the "F20" for?

I'm hoping the system we use will recognize the R, as there are 3 other arcs I need to find center points for, and simply putting R.74 is way easier.
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 09-26-2007, 10:10 AM
 
Join Date: May 2007
Location: US
Posts: 779
Andre' B is on a distinguished road

Originally Posted by RedSoxFox View Post
The first one was WAY off, but just specifying the radius worked like a charm. I'm wondering why my professor didn't mention it in the first place...
Hopefully he/she did not mention it because they are aware that always using the R method is a bad habit to get into.

The problem with using R for G2,G3 is that the closer the arc gets to being a full 360° the less accurate will be the calculated center point of the arc. This is because you are limited to a resolution of 4 decimal places (on most machines anyway).
And at a full 360° the center point can not be calculated from just the starting point, ending point (they are the same), and the radius.

Say you wanted to make a 359° arc centered on X0.0, Y0.0 with a 1" radius, and a starting point of (X1.000000 Y0.000000). Then ending point would be (X0.9998477 Y0.0174524).
Now round that off to 4 decimal places (X0.9998 Y0.0175), now draw a circle thru this rounded off point and the starting point and you will find that the center of this circle is at (X0.0000036, Y-0.0026774) or 0.002677" from where you wanted it. And for many jobs that is a scrap part even before adding in real world machine errors.

You have the same problem for real short arcs but it usually does not matter much.
Reply With Quote

  #7   Ban this user!
Old 09-26-2007, 10:22 AM
 
Join Date: Sep 2007
Location: USA
Posts: 6
RedSoxFox is on a distinguished road

Originally Posted by Andre' B View Post
Hopefully he/she did not mention it because they are aware that always using the R method is a bad habit to get into.

The problem with using R for G2,G3 is that the closer the arc gets to being a full 360° the less accurate will be the calculated center point of the arc. This is because you are limited to a resolution of 4 decimal places (on most machines anyway).
And at a full 360° the center point can not be calculated from just the starting point, ending point (they are the same), and the radius.

Say you wanted to make a 359° arc centered on X0.0, Y0.0 with a 1" radius, and a starting point of (X1.000000 Y0.000000). Then ending point would be (X0.9998477 Y0.0174524).
Now round that off to 4 decimal places (X0.9998 Y0.0175), now draw a circle thru this rounded off point and the starting point and you will find that the center of this circle is at (X0.0000036, Y-0.0026774) or 0.002677" from where you wanted it. And for many jobs that is a scrap part even before adding in real world machine errors.

You have the same problem for real short arcs but it usually does not matter much.
Ahh, good to know.

So basically, it's OK to use in situations where being a hundredth off isn't a big deal, but in any kind of precision situation, the exact coordinates should be found?
Reply With Quote

  #8   Ban this user!
Old 09-26-2007, 12:36 PM
 
Join Date: Sep 2007
Location: USA
Posts: 6
RedSoxFox is on a distinguished road

OK, apparently the machine we're using won't recognize/accept the R instructions.

Given Benchman can figure out the center point with just the two X,Y coordinates and the radius length, I'm assuming there's got to be some kind of program out there that will do the same thing and actually give me those X,Y coordinates for the center point. Either that, or what's the formula and I can work on figuring it out as I go?
Reply With Quote

  #9   Ban this user!
Old 09-26-2007, 01:21 PM
 
Join Date: Jun 2005
Location: us
Posts: 210
timlkallam is on a distinguished road

Originally Posted by timlkallam View Post
Ok a .74 raduis between points(0.8, 2.9) to (0.5,1.75)
Center point of radius x.22329 y2.43632

Try this
G01 X0.8 Y2.9
G02 X0.5 Y1.75 I-.27671 J.68632
or
G01 X0.8 Y2.9
G02 X0.5 Y1.75 R.74
I used cad also and still got it wrong.I don't think i ever used an I or J for cutting a raduis. I only use it to cut full circles. Tell me if this is right .The I and J is an incamental
distance from the start point of the arc? Not from the ending of the arc. After reading Andre's post I am going to start using I an Js on all my arcs.
__________________
Tim
Reply With Quote

  #10   Ban this user!
Old 09-26-2007, 02:46 PM
 
Join Date: Jul 2005
Location: Canada
Posts: 11,563
Geof will become famous soon enough

Originally Posted by timlkallam View Post
....Tell me if this is right .The I and J is an incamental distance from the start point of the arc? Not from the ending of the arc....
I have seen some people post and say that on some machines the I and J are the absolute location of the center. I program on Haas machines and they have it as the incremental distance.
__________________
An open mind is a virtue...so long as all the common sense has not leaked out.
Reply With Quote

Sponsored Links
  #11   Ban this user!
Old 09-26-2007, 04:39 PM
 
Join Date: Aug 2003
Location: NSW, Australia
Posts: 3
Ian Kirby is on a distinguished road

In my experience, the I & J are vectors from the start point of the arc to the centre of the arc. Its possible that some machines may be set up to use absolute co-ordinates, so this should be checked before one hits the "Go" button!
Regards, Ian Kirby.
Wollongong NSW Australia
Reply With Quote

  #12  
Old 09-26-2007, 07:06 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?

I came up with this. Slightly different than the answer above.

G1 X0.8000 Y2.9000
G2 X0.5000 Y1.7500 I-0.5743 J-0.4643
Attached Thumbnails
Click image for larger version

Name:	arc.GIF‎
Views:	87
Size:	8.8 KB
ID:	44341  
__________________
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

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
Hello, I'm a total noob unseen wombat Commercial CNC Wood Routers 5 01-06-2007 03:42 PM
Simple G-code commands... WilliamD G-Code Programing 5 01-12-2006 12:27 PM
RFQ: small 2D milling needed, pretty simple cowanrg Employment Opportunity 12 10-23-2005 12:16 PM
Over the top easy question from total noob. GregoryA General Metalwork Discussion 4 10-01-2005 09:41 AM
Perhaps a bug in simple one line code?? thuffner3 TurboCNC 3 02-02-2004 08:21 PM




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