RS274/NGC Differences
1. Changes from RS274/NGC
- Location after a tool change
-
In LinuxCNC, the machine does not return to its original position after a tool change. This change was made because the new tool might be longer than the old tool, and the move to the original machine position could therefore leave the tool tip too low.
- Offset parameters are ini file units
-
In LinuxCNC, the values stored in parameters for the G28 and G30 home locations, the P1…P9 coordinate systems, and the G92 offset are in "ini file units". This change was made because otherwise the meaning of a location changed depending on whether G20 or G21 was active when G28, G30, G10 L2, or G92.3 is programmed.
- Tool table lengths/diameters are in ini file units
-
In LinuxCNC, the tool lengths (offsets) and diameters in the tool table are specified in ini file units only. This change was made because otherwise the length of a tool and its diameter would change based on whether G20 or G21 was active when initiating G43, G41, G42 modes. This made it impossible to run G code in the machine’s non-native units, even when the G code was simple and well-formed (starting with G20 or G21, and didn’t change units throughout the program), without changing the tool table.
- G84, G87 not implemented
-
G84 and G87 are not currently implemented, but may be added to a future release of LinuxCNC.
- G28, G30 with axis words
-
When G28 or G30 is programmed with only some axis words present, LinuxCNC only moves the named axes. This is common on other machine controls. To move some axes to an intermediate point and then move all axes to the predefined point, write two lines of G code:
G0 X- Y- (axes to move to intermediate point) G28 (move all axes to predefined point)
2. Additions to RS274/NGC
- G33, G76 threading codes
-
These codes are not defined in RS274/NGC.
- G38.2
-
The probe tip is not retracted after a G38.2 movement. This retraction move may be added in a future release of LinuxCNC.
- G38.3…G38.5
-
These codes are not defined in RS274/NGC
- O-codes
-
These codes are not defined in RS274/NGC
- M50…M53 overrides
-
These codes are not defined in RS274/NGC
- M61..M66
-
These codes are not defined in RS274/NGC
- G43, G43.1
-
Negative Tool Lengths
The RS274/NGC spec says "it is expected that" all tool lengths will be positive. However, G43 works for negative tool lengths.
Lathe tools
G43 tool length compensation can offset the tool in both the X and Z dimensions. This feature is primarily useful on lathes.
Dynamic tool lengths
LinuxCNC allows specification of a computed tool length through G43.1 I K.
- G41.1, G42.1
-
LinuxCNC allows specification of a tool diameter and, if in lathe mode, orientation in the G code. The format is G41.1/G42.1 D L, where D is diameter and L (if specified) is the lathe tool orientation.
- G43 without H word
-
In ngc, this is not allowed. In LinuxCNC, it sets length offsets for the currently loaded tool. If no tool is currently loaded, it is an error. This change was made so the user doesn’t have to specify the tool number in two places for each tool change, and because it’s consistent with the way G41/G42 work when the D word is not specified.
- U, V, and W axes
-
LinuxCNC allows machines with up to 9 axes by defining an additional set of 3 linear axes known as U, V and W