CNC Machines CNC : Computer and Numeric Control What is a CNC Machine? Conventionally, an operator decides and adjusts various machines parameters like feed , depth of cut etc depending on type of job , and controls the slide movements by hand . In a CNC Machine functions and slide movements are controlled by motors using computer programs.
CNC Milling Machine Has 3 to 5 axes. Used for wood, metal and plastic. Used to make 3D prototypes, moulds, cutting dies, printing plates and signs.
How CNC Works Controlled by G and M codes. These are number values and co-ordinates. Each number or code is assigned to a particular operation. Typed in manually to CAD by machine operators. G&M codes are automatically generated by the computer software .
Features of CNC Machinery The tool moves. Tools can operate in 1-5 axes. Larger machines have a machine control unit (MCU) which manages operations. Movement is controlled by a motors (actuators). Feedback is provided by sensors (transducers) Tool magazines are used to change tools automatically.
Part programming Part programming consists of a sequence of instructions to be performed on the NC/CNC machine . This are two types 1.Manual part programming . 2.Computer – aided part programming. CNC 3. In order to prepare part programming the programmer decides the order of the machining operations required to produce a component. 4.The choice of machine tools and cutting tools depends upon the operations. 5.Each line of program is numbered in sequence , details of operation are stated and the x, y, z coordinates are given.
Steps involved in the development of a part program Prepare the process plan. Identify the machine tool . Select the drive axes . Choose tools . Determine machining parameters such as feed rate , depth of cut , spindle speed. Make job and tool set –up plans Decide the tool path. Write the part program Test the program. Document the program
Steps involved in the development of a part program
Methods of manual part programming NC information is passed to MCU in the block format / statements Each block of NC data may be arranged differently, depends upon the control system requirements of the system configuration. The four basic tape format used for NC input are: Fixed sequential format Tab sequential format Block address format, Word address format. Data within an NC block is specified in the following order
1. Fixed sequential tape format: In each NC block same length and to contain the same number of characters are used. Example: if feed and speed are the same for ten blocks of NC data , f and s must coded in each block. 0050 00 +0025400 +0012500 +0000000 0000 00 0060 01 +0025400 +0012500 -0010000 0500 08 0070 00 +0025400 +0012500 +0000000 0000 09 2. Block address tape format: In subsequent NC blocks through the specification of a change code the change code follows the blocks and the block, sequence number and indicates which values are to be changed relative to the preceding blocks
3. Tab Sequential Tape Format: This uses special symbol called the tab to separate data values within a block. EXAMPLE: 0050 TAB 00 TAB +0025400 TAB +0012500 TAB +0000000 TAB 0060 TAB 01 TAB TAB TAB - 0010000 TAB 0500 TAB 08 0070 TAB 00 TAB TAB TAB - 0000000 TAB 0000 TAB 09 4.Word address tape format: It uses alphanumeric data specification. Each data value is preceded by a letter which indicates the type of data that follows. N20 G00 X1.200 Y.100 F325 S1000 T03 M09 This format is used by most of the NC machines, also called variable block format .
Basic CNC input data Sequence numbers (N code): It is used to identify each block within the CNC program and provides a means by which CNC commands may be rapidly located. Three digit numbers to appear after the N symbol. N025 Y25 Z0 . Co ordinates function: The coordinates of the tool tip are programmed for generating a given component geometry. the coordinates are specified by using the word address X,Y,Z,,U,V,W,I,J,K for example: X = 100.125 y -25.005 z- 5.565 Feed function : the feed rate displacement or spindle feed rate is expressed in mm/min. the 3 digit number prefixed by the letter “ F ” Example : F 125 indicates that the feed rate is 125mm/min
4.Speed function: The spindle speed is expressed in rev/min and is a three- digit number prefixed by the letter “ S ” for example: S1000 indicates that the spindle speed is 1000rpm.\ 5.Tool function: The tool function is used in conjunction with the miscellaneous function for tool changes (M06), and as a means of addressing the new tool . for example : T05 M06 . T he execution of the above statement ensures that the new tool numbered 05 is set-up.
Preparatory Functions : It is represented by a 2 digit number prefixed by the letter “ G ” the purpose of preparatory function is to command the machine tool to perform the function represented by the selected code number. Example: G90 specifies absolute input dimensions. ISO has standardized a number of these preparatory function MOTION GROUP: G00 Rapid Positioning G01 Linear interpolation. G02 Circular interpolation CW. G03 Circular interpolation CCW. DWELL G04 dell.
Miscellaneous Functions: This functions involve actions that are necessary for machining (spindle on/off , coolant on/off). These are used to designate a particular mode of operation for a CNC machine tool. Program Number: The symbol used for program number is ‘O’ or “:” followed by its number. Example: 0123 or :123 The program number does not interference with the execution of the CNC program.
Interpolation: 1. Linear interpolation in practice are 2 types linear and circular 2. parabolic and cubic interpolation are also available for use in the more advanced system. Definition: it is method that develops intermediate coordinate points on a straight line between the given start and finish points . 2. The input contains discrete information in the form of absolute or incremental movements . 3. G CODE for linear interpolation is G01. 4.When motion is desired along a straight line at a given feed rate the function is used. 5.If the cut has to be made from A to B at feed rate of 200 mm/min as shown , then the block is written as:
Circular interpolation: 1. It is used to traverse along an arc . 2.G- code for circular interpolation is G02 (for CWD) or G03 (CCD) 3.when the motion is A to B in a XY plane as shown the block is written by.
Canned cycles: A canned cycle consists of a series of motions repeated a number of times like drilling , boring and tapping Example: A drilling cycle consists following motion of drill bit: 1. Rapid approach to work piece 2.Drill at feed rate 3.rapid return to initial position
CNC programming Important things to know: Coordinate System Units, incremental or absolute positioning Coordinates: X,Y,Z, RX,RY,RZ Feed rate and spindle speed Coolant Control: On/Off, Flood, Mist Tool Control: Tool and tool parameters
CNC programming Programming consists of a series of instructions in form of letter codes Preparatory Codes: G codes- Initial machining setup and establishing operating conditions N codes- specify program line number to executed by the MCU Axis Codes : X,Y,Z- Used to specify motion of the slide along X, Y, Z direction Feed and Speed Codes : F and S- Specify feed and spindle speed Tool codes : T – specify tool number Miscellaneous codes – M codes For coolant control and other activities
Explanation of commonly used G codes G00 – Preparatory code to control final position of the tool and not concerned with the path that is followed in arriving at the final destination. G01 – Tool is required to move in a straight line connecting current position and final position. Used for tool movement without any machining- point to point control. (linear interpolation) G02 – Tool path followed is along an arc specified by I, J and K codes.( circular interpolation)
Programming Key Letters O - Program number (Used for program identification) N - Sequence block number (Used for line identification) G - Preparatory function X - X axis designation Y - Y axis designation Z - Z axis designation R - Radius designation F – Feed rate designation S - Spindle speed designation H - Tool length offset designation D - Tool radius offset designation T - Tool Designation M - Miscellaneous function
Important G codes G00 Rapid Transverse G01 Linear Interpolation G02 Circular Interpolation, CW G03 Circular Interpolation, CCW G17 XY Plane G18 XZ Plane G19 YZ Plane G20/G70 Inch units G21/G71 Metric Units G40 Cutter compensation cancel G41 Cutter compensation left G42 Cutter compensation right G43 Tool length compensation (plus) G43 Tool length compensation (plus) G44 Tool length compensation (minus) G49 Tool length compensation cancel G80 Cancel canned cycles G81 Drilling cycle G82 Counter boring cycle G83 Deep hole drilling cycle G90 Absolute positioning G91 Incremental positioning
Important M codes M00 Program stop M01 Optional program stop M02 Program end M03 Spindle on clockwise M04 Spindle on counterclockwise M05 Spindle stop M06 Tool change M08 Coolant on M09 Coolant off M10 Clamps on M11 Clamps off M30 Program stop, reset to start
Controller The soft ware which controls the program in different languages is known as controller . * FANUC *HEIDEN HEIN * SINUMERIC *LAXMI NUMERIC(Indian Controller) *MAZATROL *MAZAC
Steps to write a program Read the drawing. *Think about all sequential operation. *Specify raw material size. *Tool definition. *Tool call. *Specify the tool position. *Specify the Z0 position. *Specify the depth of cut. *Specify co-ordinates for cutting operation. *Retract the tool at the end of the cut. -End of program.
Structure of NC part program data with in the block
Rules for programming Sample Block Block Format N135 G01 X1.0 Y1.0 Z0.125 F5 Restrictions on CNC blocks Each may contain only one tool move Each may contain any number of non-tool move G-codes Each may contain only one feed rate Each may contain only one specified tool or spindle speed The block numbers should be sequential Both the program start flag and the program number must be independent of all other commands (on separate lines) The data within a block should follow the sequence shown in the above sample block
Programming Example Raw Material Finished Part Raw Material
Program Interpretation G55 X200 Y80 Setting the datum to the lower left corner of the work piece
G55 X200 Y80 Program 1 Program Identification Number
G55 X200 Y80 Program 1 N001 M06 T1 N001 Sequence Number M06 Tool Change (End Mill with Diameter=12mm T1 Tool Number
G55 X200 Y80 Program 1 N001 M06 T1 N002 M03 rpm 400 Start rotating the spindle clockwise with 400 rpm
G55 X200 Y80 Program 1 N001 M06 T1 N002 M03 rpm 400 N003 G01 X-8 Y0 Z0 XY Feed 150 Go to Safe Position with feed 150mm/min
G55 X200 Y80 Program 1 N001 M06 T1 N002 M03 rpm 400 N003 G01 X-8 Y0 Z0 XY Feed 150 N004 G01 X-8 Y0 Z-0.5 Z Feed 150 Lower the end mill to determine the depth of cut
G55 X200 Y80 Program 1 N001 M06 T1 N002 M03 rpm 400 N003 G01 X-8 Y0 Z0 XY Feed 150 N004 G01 X-8 Y0 Z-0.5 Z Feed 150 N005 G01 X70 Y0 Z-0.5 XY Feed 75 Move from the lower left corner of the work piece to the right lower one cutting with feed=75mm/min
G55 X200 Y80 Program 1 N001 M06 T1 N002 M03 rpm 400 N003 G01 X-8 Y0 Z0 XY Feed 150 N004 G01 X-8 Y0 Z-0.5 Z Feed 150 N005 G01 X70 Y0 Z-0.5 XY Feed 75 N006 G01 X70 Y60 Z-0.5 XY Feed 75 Move from the lower left corner of the work piece to the right lower one cutting with feed=75mm/min
Structure of NC part program data with in the block
FUNCTIONAL CODES:
G92: absolute presetting. G90: Absolute programming . G00: point – to – point positioning , rapid traverse. G01: Linear interpolation. T01: Tool number. S592: speed 592. M03: spindle rotates cws . F100: T ool feed 100 mm/minute. Z14: Depth of tool cut. M05: spindle off. M30: End of tape + tape rewind.
G92: absolute presetting. G90: Absolute programming. G00: point – to – point positioning , rapid traverse. G01: Linear interpolation. T01: Tool number. S592: speed 592. M03: spindle rotates cws . F100: T ool feed 100 mm/minute. Z14: Depth of tool cut. M05: spindle off. M30: End of tape + tape rewind.
Canned cycles: A canned cycle consists of a series of motions repeated a number of times like drilling , boring and tapping Example: A drilling cycle consists following motion of drill bit: 1. Rapid approach to work piece 2.Drill at feed rate 3.rapid return to initial position
Tool length compensation
1. If the tools are more than one tool, the programmer has to take care of the individual tool lengths for the programming the Z- depth. 2.In the CNC practice all tool are measured in the assembled state by using tool pre-setter. 3.When new tool is changed , it is necessary to measure the new tool length offset and input it into the memory of the CNC machine. 4.Tool length compensation functions in a machine centre are: G45 = Extension of axis travel by the amount stored in the offset data memory G46 = Reduction by the amount stored in the offset data memory Example :G00 G45 Z-75 H04 H04 is the offset in number stored in number 04of the offset data memory.
Cutter Radius compensation: 1.In profile turning or pocketing , the cutter radius affects accuracy of the work piece. Therefore , it becomes necessary to compare the tool path by offsetting the contour by an amount equal to the cutter radius. 2 .Figure shows part contour and the tool path for a typical component . 3.The preparatory functions G40,G41 and G42 are used for cutter radius compensation. G40=Compensation off. G41 = It is used when the cutter is on the left of the tool path when looking in the direction of the tool movement. G42 = It is used when the cutter is on the right of the tool path when looking in the direction of the tool movement.