CAD CAM EDM DRO - Yahoo Group Archive

Re: [CAD_CAM_EDM_DRO] Re: Re: Emc -- program problems

Posted by Jon Elson
on 2002-08-10 14:41:14 UTC
Gene wrote:

> I used the tutorial for text on circle on the vector site and here's
> what happened.
> EMC ini. settings--
> Task controller section
> task=minimilltask
> cycletime=.020
> interpreter section= rs274ngc
> parameter file=emc.var
>
> Vector NC section settings---
> contour = &normal mode
> cycle = 0
> driver = incremental coordinates x,y,z
> output G00,G01,G02,G03 modal
> show only changed x coordinates
> show only changed y coordinates
> show only changed z coordinates
> circular motion = incremental coordinates(I J (the rest of this line
> went off the screen)
> coordinate format = no plus sign
> decimal digits 6
> scale factor xyz-1
> initial position x0 y0 z2
> units = dialogdigits = 6
>
> here's the return-
> command(N16 X-0.030676 Y0.119846 Z0)called
> execute return 0
> read return 0
> line return 8
> command(N17 X-0.026933 Y-0.120741)called
> execute return 0
> read return 0
> line return 9
> command(N18 G02 X-0.063984 Y-0.030428 I-0.043921 J0.009797)called
> ERROR- radius to end of ark differs from radius to start
>
> Do you think there could be something wrong with my computer? Or maybe
> my EMC settings?

No, the G-code is wrong, if I didn't make a mistake in calculating it.

The position before the arc move is (X,Y) = ( -0.026933 , -0.120741 )
The pos at the end of the arc is ( -0.063984 , -0.030428 )

The center of the arc is the offset from the beginning position given in
the (I,J) words, and is -0.026933 + (-0.043921) = X = -0.070854
and -0.120741 + 0.009797 = Y = -0.110944

So, the center of the arc is at ( -0.070854 , -0.110944 ) If you draw these
3 points on graph paper, it is immediately obvious that the radii from the
start and end points to the center are NOT anywhere near equal, and so
EMC's complaint is completely valid. The start radius is
sqrt( 0.043921 ^2 + 0.009797^2) = 0.045000
or, to check our calculations,
sqrt((-0.026933 - (-0.070854))^2 + (-0.120741 - (-0.110944))^2) = 0.045000

the end radius is
sqrt((-0.063984 - (-0.070854))^2 + (-0.030428 - (-0.110944))^2) = 0.080809

Which is clearly different!

So, something went wrong in the generation of the G-code.
I think you want absolute coordinates in your Vector setup. It looks like
you have it set for incremental. Incremental can be useful in some special
cases, like subroutines you need to write by hand and include in the program.
But, incremental coordinates means every move is based on all previous
moves in the entire program, so it impossible to read an incremental program
and understand the coordinates. For instance, if you drill a hole at x=1",
then x=2", then x=3", the code will look like :
X1.0 G9xx
X1.0 G9xx
X1.0 G9xx
(G9xx meaning a canned cycle here)
but the point is that nowhere do the coordinates for X=2.0" and X=3.0"
appear in the program. With absolute coordinates, the program would look
like :
X1.0 G9xx
X2.0 G9xx
X3.0 G9xx
Which will be a lot easier to understand.

In this case, I suspect EMC was operating in absolute mode, but understood that
all I and J coordinates in G02 and G03 commands will be incremental. So, you probably
want to change the FIRST vector setup to absolute, but leave the circular set to
incremental.

Jon

Discussion Thread

Ray Henry 2002-08-09 11:10:23 UTC Re: Re: Emc -- program problems Gene 2002-08-10 13:54:51 UTC Re: [CAD_CAM_EDM_DRO] Re: Re: Emc -- program problems Jon Elson 2002-08-10 14:41:14 UTC Re: [CAD_CAM_EDM_DRO] Re: Re: Emc -- program problems