Smithy CNC Mills User Manual
Page 12

SmithyCNC Programmer’s Reference Manual:Language Overview
SmithyCNC Programmer’s Reference Manual: Language Overview
1-8
1.6 Repeated Items
A line may have any number of G words, but two G words from the same modal
group (see Section [sec:Modal-Groups]) may not appear on the same line.
A line may have zero to four M words. Two M words from the same modal
group may not appear on the same line.
For all other legal letters, a line may have only one word beginning with that
letter.
If a parameter setting of the same parameter is repeated on a line, "#3=15
#3=6", for example, only the last setting will take effect. It is silly, but not
illegal, to set the same parameter twice on the same line.
If more than one comment appears on a line, only the last one will be used;
each of the other comments will be read and its format will be checked, but it
will be ignored thereafter. It is expected that putting more than one comment
on a line will be very rare.
1.7 Item order
The three types of item whose order may vary on a line (as given at the begin-
ning of this section) are word, parameter setting, and comment. Imagine that
these three types of item are divided into three groups by type.
The first group (the words) may be reordered in any way without changing the
meaning of the line.
If the second group (the parameter settings) is reordered, there will be no
change in the meaning of the line unless the same parameter is set more than
once. In this case, only the last setting of the parameter will take effect. For
example, after the line "#3=15 #3=6" has been interpreted, the value of
parameter 3 will be 6. If the order is reversed to "#3=6 #3=15" and
the line is interpreted, the value of parameter 3 will be 15.
If the third group (the comments) contains more than one comment and is
reordered, only the last comment will be used.
If each group is kept in order or reordered without changing the meaning of the
line, then the three groups may be interleaved in any way without changing the
meaning of the line. For example, the line "g40 g1 #3=15 (foo) #4=-7.0" has
five items and means exactly the same