G-code using I & J

Thread: G-code using I & J

1. Plastic
Join Date
Feb 2004
Location
Fullerton CA USA
Posts
24
Post Thanks / Like
Likes (Given)
0
0
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

2. Plastic
Join Date
Feb 2004
Location
Fullerton CA USA
Posts
24
Post Thanks / Like
Likes (Given)
0
0
typed wrong cords.

start X0.0 Y 2.375
Second X1.1875 Y2.0568

would like a .75 dia circle between those points

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

4. Plastic
Join Date
Feb 2004
Location
Fullerton CA USA
Posts
24
Post Thanks / Like
Likes (Given)
0
0
I reliezed after I posted the dia would NOT work how do i figure out the dia of a cicrle to fit between those two points

5. pi
Stainless
Join Date
Jan 2005
Location
Posts
1,684
Post Thanks / Like
Likes (Given)
0
2
start X0.0 Y 2.375
Second X1.1875 Y2.0568
G91 X0. Y0. I[1.188/2] J[[2.0568-2.376]/2]
G90

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

7. Diamond
Join Date
Mar 2004
Location
Waukesha, WI
Posts
7,496
Post Thanks / Like
Likes (Given)
701
1816
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.

8. Junior Member
Join Date
Feb 2004
Location
Fullerton, CA, USA
Posts
4
Post Thanks / Like
Likes (Given)
0
0
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.

9. Aluminum
Join Date
Feb 2005
Location
Posts
83
Post Thanks / Like
Likes (Given)
0
0
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.

Roy

10. I'm not sure any of us really understood the question.

11. Cast Iron
Join Date
Jun 2002
Location
Corry,PA,USA
Posts
483
Post Thanks / Like
Likes (Given)
2
3
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

12. True, but the original poster said .75 diameter, which fits between the two points with plenty of room to spare.

Then he retracted that.

I don't have a clue what he really wanted to accomplish.

13. pi
Stainless
Join Date
Jan 2005
Location
Posts
1,684
Post Thanks / Like
Likes (Given)
0
2
run my program and measure the hole. that will be the diameter that fits.

14. Plastic
Join Date
Feb 2004
Location
Fullerton CA USA
Posts
24
Post Thanks / Like
Likes (Given)
0
0
thanks for all your help I figured it out thanks scott for the math help see you tuesday Bob

Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•