for milling, g02 is clockwise, g03 is counter-clockwise.
if this an inside circle, starting from 9:00 it would be
x-.500y0
g03 i.500.
this is climb milling
to conventional mill
x-.500y0
g02i.500
think of i as x, and j as y
x0 y.500
g02j-.500
Being new to GCode, I need some help understanding of usage of the G2 and G3 commands.
How is G2 and G3 used with I, J, and R in controlling the size of arc generated? and... What's a good way to have my X-Y table generate a 0.500 R circle once, and one that goes infinitly in a circle?
FYI - My application of GCode will be for controlling an X-Y table inside an electron beam machine with a fixed gun. I also prefer to use incremental movements and presently begin my circles now from a 9:00 starting position.
Any help would be much appreciated.
Similar Threads:
for milling, g02 is clockwise, g03 is counter-clockwise.
if this an inside circle, starting from 9:00 it would be
x-.500y0
g03 i.500.
this is climb milling
to conventional mill
x-.500y0
g02i.500
think of i as x, and j as y
x0 y.500
g02j-.500
Hi, as Hira said on the g2 & g3. The I designates the center of the radi point on the x axis and j is for the y axis and k is for the z. If you need a r (radius) value, you are using software that is not real common, like that free stuff. I think its best you learn a fanuc post which is most common, like in Artsoft Mach3, cnc pro, Hass machines, Fadel machines, etc.. Also remember, in the LINE AFTER ANY CIRCLE (which includes a g2 or g3) make sure you put a g1 or g0 for feed or rapid, because on some machines, if that is not there, any axis will just go anywhere untill you hit a limit, even if it means crashing through things. Proof: Bridgeport boss 7.2 and i have seen this on other machines also. Good Luck.
Thanks you two for the explainations. I only have a bench setup to look at while making this, but I think I can go once around with this program I made...
N10 G20 G91 F20
N20 G03 X-0.25 Y0.0 I0.25 J0.0
As I said, I can't see the circle generated. That, I think, will produce me a CCW 0.500 circle starting and ending from 9:00 moving incrementally.
How can I get that circle to repeat 5 time without having to have repeat N20 5 times? And finally, how can I get that program looped infinitely? Is there a loop command thats commonly used? I tried M97, but that didn't seem to work.
For a complete circle you only need I and J.
G02 I0.0 J-0.25 will give a single circle of diameter 0.500 with the center located -0.25 away from the start point along the Y axis. At least that is how Haas machines work; some machines would put the center at 0.25 absolute.
Again on the Haas adding an L count gives you that many circles.
G02 I0.0 J-0.25 L10 gives ten complete circles.
Infinity is not allowed in the L count but then you would be a bit old by the time it finished wouldn't you?
An open mind is a virtue...so long as all the common sense has not leaked out.
N3000
(.500 Endmill)
G0g20g54g90g17s3000m3
G0x0y0t4
G43z.1h3m8
G1z-.35f20.
G1y.03
G3x0y.03j-.03d03f3.
G1x0y0f10.
G0g40z1.
M21
G0g43h3z.1
G1z-.35f20.
G1y.03
G3x0y.03j-.03d03f3.
G1x0y0f10.
G0g40z1.m9
G91g28z0
M1
M6
individual who perceives a solution and is willing to take command. Very often, that individual is crazy.
I fail to follow what your saying.
I'm looking for a way to loop my program without needing to repeat a program line. I'll do it if I have to, that's not a problem. Is there an alternative way that's commonly used?
This code is used in mech soft, your welcome to try it in your program:
**to repeat gcode indefinitely:
****************************
%
N1 (first line of gcode)
G20 G00 etc.
...
.
..
.
.(more lines of code)
.
.
M1
M99 P1
%
To continuously loop your program it's just an M99 at the end. but to stop it you'd have to hit the reset button.
You might do this instead...
;
;
/M30;
M99;
%
This way you can keep the block delete switch on and it will ignore the M30.
When you're ready to stop the program just flip block delete to off to read the M30.
If you have the GOTO function, then
N100
program
GOTO 100
This is an infinite loop. You stop it by turning power off or a RESET, or put a conditional test inside the program that jumps (GOTO) outside of the loop.
.
I tried all those ideas, none worked....thanks tho. I'm using a CamSoft Pro unit where M97 is suppose to be for jumping and goto line numbers. Here's what I tried:
N00 G20 G91
N10 G01 X0.1 Y0.1 F30
N20 M97 N10
That didn't work. Any ideas?
try
M97 P10
or
M97 10
Find a manual on your control.
M97 Pxxx is a local subroutine call in HAAS. Not quite the same as a GOTO xxx.
Is there an explicite GOTO command in your control?
.
Excellent tip gar. There's no GOTO command yet adding the P instead of the N did the trick.
I got a slight lag where the motors hesitated once it got to the end of my program, then looped. I removed the hesitation with a G08 which is spline smoothing on I discovered, but now the only way to stop my program is with E-STOP. Is that normal with the G08 command?
Whatever your G08 command is that is not the problem regarding stopping, you have created an endless loop. Some machines have a built in counter so that when this is done by mistake in a program the machine will break itself out.
Pressfit suggests a way a few posts earlier, put in the Block Delete command \. That is if your software understands it.
An open mind is a virtue...so long as all the common sense has not leaked out.
070521-1038 EST USA
Bohemund:
If you can test an external binary input, then an appropriate switched signal to the input will allow stopping the program.
On newer HAAS machines you can also test for keyboard input.
On your system do you have the capability called MACROS? Included in MACROS are functions like:
#100 = (a value) (a means to put some value in a variable)
#100 = #100 +1 (a means to count)
IF [ ... ] then (do something)
Since you do not have a GOTO I suspect you lack MACROS and all of their useful functions.
.
I'm still pretty new at GCode (less than 2 weeks) and don't mean to misstate anything about the CamSoft system I have, but I'm pretty sure that I do have the capability for macros as I've seen references to them in the user manual.
I'm still learning the syntax on how things are done compared to other systems on advice people give me but macros sound useful and will pursue more info about using them. I think that's also why the Block Delete / isnt working for me atm....syntax.
At the moment I have...
N00 G20 G91
N10 G01 X0.1 Y0.1 F30
N20 G08
N30 M97 P10
That gives me a good non-stop movement for driving my fixture (non-XY as previous examples). I tried putting in the /M30; M99; as referred with no success yet on needing to hit the E-STOP to stop my fixture.
Any other ideas?