Looking at the code, I see (rs274ngc/interp_o_word.cc: 862) appears to be
where the message is generated.

Your error message is:
9:duplicate O-word label - already defined in line 29: 'O200
IF[#<selected_tool>
GT 0]'
This is saying that on line 9 of the current file there is a definition of
O200 and that this has previously been defined on line 29.
Line 9 has the text: 'O200 IF...'

You will see later in the source file (line 870) there is a line:
logOword("executing
forward: [%s] in 'if'", block->o_name);
logOword causes logging if the EMC_DEBUG_OWORD flag is set. The macro
logOword is sprinkled through out the oword code to enable debugging of
what's going on.

There are similar macros (defined in rs274ngc.hh) for logging other aspects
of the interpreter. If you enable the right flags, you can get a lot of
insight into what is happening. The log messages tell what source code file
and line within the file produced the message.

Deciding what logging should be put into the code as it is being written is
tough. You don't want too many lines in the log, but you would like enough.
In tracking down a bug, it is sometimes useful to add more messages.

BTW: you can see my footprints all over this code. Just grep for !!!KL --
that's something I put into comments for code that could use more
attention. So, you will see //!!!KL -- TESTME or //!!!KL -- FIXME is
sprinkled through a few files in the interpreter. It would be nice if
someone got rid of the ones that aren't relevant and fixed the ones that
are.

[Sorry if this seems disorganized. I think I answered Andy's question, but
went around the block a few times doing it.]

Regards,

Ken


On Wed, Aug 5, 2015 at 6:41 PM, andy pugh <bodge...@gmail.com> wrote:

> On 5 August 2015 at 18:07, Kenneth Lerman <ler...@se-ltd.com> wrote:
> > I've seen a similar thing happen when I call a subroutine using MDI.
> First
> > I call it. That's not a problem. I call it again. That's not a problem. I
> > see that it isn't working properly for some reason and I edit the file --
> > adding or removing a line someplace. Then I call the sub again. Now,
> some o
> > word has a different line number. That is detected by the interp and an
> > error is generated. I call the sub a 4th time and it works properly. I'm
> > not sure if this just occurs with sub lines or other o word lines, too.
>
>
> The problem I am seeing is with an O-IF and it happens every time,
> without any changes to the G-code.
>
> When you say "enable tracing" what exactly do you mean?
>
>
> --
> atp
> If you can't fix it, you don't own it.
> http://www.ifixit.com/Manifesto
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Emc-developers mailing list
> Emc-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-developers
>



-- 
Kenneth Lerman
55 Main Street
Newtown, CT 06470
------------------------------------------------------------------------------
_______________________________________________
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to