Cnccookbook's G-Code Course
Total Page:16
File Type:pdf, Size:1020Kb
CNCCookbook Basic G-Code Course CNCCOOKBOOK’S G-CODE COURSE VOLUME 1: G-CODE BASICS Last Revised: December 23, 2015 Copyright 2015 by CNCCookbook, Inc. Copyright 2015 by CNCCookbook, Inc. Page 1 CNCCookbook Basic G-Code Course TABLE OF CONTENTS Here are the articles available for maximizing your g-code proficiency and providing you with a little CNC programmer training. Included in nearly every article are examples using our CNC Programming Software, G-Wizard Editor. Table of Contents.................................................................................................................................... 2 Introduction ............................................................................................................................................ 7 What is G-Code? .............................................................................................................................. 7 Why Learn G-Code? ......................................................................................................................... 8 What's the Best Way to Learn G-Code? ......................................................................................... 8 Introduction for Beginners .................................................................................................................... 10 Why Learn G-Code? .......................................................................................................................... 10 G-Code From the Machine’s Perspective ........................................................................................... 11 G-Wizard G-Code Editor ................................................................................................................... 12 Exercises ........................................................................................................................................... 13 The Coordinate System ........................................................................................................................ 14 Right and Left Handed Coordinate Systems ..................................................................................... 14 4-Axis, 5-Axis, and More .....................................................................................................................17 Expressing Coordinates in G-Code .................................................................................................... 18 What About Units—Metric or Imperial? ............................................................................................. 18 Relative Versus Absolute Coordinates ............................................................................................... 19 Offsets .............................................................................................................................................. 20 Planes ............................................................................................................................................... 20 Conclusion ........................................................................................................................................ 21 Exercises ........................................................................................................................................... 21 G-Code Dialects, Post Processors, and Setting Up G-Wizard Editor ...................................................... 22 There Are Many Dialects of G-Code .................................................................................................. 22 How Are the Dialects Different? ........................................................................................................ 22 Post Processors ................................................................................................................................. 23 Modal Behavior for CNC Controllers ................................................................................................. 24 Exercises ........................................................................................................................................... 26 MDI: CNC for Manual Machinists .......................................................................................................... 27 Copyright 2015 by CNCCookbook, Inc. Page 2 CNCCookbook Basic G-Code Course CNC Can Be Quick and Dirty Too! ..................................................................................................... 27 DRO’s and Power Feeds .................................................................................................................... 27 Using MDI to Move the Axes ............................................................................................................. 30 Firing Up Spindle and Coolant with M-Codes .................................................................................... 31 Using G-Wizard Editor’s Wizards to Help Keep Track of the Codes ................................................... 32 Quick Reference ................................................................................................................................ 34 Final Word: Watch Out Below! .......................................................................................................... 35 Exercises ........................................................................................................................................... 37 Conversational CNC .............................................................................................................................. 38 Introduction ...................................................................................................................................... 38 What Is Conversational CNC? ............................................................................................................ 38 Conversational CNC for Milling ......................................................................................................... 39 Conversational CNC for Turning ........................................................................................................ 41 Exercises ........................................................................................................................................... 44 One Shot G-Codes and Modal G-Codes ................................................................................................ 45 What are Modes? .............................................................................................................................. 45 What is a One-Shot G-Code? ............................................................................................................. 46 Exercises ........................................................................................................................................... 46 CNC Editors: Creating Hand-Tuned G-Code .......................................................................................... 47 Introduction ...................................................................................................................................... 47 Feature Buying Guide ........................................................................................................................ 48 Text Editing Features ........................................................................................................................ 48 Wizards: Remembering the Details for you ....................................................................................... 53 Code Snippets as Custom Canned Cycles .......................................................................................... 54 Program Summary Information: What's the Big Picture? .................................................................. 55 Program Revision Features ............................................................................................................... 56 CNC Simulators, Backplots, and Viewers .............................................................................................. 58 There’s Times When You Want a Second Opinion ............................................................................. 58 What is a CNC Simulator? ................................................................................................................. 59 Customization: Having a “Post” in the CNC Editor ............................................................................ 60 Navigation in a CNC Simulator’s Backplot ......................................................................................... 60 Copyright 2015 by CNCCookbook, Inc. Page 3 CNCCookbook Basic G-Code Course Why Use a G-Code Simulator? .......................................................................................................... 61 Error Checking Features .................................................................................................................... 62 Tool Data Management .................................................................................................................... 62 What is G-Code Verification? ............................................................................................................ 63 Exercises ........................................................................................................................................... 64 Part Zero, Touch Offs, and Zeroing ......................................................................................................