Axis Naming Conventions

Axis names may be any of the following single-character names:

A

a

B

b

C

c

D

d

U

u

V

v

W

w

X

x

Y

y

Z

z

All other single-character names are reserved for either G-code programming or for future use, including E/e, F/f, G/g, H/h, I/i, J/j, K/k, L/l, M/m, N/n, O/o, P/p, Q/q, R/r, S/s, and T/t. In addition to the valid single-character names listed above, most names that match the following regular expression are valid axis names.

[A-Za-z_][A-Za-z0-9_]+

The above regular expression means that an axis name must follow the following rules:

  • It must start with a letter or underscore.

  • After the first letter/underscore, it must be followed by one or more letters, numbers, or underscores.

In addition to the valid axis names outlined above, there are some further restrictions. Axis names may not match any of the Reserved Keywords of the language. No two axes on the controller can be named the same. In addition, if the name of an axis contains a number, there may not be another axis in the system whose name is a substring of that name. See the following example for the reasoning.

// Consider if axes X and X2 exist in the system
// The following line is ambiguous (could be interpreted as X(250) or

// as X2(50))
G1X250

Axis names may still contain a number as long as the substring restriction mentioned previously is followed. For example, the controller may consist of axes named X1 and X2 as long as no axis with the name X exists on that controller.

An axis name cannot end with the character F or f if there are any other axes on the controller whose name is the same without the ending F or f character. For example, if an axis on the controller is named MyAxis, then another axis cannot be named MyAxisF.

Axis names are case-sensitive, meaning that the names “X” and “x” refer to different axes.