← Back to Book Detail

21 Unit 4: CNC Language and Structure (21/10) -- Manufacturing Processes 4-5

Browse
210%

21 Unit 4: CNC Language and Structure

21 Unit 4: CNC Language and Structure OBJECTIVE After completing this unit, you should be able to: - Identify the programs list instructions. - Understand the Program Format - Describe Letter Address Commands codes - Describe Special Character Code Definitions. - Understand the G & M Codes. CNC programs list instructions to be performed in the order they are written. They read like a book, left to right and top-down. Each sentence in a CNC program is written on a separate line, called a Block. Blocks are arranged in a specific sequence that promotes safety, predictability and readability, so it is important to adhere to a standard program structure. The blocks are arranged in the following order: - Program Start - Load Tool - Spindle On - Coolant On - Rapid to position above part - Machining operation - Coolant Off - Spindle Off - Move to safe position - End program The steps listed above represent the simplest type of CNC program, where only one tool is used and one operation performed. Programs that use multiple tools repeat steps two through nine for each. Table 3 and Table 4 in section G & M Codes show the most common G and M codes that should be memorized if possible. Like any language, the G-code language has rules. For example, some codes are modal, meaning they do not have to be repeated if they do not change between blocks. Some codes have different meanings depending on how and where there are used. While these rules are covered in this chapter, do not concern yourself with learning every nuance of the language. It is the job of the job of the CAD/CAM software Post Processor to properly format and write the CNC program. Program Format The program in Table 1: below machines a square contour and drills a hole. | Block | Description | Purpose | | % O1234 (T1 0.25 END MILL) G17 G20 G40 G49 G80 G90 | Start of program. Program number (Program Name). Tool description for operator. Safety block to ensure machine is in safe mode. | Start Program | | T1 M6 S9200 M3 | Load Tool #1. Spindle Speed 9200 RPM, On CW. | Change Tool | | G54 M8 G00 X-0.025 Y-0.275 G43 Z1.H1 Z0.1 G01 Z-0.1 F18. | Use Fixture Offset #1. Coolant On. Rapid above part. Rapid to safe plane, use Tool Length Offset #1. Rapid to feed plane. Line move to cutting depth at 18 IPM. | Move to Position | | G41 Y0.1 D1 F36. Y2.025 X2.025 Y-0.025 X-0.025 G40 X-0.4 G00 Z1. | CDC Left, Lead in line, Dia. Offset #1, 36 IPM. Line move. Line move. Line move. Line move. Turn CDC off with lead-out move. Rapid to safe plane. | Machine Contour | | M5 M9 (T2 0.25 DRILL) T2 M6 S3820 M3 | Spindle Off. Coolant Off. Tool description for operator. Load Tool #2. Spindle Speed 3820 RPM, On CW. | Change Tool | | M8 X1. Y1. G43 Z1.H2 Z0.25 | Coolant On. Rapid above hole. Rapid to safe plane, use Tool Length Offset 2. Rapid to feed plane. | Move to Position | | G98 G81 Z-0.325 R0.1 F12. G80 Z1. | Drill hole (canned) cycle, Depth Z-.325, F12. Cancel drill cycle. Rapid to safe plane. | Drill Hole | | M5 M9 G91
← Previous Chapter Next Chapter →