# LinuxCNC G5.2

Instructions · `G5.2` · verification: source checked

G5.2 opens a NURBS data block in LinuxCNC. The lines between G5.2 and G5.3 define control points with optional weights, and the current position before the first G5.2 is taken as the first control point. Optional P and L words set control-point weights and the curve order, with defaults of 1 and 3.

## Specification

| Property | Value |
|---|---|
| Language | gcode |
| Code | G5.2 |
| Group | NURBS block |
| Syntax | G5.2 <P-> <X- Y-> <L-> |
| Dialect | LinuxCNC |

### Parameters

| Name | Description |
|---|---|
| P | Control point weight; default 1 if unspecified. |
| X | X coordinate for a NURBS control point. |
| Y | Y coordinate for a NURBS control point. |
| L | Parameter that determines the order of the curve; default 3 if unspecified. |

## Safety

- The document marks G5.2 and G5.3 as experimental and not fully tested.

## Study notes

- G5.2 opens the NURBS data block; G5.3 closes it.
- The current coordinate before the first G5.2 is always taken as the first NURBS control point.
- To set the weight for the first control point, program G5.2 P- without giving any X Y.
- Inside the block, control-point lines use X and Y with optional P weights.

## Sources

1. [G-Codes](https://linuxcnc.org/docs/html/gcode/g-code.html#gcode:g5.2-g5.3) (accessed 2026-10-26)

---

Source page: https://machineschema.com/instruction/gcode-g05-2  
JSON: https://machineschema.com/instruction/gcode-g05-2.json  
License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Cite Machine Schema and the original sources.
