Manual Part Programming
In manual part programming, the programmer prepares the NC code using the low-level machine language (G-M Codes).
Manual part programming can be used for both point-to-point and contouring jobs. It is most suited for point-to-point machining operations such as drilling. It can also be used for simple contouring jobs, such as milling and turning when only two axes are involved.
Instruction in Word Address Format
Instructions in word address format consist of a series of words, each identified by a prefix label (Address). In our coverage, statements are illustrated with dimensions in mm. The values are expressed in four digits including one decimal place. For example, X020.0 means x = 20.0mm.
In preparing the NC part program, the part programmer must initially define the origin of the coordinate axes (Part Program Zero) and then reference the succeeding motion commands to this axis system. This is accomplished in the first statement of the part program. The directions of the x-, y-, and/or z-axes are predetermined by the machine tool configuration, but the origin of the coordinate system can be located at any desired position.
The part programmer defines this position relative to some part feature that can be readily recognized by the machine operator. The operator is instructed to move the tool to this position at the beginning of the job. With the tool in position, the G92 code is used by the programmer to define the origin as follows:
G92 X0 Y-050.0 Z010.0;
Where the x, y, and z values specify the coordinates of the tool location in the coordinate system, in effect, this defines the location of the origin. In some CNC lathes and turning centers, the code G50 is used instead of G92. Our x, y, and z values are specified in mm, and this would have to be explicitly stated.
Thus, a more-complete instruction block would be the following:
G21 G92 X0 Y-050.0 Z010.0;
Where the G21 code indicates that the subsequent coordinate values are in mm.
N.B. Codes are not standard for all machine tools.
Motion Commands
Motions are programmed by the codes G00, G01, G02, and G03. G00 is used for a point-to-point rapid traverse movement of the tool to the coordinates specified in the command; for example,
G00 X050.0 Y086.5 Z100.0;
specifies a rapid traverse motion from the current location to the location defined by the coordinates x=50.0mm, y=86.5mm, and z=100.0mm. This command would be appropriate for NC drilling machines in which a rapid move is desired to the next hole location, with no specification on the tool path. The velocity with which the move is achieved in rapid traverse mode is set by parameters in the MCU and is not specified numerically in the instruction block. The G00 code is not intended for contouring operations.
Linear interpolation mode is accomplished by the G01 code. This is used when it is desired for the tool to execute a contour cutting operation along a straight line pat. For example, the command
G01 G94 X050.0 Y086.5 Z100.0 F40 S800 ;
specifies that the tool is to move in a straight line from its current position to the location defined by x=50.0mm, y=86.5mm, and z=100.0mm, at a feed rate of 40mm/min and spindle speed of 800 rev/min.
The G02 and G03 codes are used for circular interpolation, clockwise and counter-clockwise, respectively. Circular interpolation on a milling machine is limited to one of three planes, x-y, x-z, or y-z. Selection of the desired plane is accomplished by entering one of the codes, G17, G18, or G19, respectively. Thus, the instruction
G02 G17 X088.0 Y040.0 R028.0 F30 ;
moves the tool along a clockwise trajectory in the x-y plane to the final coordinates defined by x=88mm and y=40mm at a feed rate of 30 mm/min. The radius of the circular arc is 28mm. The path taken by the cutter from an assumed starting point (x=40, y=60) is illustrated in the following figure.










