CAD CAM EDM DRO - Yahoo Group Archive

Re: G-code user variables; convention? Tokens, PARSERS, Digitizers

on 2001-01-06 16:29:12 UTC
Hi Ballendo,

Your email down for a while? Comments below.


ballendo@... wrote:
>
> Alan,
>
> (snips, inserts below)
>
> >If variables are preceded with a #, then #MyVariable could be
> >distinguished from a 'M', for example. Shouldn't be that hard. Is
> >this useful? reasonable?
>
> Yes.
>
> >Otherwise, a "separator" (white space), or the start of a numeric
> field could be used, and "words" would have to be "whole" (Avar7
> would NOT be recognized as 'A'). Other ideas?
>
> Make sure that white space is INCONSEQUENTIAL, if you want to keep to
> the 274 standard. And please do think about using a technique which
> minimises time necessary to determine (from the controls' perspective)
> what to do next...
>
> >CNCpro uses V0 - V100 e.g., "V59=2.34", although I really didn't
> >want to copy him!
> >Alan
>
> Why not?!?! If you do, your program becomes compatible with his and
> any programs written for CncPRO will ALSO run (without modification)
> on your control program! Don't be afraid to compete! You may offer us
> something better, and keeping it compatible with what we're used to
> is just good business sense!
>
> If you don't, you've just introduced ANOTHER flavor of Gcode!?!
>
> THIS IS ONE REASON WHY WE HAVE SUCH CONFUSION RE: GCODE! If it ain't
> broke...
>
> Think about it, the V word in 274 refers to a secondary linear axis,
> parallel to Y. Not a typical machine configuration... The use of word-
> address format in the command is consistent with 274D conventions,
> and will already be supported in your parser. Find a V, look for a
> number. If you find a number, look for an = . If no =, look in the
> var array for the param. Find it? Yes. Use it. No? flag and error. If
> you find an =, look for a number, and if found plug it into the
> variable array; if not flag and error.

Actually, if I go to variables, I'll need to put in an expression
evaluator, much like 'C' or any language compiler/interpreter uses. I
use a very simple GetToken, and a sscanf() to do most of my parsing (I
cheat).

Watch for a mm to inch conversion program to be posted for one of our
List members, SOON! It is based on the same parser code, and an hour or
two's work.

Alan KM6VV


>
> It's simple. It works. It's not 'protected'. IMO, use it! If you're
> concerned about 'taking' his customers, realise HE benefits by being
> compatible with YOUR customers! Capitalism; may the best product win!
> (unfortunately it too often is the best PROMOTED product :-( ... )
>
> Hope this helps.
>
> Ballendo
>
> P.S. The syntax could be as CncPRO, but with the # instead of the V.
> You 'could' even allow the setup to SPECIFY an acceptable VAR 'word'.
> This would allow you to be 'different', but 'compatible'.
>

Discussion Thread

Alan Marconett KM6VV 2001-01-06 16:29:12 UTC Re: G-code user variables; convention? Tokens, PARSERS, Digitizers