In order for a workpiece to be produced on a CNC machine, the control unit requires a programme. A CNC programme in accordance with DIN 66025 contains all the path and switching information as well as auxiliary commands required for machining and can be read by any CNC machine.
Image: Example of the sentence structure
Programme structure
A CNC programme in accordance with DIN 66025 consists of the programme number and blocks that describe the entire work sequence of the machine step by step. The individual blocks are processed one after the other from top to bottom. They are numbered consecutively, N1, N2, N3 ..., or in steps, e.g. N5, N10, N15 ... (N = number).
The controller reads several records in advance so that it can perform arithmetic operations. If records are numbered in jumps, further records can be inserted in between without changing the following record numbers.
Sentence structure
- Path conditions (G) that determine the type of movement, e.g. rapid traverse, linear or circular interpolation, plane selection, dimensioning type, corrections
- Geometric instructions (X, Y, Z, I, J, K ...) for controlling the slide movements
- Technological instructions (F, S, T) for defining the feed (F = feed), spindle speed (S = speed) and tool (T = tool)
- Switching commands (M) for machine functions such as tool change, coolant supply and programme end
- Cycle or sub-programme calls for frequently recurring programme sections
The meaning of the 1-digit travel conditions (G functions) is standardised in accordance with DIN 66025-2. Some numerical values are freely available to the control unit manufacturer.
The meaning of part of the switching function is also defined.
Route information
With most control units, the coordinate values are stored and effective. It is therefore not necessary to re-enter an unchanged value.
G95 means that the value programmed under F is executed as a feed in mm/revolution.

If G96 is programmed, the control unit regulates the speed of the work spindle so that the value programmed under S corresponds to the cutting speed vc.
With G97, the speed of the working spindle is constant. It corresponds to the value programmed under S.
G94 F200
Web speed 200 mm/min
Programming with absolute and incremental dimensions

Programming with polar coordinates

Image: Bolt hole circle with polar coordinates
Straight line interpolation
If the path condition G01 is programmed, the target point is approached at the programmed feed rate. The tolerance centre must be specified as the coordinate value.
Picture: Workpiece contour with polar coordinates
Circular interpolation
- Direction of rotation G02 clockwise or G03 anti-clockwise
- Coordinates of the target point (circle end point). These are always required, even if one of the target points of the circle is the same as the starting point.
- Position of the centre of the circle by specifying the centre point parameters or the radius
According to DIN, the coordinates I, J and K are used to specify the distance from the start of the circle to the centre of the circle M incrementally, even if the distance condition G90 (absolute dimension) has been programmed.

Programming of workpiece contours
The destination point to be approached is programmed as the coordinate value in each block.

The workpiece contour is usually programmed with absolute dimensions (G90).

In the Z direction, the end points of the straight lines and circles are programmed from the workpiece zero point.
In the case of a circle, the position of the centre point must also be specified with the coordinates I and K.







