
What Is An M-Code?M-Codes Are Related To G-Codes. M-Codes Control Different Machine Functions. Some Of These Functions Are Turning The Machine On And Off. Turning The Spindle On Or Off. Turning A Plasma Torch On Or Off. Turning Coolant On Or Off. You Get The Idea. When Programming Your CNC Machine You May Need To Perform These Functions.Like G-Code, M-Codes Vary From Manufacturer To Manufacturer And From Machine To Machine. As You Can Imagine You Would Need An M-Code For Turning A Plasma Torch On And Off On A CNC Plasma Cutting Machine. You Wouldnt Need An M-Code To Turn A Spindle On And Off Though. Hey, The Machine Doesnt Even Have A Spindle.Do I Need To Be A G-Code Expert?In A Word, No. You Will Probably Need To Know How To Quickly Scan Your G-Code If You Are Having Problems During Your Machining Simulation. Other Then That G-Code And A CNC Program Are Throwaway Programs For The Most Part. What Do I Mean By That? Let Me Explain.Lets Look At A Specific Design. Lets Say A 12 By 12 Square. You Build Your Model, Run It Through Your CAM Software And Create A CNC Program Made Up Of G-Code Instructions To Your Machine. Say Tomorrow The Job Requirements Change To A 24 By 24 Square. Do You Go Into Your G-Code Line By Line And Change The Code? Most People Wouldnt. They Would Go Back Into Their CAD Or CAM Program And Scale The Square Up To 24 By 24. Then Post-process The Job Again To Get Their G-Code Program.There Are Some People That Would Do This Line By Line Because The Design Is Simple. Now Think Of A Complex Shape And What Scaling It Up Or Down Would Entail. Massive Changes To The G-Code And Reviewing It Line By Line. We Are Talking Thousands Of Lines Here Vs. Going Back And Quickly Scaling The Model And Spitting Out Some New G-Code. And That Is Why G-Code Is Throwaway. Use It Over And Over When You Can, But Dont Fret Over Archiving It If Something Changes. It Is Much Better To Make A Copy Of The Design (CAD File) In Its Original State And Save That Somewhere. That Is Much More Useful.Post Processing - Ok, You Have Me Worried. With All The Variations In G-Codes And M-Codes, How Will I Ever Keep It Straight?Dont Worry About That. The CAM Program You Choose Will Have Many Post Processors. Post Processors Are Like Translators. They Help The CAM Program Spit Out The Right G-Codes For Your Specific Machine. All You Have To Do Is Select The Right Post Processor Before You Spit Out The G-Code. That Is Simple.Most CAM Programs Have Many Machine Specific Post Processors Already Loaded. All You Do Is To The List Of Them And Click On Your Machine To Select It. If You Build Your Own Machine, There Are Generic Post Processors Loaded For Different Types Of Machines. Usually You Pick A Generic One And Modify It A Bit With A Little Testing. You Are Making Sure A Move In The X-Axis Positive Direction Really Means What You Want It To Mean.