586,115 active members*
3,432 visitors online*
Register for free
Login
IndustryArena Forum > OpenSource CNC Design Center > Coding > G code & M code (noob questions sorry)
Results 1 to 6 of 6
  1. #1
    Join Date
    Aug 2012
    Posts
    0

    G code & M code (noob questions sorry)

    Hi everyone,
    Sorry but more noob questions.
    I have searched but I havent found any the answers.
    I know they are there somewhere but there is A LOT of information on this forum.

    My questions are what is the difference between g code & m code & are they used together in the same macro?
    I have searched for these codes but havent found a complete listing anywhere & a lot contradict each other. Is there anywhere I can get a concise, complete listing?
    Can anyone recommend the best way or program to learn how to use the codes to their full extent.

    Thanks again for you patience,

    Gaz

  2. #2
    Join Date
    Dec 2003
    Posts
    24221
    G codes are standard motion control code (servo motion), but there is a slight variation according to the type of machine, e.g. Machining centre, Punch, Plasma,EDM etc.
    The M codes are decided and written by the MTB, again there is some standardization, but this all depends on the personal writing the code.
    M,S,T codes are passed over to what is generally known as the Machine controller/PLC/PMC as part of the MTB/OEM design.
    The reason for two processes is so that the motion controller is not bogged down servicing the relatively slow machine codes and functions.
    For example when you buy a Mitsubishi or Fanuc system, all the control for the G code is built in for that particular package, Lathe, Mill etc, but the PLC is blank, and the MTB is required to write the M.S.T. routines for these.
    Some text books such as Computer Numerical Control Programming by Michael Save and Joseph Pusztai have a typical listing of G and M code for various types of machines
    Al .
    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.

  3. #3
    Join Date
    Aug 2012
    Posts
    0
    Thanks for the reply Al,
    Now I have a starting point.
    Cheers

  4. #4
    Join Date
    Jul 2005
    Posts
    12177
    Have you seen this Wikipedia page? G-code - Wikipedia, the free encyclopedia

    It has a fairly good listing of all the codes used in CNC.
    An open mind is a virtue...so long as all the common sense has not leaked out.

  5. #5
    Join Date
    Oct 2006
    Posts
    340
    Nice one Geof, that one has helped me several times. http://www.cncezpro.com/cnc.cfm will help as well.

  6. #6
    Join Date
    Aug 2012
    Posts
    0
    Thanks again for the info everyone. Seems I have some reading ahead of me

Similar Threads

  1. Basic G-code questions
    By rdoty in forum G-Code Programing
    Replies: 20
    Last Post: 10-20-2011, 01:24 AM
  2. questions about g-code programming
    By grf in forum G-Code Programing
    Replies: 3
    Last Post: 12-04-2009, 09:00 PM
  3. New to CNC/G-code, a few questions
    By MachFlowMike in forum G-Code Programing
    Replies: 13
    Last Post: 12-10-2007, 03:39 AM
  4. G Code noob needs some help
    By Harryman in forum G-Code Programing
    Replies: 1
    Last Post: 11-19-2007, 04:35 AM
  5. total noob to g-code, pretty simple (i think) arc problem.
    By RedSoxFox in forum G-Code Programing
    Replies: 19
    Last Post: 09-30-2007, 01:41 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •