On Wednesday 03 December 2014 07:34:59 John Thornton did opine And Gene did reply: > The default behavior for arc distance is incremental so for a given arc > you only have to change the start and end points to be correct. > > For example with the center of the arc at X0 Y0 and a 0.510 diameter > and starting at 180 and going CW to 90 the G code is: > G0 X-0.2550 Y0.0000 > G2 X0.0000 Y0.2550 I0.2550 J0.0000 > > If I move the center to X1 Y1 then the G code is: > G0 X0.7450 Y1.0000 > G2 X1.0000 Y1.2550 I0.2550 J0.0000 > > Notice that I and J remain the same and both the start point and the > end points change by the difference in center locations. > > JT
That "center locations" is a different concept to me I guess. And maybe that why I have such a hell of a time with g2/g3. My theory I have been using is to drive the machine (g1) to the start point of the arc. Like: g1 xstarting xpoint g1 ystarting ypoint xpoint += tooldia ypoint += tooldia g2 Xxpoint Yypoint I or Jtooldia dependent on quadrant. I am intending to do 90 degree arcs to round corners. The y coords are always negative as I had to put the homing contacts as a brass corner screwed to a flip it out of the way after use, hinged stop that will locate the end of the board. Its located arbitrarily near the center of the table in the x direction, and the front of the 1/4" tool, when zeroed and driven to touch the board is y = -.323" what I have now, with the g2 moves commented out, and a move AFTER the arc callthat shows a 45 degree angle line to put the tool at the end of the arc, a useless line of code if the arc works because it will already be at the end of the arc when that move is executed successfully. So I have a right corner sub and a left corner sub. o<rightC> sub ( to cut right corners ) (debug,RightC x_tmp=#<_x_tmp>) (debug,RightC y_tmp=#<_y_tmp>) (debug,RightC J=tdia=#<_tdia>) ( arcbuddy = G2 X0.2550 Y0.0000 I-0.0000 J-0.2550 starting @ X0.0000 Y0.2550 ) (G2 X[#<_x_tmp> + #<_tdia>] Y#<_y_tmp> J-#<_tdia>) o<rightC> endsub o<leftC> sub ( to cut left corners ) (debug,leftC x_tmp=#<_x_tmp>) (debug,LeftC y_tmp=#<_y_tmp>) (debug,LeftC tdia=#<_tdia>) ( arcbuddy = G2 X0.0000 Y0.2550 I0.255 J-0.0000 starting @ X-0.2550 Y0.0000 ) (G2 X#<_x_tmp> Y[#<_y_tmp> - #<_tdia>] I#<_tdia>) o<leftC> endsub With the G2 moves short circuited by (), the debugs are showing what I think should be the correct values, but it all goes boom with large errors if the G2 move is enabled. I'll step it to the first, right corner right now: Machine is at X-3.890 Y-.323 x_tmp = -3.635 passed to right sub y_tmp = -.5780 ditto tdia = .2550 It draws a line in the correct locations to join the start and end positions of the curve wanted. Stepping to the first left corner: Machine is driven to X-2.6400 Y-.5780 x_tmp = -2.385000 y_tmp = -.323000 tdia = .255000 But if I enable the G2 in RightC, and force step it, then the screen that LCNC was launched from will spit out this (reformatted for clarity): emc/task/emctask.cc 389: interp_error: Radius to end of arc differs from radius to start: start=(X-3.8900,Y-0.3230) center=(X-3.8900,Y-0.5780) end=(X-3.3800,Y-0.5780) r1=0.2550 r2=0.5100 abs_err=0.255 rel_err=50.0000% Radius to end of arc differs from radius to start: start=(X-3.8900,Y-0.3230) center=(X-3.8900,Y-0.5780) end=(X-3.3800,Y-0.5780) r1=0.2550 r2=0.5100 abs_err=0.255 rel_err=50.0000% Why it spit it out twice I have no clue but thats one attempt. So where have I failed in translating this to function anyplace the table can each? Is my start at curve start, goto end with what I tell G2, set radius at offset method AFU? FWIW, I also used the code straight out of arcbuddy but put a G91 in front of the G2, and a G90 after. Seemingly no effect on the error msg itself. [...] Thanks Big John. Cheers, Gene Heskett -- "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author) Genes Web page <http://geneslinuxbox.net:6309/gene> US V Castleman, SCOTUS, Mar 2014 is grounds for Impeaching SCOTUS ------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users