Re: G-code help



Hassan

I wondered if that little move back was for measuring.  Can we get a copy 
of the comparison paper when it's finished?  

If the fanuc code was "G03 I-1.9685 J0" and you tried to run it without 
modification on the EMC you will get an error message that says, 
"emctask.cc 245: rs274ngc_error: All axes missing with motion code."  

While the fanuc may assume current position for the endpoint if (I,J) 
words are encountered without any axis words, the EMC requires at least 
one axis position for endpoint or it will trip up on g01, g02, or g03.

I'm also going to assume that you wanted the little move back along x to 
be to push the renishaw against the ballbar.  If that's the case you want 
a positive going (I) value since it is incremental.  So I rewrote your 
program for dual circles both clockwise and counterclockwise and added 
just a bit of z offset between each so that I could see all four circles 
with backplot.  

(Ray's mod to Hassan's program, take two)
n90    (Ray's modifications to Hassan's program take 2)
n100    G90
n110    G17
n120    F10
n130    G01 X-2.0275 Y0.0 Z0.0
n140    z-0.25
n150    (M00)
n160    G01 X-1.9685 Y0.0
n170    G03 x-1.9680 I 1.9685 j0
n180    g1 z-0.5
n190    G03 x-1.9680 I 1.9685 j0
n200    G01 X-2.0275 Y0.0
n210    (M00)
n220    z-0.75
n230    G01 X-1.9685 Y0.0
n240    G02 x-1.9680 I 1.9685 j0
n250    g1 z-1
n260    G02 x-1.9680 I 1.9685 j0
n270    G01 X-2.0275 Y0.0
n280    M30
n290

Attached is the plot that this program made.  You should be able to 
remove the z offsets and have it work for the test.

Hope this helps

Ray
 

On Monday 16 September 2002 11:55 pm, you wrote:
> Thanks Ray,
> I guess there were something wrong with that code.
> I changed the code because it was not working as is, but when I changed
> it I forgot that I am in the
> absolute mode. but the intention from the replicate G03 is to make two
> circles.
> so the original code (that worked just fine on a commercial machine
> with GE Fanuc controller) was
> G03 I-1.9685 J0
> as io told you ...the intention is to make a CCW circle that begins and
> ends in the same place
> and the reason that am using this method ( not simple four arcs) is
> because am testing the same machine with different controllers;
> the original one that comes with the machine, and the EMC, using a
> Ballbar that I got from Renishaw Inc.
> so by using a four arcs instead of full connected circle, I will get a
> fault results of maybe a backlash or reversal spikes.
> Does the EMC accept the code above???...I tried it ...but it did not
> work, so, I thought that there must be an X and a Y  values...so I
> added a zero values...forgetting that its an absolute mode..
> my Question again...does EMC accepts the code above
>
> Hassan
>
> ----- Original Message -----
> From: "Ray Henry" <rehenry-at-up.net>
> To: "Multiple recipients of list" <emc-at-nist.gov>
> Sent: Monday, September 16, 2002 11:02 PM
> Subject: 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

snapshot2.png



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

Problems or questions? Contact