How to carryout Part Programming in CNC Machine?


Part Programming in CNC Machine

Part program is an important component of the CNC system. Part program is a set of instructions which instructs the machine tool about the processing steps to be performed for the manufacture of a component.

Part programming is the procedure by which the sequence of processing steps and other related data, to be performed on the CNC machine, is planned and documented. The part program used in NC/CNC Machine consists of Numerical words which are as follows:

(a) Sequence Number (N- Word). The first word in every block is the sequence number. These sequence number is used to identify the block. The sequence number is preceded by word N and is written as N 0001, N 0002, N 9999, etc. The program is executed from lowest block number to highest unless instructed otherwise. It is customary to start with block No. 0001 or 0010 and proceed in steps of 5 or 10, so that accidentally omitted block may be inserted easily.

(b) Preparatory Function (G- Words). The preparatory word prepares the control unit to execute the instructions that are to follow. The preparatory function is represented by two digits preceded by G i.e. G00 … G99. The preparatory function enables the controller to interpret the data which follows and it precedes the coordinate words. For example G01 is used to prepare the controller for linear interpolation.

(c) Coordinates (X, Y and Z Words). These words give final coordinate positions for X, Y, Z motions. In two-axis CNC system only two- coordinate words would be used. To specify angular positions around the three-coordinate axis additional, i.e. A-word and B-word, are used. In addition, the words I, J, K, are used to specify the position of arc centre in case of circular interpolation. Different CNC systems use different formats for expressing coordinates of a point. In some systems, the decimal point is not coded but the control system automatically provides a decimal point at a pre- set position. But in such cases leading zeros may have to be given in the program, e.g., x = 5.60 will be written as x 000560 in a particular system where x dimension is to be followed by 6 digits and the control system places decimal after leaving two least significant digits. However, some CNC control systems accept the decimal form. Here, we will adopt this convention of expressing the data in decimal form. While giving the data positive sign is optional but negative sign has to be given in case of negative dimensional positions.

(d) Feed Function (F- Word). The feed function is used to specify the feed rate in the machining operation. The feed rate is expressed in millimeters per minute (mm/min) or mm/rev. If the feed is 200 mm/min, it will be represented as F200. The appropriate G code should be specified to instruct the machine whether the feed value is in mm/min or in mm/rev. (G94 or G95).

(e) Spindle Speed Function (S- Word). The spindle speed is specified either in revolutions per minute (R.P.M.) or as meters per minute. If the speed is given in meters per minute, the control unit calculates the rev/minute using the appropriate formulae. If the machine is required to run at 800 rpm the speed will be specified as S 800.

(f) Tool Selection Function (T- Word). The T-word is needed only for machines with programmable tool turret or automatic tool changer (ATC). Each tool pocket on the tool turret or ATC has a distinct tool number. The T- word in the part program specifies which tool is to be used in the operation. The tool number for a particular operation is specified as T00 to T99. Also with each tool code, the corresponding tool length offset is also specified with the help of two additional digits i.e. T01.01 where second 01 denotes the tool length offset for tool No. 01.

(g) Miscellaneous Function (M- Word). The miscellaneous function word is used to specify certain miscellaneous or auxiliary functions which do not relate to the dimensional movements of the machine. The miscellaneous functions may be spindle start, spindle stop, coolant ON/OFF, etc. An example of M-word is M02 which indicates end of program.

(h) End of Block (EOB). The EOB symbol identifies the end of instruction block. The use of NC words will be made clearer in the later part.
Part Programming in CNC Machine

Note. Part program commands for axis motion are given with the assumption that it is the cutting tool that moves. So when an axis motion command X200.5 or Y (-35.6) is given to the system, it is expected that the cutting tool will move to the program position. However, if a machine tool moves the work piece instead of the tool, it must execute the motion command in a direction opposite to that program. This fact is taken into account by machine tool and control system designer. So in all cases the part program axis motion should be written assuming that the cutting tool moves. Also it is the cutter path which is defined in the program, so in case of programming for milling cutters, the axis motion and cutter positioning should be programmed with respect to the centre of the cutter.

No comments