Re: G-code help




Hassan

I set debug level in the ini as below and started the EMC in a terminal 
so that I could read the feedback.

; Debug level, 0 means no messages. See emc/src/emcnml/emcglb.h for others
; DEBUG =                 0x00000003
DEBUG =               0x7FFFFFFF

When I ran your program, this is what I got.

[
emcTaskPlanLine() returned 8
emcTaskPlanCommand(G03 X0.0 Y0.0 I-1.9685 J0) called. (line_number=8)
emctask.cc 245: rs274ngc_error: Radius to end of arc differs from radius 
to start
Radius to end of arc differs from radius to start
rs274ngc_stack:          - arc_data_ijk  - convert_arc2  - convert_arc  - 
convert_motion  - convert_g
]

You will notice that in your file this was line 7.  I added a comment 
line to the beginning of the text.

(Hassan's program that doesn't work for him)
> G90
> G17
> F10
> G01 X-2.0275 Y0.0 Z0.0
> M00
> G01 X-1.9685 Y0.0
> G03 X0.0 Y0.0 I-1.9685 J0
> G03 X0.0 Y0.0 I-1.9685 J0
> G01 X-2.0275 Y0.0
> M00
> G01 X-1.9685 Y0.0
> G02 X0.0 Y0.0 I-1.9685 J0
> G02 X0.0 Y0.0 I-1.9685 J0
> G01 X-2.0275 Y0.0
> M30

When you begin line seven you are at -1.9685 in x and you want to create 
an arc that ends at 0.  In order to do that, the radius, in this case (I) 
would have to be 1/2 the distance to the end point or  0.98425.  Notice 
that since you are minus and you want to move positive to zero the (I) 
has to point in the positive direction.

When you begin line eight you are at 0 in x so if you want to continue 
the arc into a full circle you would need to edit both the endpoint in x 
and the (I) value as follows.

g3 x-1.9685 y0 I--0.98425 j0

Notice again that since you are at zero and you want to go minus to  
-1.9685 the I value now has to point in the minus direction.

A similar edit has to be performed for the second pair of arcs.  My best 
guess at what you wanted is

(Ray's remodel of Hassan's program)
G90
G17
F10
G01 X-2.0275 Y0.0 Z0.0
(M00)
G01 X-1.9685 Y0.0
G03 X0.0 Y0.0 I 0.98425 j0
G03 X-1.9685 Y0.0 I -0.98425 j0
G01 X-2.0275 Y0.0
(M00)
G01 X-1.9685 Y0.0
G02 X0.0 Y0.0 I 0.98425 J0
G02 X-1.9685 Y0.0 I-0.98425 J0
G01 X-2.0275 Y0.0
M30

Notice also that I commented out the m00's so that I didn't have to keep 
pressing s.  I believe that this ran for me here and made the same circle 
twice once counterclockwise and once clockwise.

If you had some other geometry in mind, get back to us.

Ray




Date Index | Thread Index | Back to archive index | Back to Mailing List Page

Problems or questions? Contact