G-code overview – Smithy CNC Mills User Manual
Page 17

SmithyCNC Programmer’s Reference Manual:G Codes
SmithyCNC Programmer’s Reference Manual: G-Codes
2-2
G-CODE OVERVIEW
G codes of the RS274/NGC language are shown in Table 5and described follow-
ing that.
In the command prototypes, the hypen (-) stands for a real value. As described
earlier, a real value may be (1) an explicit number, 4, for example, (2) an
expression, [2+2], for example, (3) a parameter value, #88, for example, or (4)
a unary function value, acos[0], for example.
In most cases, if axis words (any or all of X-, Y-, Z-, A-, B-, C-) are given, they
specify a destination point. Axis numbers are in the currently active coordinate
system, unless explicitly described as being in the absolute coordinate system.
Where axis words are optional, any omitted axes will have their current value.
Any items in the command prototypes not explicitly described as optional are
required. It is an error if a required item is omitted.
In the prototypes, the values following letters are often given as explicit num-
bers. Unless stated otherwise, the explicit numbers can be real values. For
example, G10 L2 could equally well be written G[2*5] L[1+1]. If the value of
parameter 100 were 2, G10 L#100 would also mean the same. Using real values
which are not explicit numbers as just shown in the examples is rarely useful.
If L- is written in a prototype the "-" will often be referred to as the "L number".
Similarly the "-" in H- may be called the "H number", and so on for any other
letter.
2.1 G0: Rapid Linear Motion
For rapid linear motion, program G0 X- Y- Z- A- B- C-, where all the axis words
are optional, except that at least one must be used. The G0 is optional if the
current motion mode is G0. This will produce coordinated linear motion to the
destination point at the current traverse rate (or slower if the machine will notgo
that fast). It is expected that cutting will not take place when a G0 command is
executing.
It is an error if:
* all axis words are omitted.
If cutter radius compensation is active, the motion will differ from the above;
see Chapter [cha:Cutter-Radius-Compensation]. If G53 is programmed on the
same line, the motion will also differ; see Section [sub:G53:-Move-in].