I’m guessing the literals 0.125 in the G-Code program represent the tool size? Can't quite figure out what parameter is the diameter of the hole. John
> -----Original Message----- > From: Todd Zuercher [mailto:to...@pgrahamdunn.com] > Sent: September-24-19 10:19 AM > To: Enhanced Machine Controller (EMC) > Subject: Re: [Emc-users] G-Code issue with IJ > > I had taken the time to work out an approximation of a spiral using IJ arcs > using parametric code for a Fanuc machine once. > > Here is what I had. > % > #100=0.07 (LOOP OVERLAP SIZE) > #103=100. (FEED RATE) > N1G00G17G20G28G40G80G91Z0M5 > G90 > G52X#107Y#106Z0 > G8P1 > M8 > (1/4" O-FLUTE UP) > G28G91Z0M05 > G90T2002M06 > T102 > M03S14000 > > (1st pocket) > #101=1.425 (X POSITION) > #102=1.925 (Y POSITION) > #104=[#100/4] > #105=0.125+#104 > G0G17G55X[#101]Y[#102+0.125] > G0G43 H2 Z1.0 > G1Z0.25F#103 > G3I0J-0.125Z0.2 > G3I0J-0.125Z0.15 > G3I0J-0.125Z0.1 > G3I0J-0.125Z0.05 > G3I0J-0.125 > N30WHILE[#105 LT 1.25]DO1 > G3 X[#101-#105] Y[#102] I-0.005 J[0.005-#105] F#103 > #105=#105+#104 > G3 X[#101] Y[#102-#105] I[#105-0.005] J-0.005 > #105=#105+#104 > G3 X[#101+#105] Y[#102] I0.005 J[#105-0.005] > #105=#105+#104 > G3 X[#101] Y[#102+#105] I[0.005-#105] J0.005 > #105=#105+#104 > END1 > > Todd Zuercher > P. Graham Dunn Inc. > 630 Henry Street� > Dalton, Ohio 44618 > Phone:� (330)828-2105ext. 2031 > > -----Original Message----- > From: John Dammeyer <jo...@autoartisans.com> > Sent: Tuesday, September 24, 2019 12:34 PM > To: 'Enhanced Machine Controller (EMC)' <emc- > us...@lists.sourceforge.net> > Subject: Re: [Emc-users] G-Code issue with IJ > > > On 09/23/2019 10:35 PM, Chris Kelley wrote: > > > > > > > > > I suspect the problem lies in the method for calculating CentDist on > > > line 148. I'm not sure that method actually produces a I or J > > > coordinate that is equidistant from both the start of the arc and > > > end of the arc, regardless of decimal precision. > > > > > > > > OK, I have to admit that I have only used this program in the R arc > > mode, so it is possible I screwed up the I J calculation. It is not a > > true spiral, it is a set of 90 degree arcs with the radius increasing > > slightly every segment. I've used this for 20 years in the R mode > > with good results, though. > > > > Jon > > Hi Jon, > It works perfectly in the R mode for me too. And with MACH3 even in the IJ > mode without complaint. But LinuxCNC is correct when it reports that the > Radius is different between the start and end positions by up to as much as > 24 percent. > > Doing it by hand and trial and error I was able to do 90 degree arcs like the > R > mode but the exact calculations to get there still escapes me. I think partly > because I was not using the center of the hole as the starting position. For > the Mecsoft AlibreCAM example I put the workspace origin in the hole > center so I could see the symmetry for positive and negative movements. > But of course your program has an offset called starting x and y which is more > logical if we're working off a drawing and positioning the tool bit at the > center > of each round pocket (hole). > > What I'm trying to do, and it's really a complete waste of time for me since > AlibreCAM does it for me, is figure out how to modify your program to > properly generate the IJ values. I don't like not knowing. I'll be able to > get > back to this later this afternoon. > > But do notice from the attached screen shot there's a 1" radius circle and > then three quarters of a spiral starting at the same spot. The first two I,J > parameters have one each set to 0 as your program does. But the third 90 > degree arc now adds in the -0.05 width of cut offset into I while J has > incremented by 0.05. So the state machine that determines I and J has to be > a bit more complicated. It's doable. Just not sure how yet. > > John > > > > > > _______________________________________________ > > Emc-users mailing list > > Emc-users@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/emc-users > > _______________________________________________ > Emc-users mailing list > Emc-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/emc-users _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users