Reading at: http://www.linuxcnc.org/docs/html/gcode_main.html#r1
I found mention of "global named parameters" and "Sequences like #<named parameter> are replaced by the value of the named parameter." Under the heading "1 G Code Reference" named parameters are not offered, though: >>> A real value may be : ... * A parameter value, #88 ... <<< I finally found a buried reference here: >>> 3.6 Computing values in O-words In O-words, Parameters (section [->]), Expressions (section [->]), Binary Operators (section [->]) and Functions (table [->]) are particularly useful. <<< May I propose an entry for "1 G Code Overview" in the gcode_main.html table of contents, linking to http://www.linuxcnc.org/docs/html/gcode_overview.html ? It would be a very useful asset, I think. >From the example showing that the first assignment to a named parameter is its declaration, I infer that a named parameter is not constrained to be a synonym for one of the 5399 numbered parameters of the virtual machine which EMC2 emulates. (That's a relief. :-) It was a shock to read that the line: #3=6 G1 x#3 causes a move of 15, if #3 had most recently been assigned that value in a prior program line. In the section "3.5 Don't put too many things on one line" is there then merit in changing: >>> Similarly, don't use and set a parameter on the same line, even though the semantics are well defined. (Exception: Updating a variable to a new value, such as #1=[#1+#2]) <<< to: >>> Similarly, don't set a parameter, then use it on the same line, because assigments do not take effect until the next line. This assignment postponement means that the following two lines have identical effect: #3=6 G1 x#3 (Possibly smash into workpiece or fixture,) G1 x#3 #3=6 ( if e.g. #3 holds the value 40. ) And since #3=6 #5=[2*#3] similarly assigns 80, not 12, to #5 in this case, it is safest to place only one assignment on a line. <<< In the current text, "use and set" is actually not a problem, because that order is not affected by assignment postponement. Thus, "#1=[#1+#2]" is not an exception, because it doesn't attempt to utilise the result of a prior assignment on the same line. (Not least because there is only a single assignment. ;-) Hopefully my beginner's brain has got that sufficiently right for the suggestions to be useful. :-) Regards, Erik -- Do not do unto others as you would they should do unto you. Their tastes may not be the same. -- George Bernard Shaw ------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensign option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users