Partial preview of the text
Download CNC programming (Codes) and more Slides Manufacturing Technologies in PDF only on Docsity!
PART PROGRAMMING: INTRODUCTION: A group of commands given to the CNC for operating the machine is called the program. It consists of- v Information about part geometry. Motion statements to move the cutting tool, Cutting speed, feed. Auxiliary functions such as coolant on and off, spindle direction. vvYV Q CNC program structure : There are four basic terms used in CNC programming Character -> Word -> Block -> Program » Character is the smallest unit of CNC program. It can have Digit / Lever / Symbol. * Word is a combination of alpha-numerical characters. This creates a single instruction to the CNC machine. Each word begins with a capital letter, followed by a numeral. These are used to represent axes positions, feed rate, speed, preparatory commands, and miscellaneous functions. The program comprises of multiple lines of instructions, blocks, which will be executed by the machine control unit (MCU). A program block may contain multiple words, sequenced in a logical order of processing. FIXED ZERO v/s FLOATING ZERO Fixed zero: » Origin is always located at some position on M/C table (usually at south west comer/Lower left-hand) of the tables & all tool location are defined W.R.T. this zero. Floating Zero: » Very commonly used in CNC M/C now a days. >» Operator sets zero point al any convenient position on M/C table. » The Coordinate system is knows as work coordinate system (WCS). COMMONLY USED CODES: N-CODE: Sequence number, used to identify each block with in an CNC program and provides a means by which CNC commands may be rapidly located. it is program line number. lt is. a 200d Practice to increment each block number by 5 to 10 to allow additional blocks to be inserted if future changes are required. G-CODE: Preparatory Word, used as a communication device to prepare the MCU. The G-code indicates that a given control function such as G01, linear interpolation, is to be requested. X,Y&Z-CODES: These give the coordinate positions of the tool. F-CODE: Feed rate. The F code specifies the feed in the machining operation. S-CODE: Spindle speed. The S code specifies the cutting speed of the machining process. T-CODE: Tool selection. The T code specifies which tool is to be used ima specific operation. M-CODE: Miscellaneous function. The M code is used to designate a particular mode of operation for an NC machine tool. 1, J & K-CODES: They specify the centre of arc coordinates from starting. ratios and Reet aie |MI G2 X14 YeL4 241.4 120 2.0 KLO FS S4 Ta MP _| sequerce no || | destirationcocedimates | am oo dere [Preparatory Sxcton | Ballin | dist to conterofcucle | spindle speed M-codes Function Moo Optional program stop automatic M01 Optional program stop request M02 Program end M03 Spindle ON clock wise (CW) M04 Spindle ON counter clock wise (CCW) MOS Spindle stop M06 Tool change M07 Mist coolant ON (coolant 1 ON) Mos Flood coolant ON (coolant 2 ON) Mo9 Coolant OFF M30 End of program, Reset to start M98 Sub program call M99 Sub program end G00 Rapid traverse: When the tool being positioned at a point preparatory to a cutting motion, to save time it is moved along a straight line at Rapid traverse, at a fixed traverse rate which is pre-programmed into the machine's control system. Typical rapid traverse rates are 10 to 25 m /min., but can be as high as 80 m/min. Syntax: NOIO [G90/G91] GOO X10 Y10 ZS G01 Linear interpolation (feed traverse) : The tool moves along a straight line in one or two axis simultaneously at a Programmed linear speed, the feed rate. Syntax: NOIO{G90/G91} GOI X10 YI0 Z5 F25 G02/G03 Circular interpolation: The arc center is specified by addresses I, J and K. I, J and K are the X, ¥Y and Z co-ordinates of the are center with reference to the arc start point. N__G02/03 X. Y_Z_4 J K F using the arc center. or N_G02/03 X. Y_Z_R F. using the arc radius Arc center. G02 moves along a CW arc G03 moves along a CCW arc G90 ABSOLUTE POSITION COMMAND: G17G18 G19 : PLANE SELECTION G17: XY plane selection Syntax: N..G17 G 18: ZX plane selection Syntax: N..G18 G15: ZY plane selection Syntax: N..G19 Syntax: NO20 G17 G75 F6.0$300T1001 M08 G 70 Inch data input, G 71 Metric data input CNC Lathe Turning: PART PROGRAM: N10 M12 N20 T0101 N30 G0 G90 G71 X100 Z50 N40 M3 S600 N50 M& N60 G1 X50 Z0 F600 N70 W-30 F200 N80 X80 W-20 F150 N90 GO X100 Z50 N100 T0100 N110 M5 N120 M9 N130 M13 N140 M30