What's new
What's new

G-code using I & J

wcbob

Plastic
Joined
Feb 26, 2004
Location
Fullerton CA USA
Ok I am writing a program for school i would like to use I & J I took programming last year so I have forget how to use I & J here,s what I am tring to do (G02 X2.3750. Y4.1136 R.??) My start point is X0.0 Y4.75 I would like to use I & J so i could do a full circle with one line of code any help Thanks Bob
 
start X0.0 Y 2.375
Second G02X1.1875 Y2.0568 I0. J-2.375

Don't know about the .75 Dia circle - wouldn't begin to pass through those two points.

How about a 4.75 Dia, which is what is coded above.

J represents the radius size.
 
Couldn't you just use:
G2 I0. J-2.375
or
G2 I2.375 J0.
Depending on your starting point, and the departure direction?
Greg B.
 
Actually, when I or J = 0, they don't even need to be named in the line.

I= the incremental distance from the start of the radius, to the center of the radius on the X axis.

J= the incremental distance from the start of the radius, to the center of the radius on the Y axis.
 
Bob,
To figure the diameter of a circle that would fit between these two points I would take the difference between your start and end x coordinate and make that a horizontal leg of a right triangle and take the difference betweeen your y coordinates and make that the vertical leg of that same triangle. If you use those values and the good old calculation from Pathagorus (SP?) you can calculate the length of a hypotenuse for that triangle. That calculated distance is the greatest diameter to fit between your start and end point. In your case the horizontal leg equals 1.1875 and the vertical .3182. If you square both and take the square root of the sum of the two you would have a hypotenuse of 1.2294. In this case the radius of the circle is important and to find the greatest radius that will fit between your two points you will have to divide the hypotenuse by two yielding .6147. Guess what happens to the lengths of the other sides of the triangle. Yep, since trig is about ratio and porportion they halve, too, becomming .1591 and .5938. These will become your I and J values.To go clockwise from start to end using I and J in absolute and the maximum radius of .6147 (1/2 the hypotenuse)the program would go something like this:
G1X0Y2.375
G2X1.1875Y2.0568I.5938J-.1591
If your intent is to go 360 degrees around a circle returning to your start point but passing through your other defined location, as your second post indicates, you will have to make a little code adjustment. Now your program to go from the start point, back to the start point, through the second coordinate, in a clockwise direction will look like this:
G1X0Y2.375
G2I.5938J-.1591
Listing the end point of the circle isn't normally required if it is equal to the start point.Hope that helps.
 
It seems to me that the difference between his start point and end point would be his diameter if he is planning on making his circle between these points. :confused:

Roy
 
G01X0Y2.375
G02X1.1875Y2.0568I0.4824J-0.5743
G02X1.2327Y1.8003I-0.7048J-0.2565
G02X0.Y2.375I-0.75J0.


just one example of a circle with a .75R will go thru specified points

infinite # of R/dia. will pass thru those two points
 
True, but the original poster said .75 diameter, which fits between the two points with plenty of room to spare.

Then he retracted that.

Then he faded out.

I don't have a clue what he really wanted to accomplish.
 
run my program and measure the hole. that will be the diameter that fits. ;)
 








 
Back
Top