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
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
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.
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.
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