Hello Guest it is March 19, 2024, 12:25:49 AM

Author Topic: M98 subroutine L-word doesn't call subroutine correct number of times  (Read 7933 times)

0 Members and 1 Guest are viewing this topic.

Offline Chip

*
  • *
  •  2,055 2,055
  • Gainesville Florida USA
    • View Profile
Re: M98 subroutine L-word doesn't call subroutine correct number of times
« Reply #10 on: November 25, 2009, 02:22:42 PM »
Hi, ALL

Thanks for the comments, All in All if we don't post questions and concerns and try to help others, Nothing would ever get fixed.

Hears a question I asked Brian on the yahoo site.

Re: M98 or G-code Loader/Interpreter "Question"

Hi, Brian

One more Look, It's missing the leading numbers values in Two of the "O" lines.

G80 G90
M98 P30 L1
G01 Z0
M30
%

O0300 (Doesn't CUT'S THIS "OK" G code Interpreter is seeing the extra trailing
caricter "0")

G01 Z-.25 F20
G01 X1
G01 Y-1
G01 X0
G01 Y0
M99

O030 (CUT'S THIS THIRD "WHY" Should be rejected, G code Interpreter is missing
the leading "0")

G01 Z-.25 F20
G01 X-1
G01 Y1
G01 X0
G01 Y0
M99

O0030 (CUT'S THIS SECOND "WHY" Should be rejected, G code Interpreter is missing
the leading "0"es)

G01 Z-.25 F20
G01 X1
G01 Y1
G01 X0
G01 Y0
M99

O30 (CUT'S THIS FIRST "OK" This is the only one that should be executed)

G01 Z-.25 F20
G01 X-1
G01 Y-1
G01 X0
G01 Y0
M99

%


Are these rejected in the "New Versions" ?

Just Hunting Bug's, Chip

Re: M98 subroutine L-word doesn't call subroutine correct number of times
« Reply #11 on: November 25, 2009, 03:05:46 PM »
You should not expect the G-code interpreter to distinguish between "30", "030", "0030", "0000000030", etc.  The argument to G98 is simply a numeric value, and all of those evaluate to "30", so *should* be seen as identical to the interpreter.  If you write code *expecting* the interpret to distinguisjh between those, you *will* have problems, as that behavior will be very much dependant on the specific interpreter, and will likely vary from machine to machine.  If the interpreter DID distinguish between those, I would consider that a bug in the interpreter.

Regards,
Ray L.
Regards,
Ray L.

Offline alenz

*
  •  137 137
    • View Profile
Re: M98 subroutine L-word doesn't call subroutine correct number of times
« Reply #12 on: November 25, 2009, 04:46:47 PM »
This will all become somewhat moot shortly, when Mach3 V4 comes out - It will use a completely new and different G-code parser, and will accept *only* () for comments.

Regards,
Ray L.

Hi Ray,
True, but until Rev 4 is released, we must live with what we have now and need to understand its idiosyncrasies.
Al

Offline Chip

*
  • *
  •  2,055 2,055
  • Gainesville Florida USA
    • View Profile
Re: M98 subroutine L-word doesn't call subroutine correct number of times
« Reply #13 on: November 26, 2009, 12:03:35 AM »
Hi, Ray

I guess it's to much to expect a few String's in a G code interpreter or a few more Error warnings, I still have my caveman outfit, Didn't think it would be that big-a deal and don't remember so many issues in earlier versions of Mach3.

Thanks, Chip
Re: M98 subroutine L-word doesn't call subroutine correct number of times
« Reply #14 on: November 26, 2009, 12:32:41 AM »
Hi, Ray

I guess it's to much to expect a few String's in a G code interpreter or a few more Error warnings, I still have my caveman outfit, Didn't think it would be that big-a deal and don't remember so many issues in earlier versions of Mach3.

Thanks, Chip

Part of the problem with Mach3 is it's tried to be all things to all people, and in some cases, did not follow standards, or followed multiple standards.  I think this is one of the latter.  The G-code parser has also become rather tangled over the years, making it difficult to maintain, and probably a bit quirky, as you're seeing.  For V4, Brian is using a completely new parser that will be much easier to maintain and extend if necessary, and he is following a very well documented and published syntax, so there will be NO ambiguity.  It will also be thoroughly tested by a true expert.  In terms of consistency and reliability, it should be a big step up.

Regards,
Ray L.
Regards,
Ray L.