586,102 active members*
2,485 visitors online*
Register for free
Login
Results 1 to 13 of 13
  1. #1
    Join Date
    Aug 2007
    Posts
    24

    Coments In G Code

    How do I add a comment in a line of g code ?

    Thanks
    AJ

  2. #2
    Join Date
    Mar 2003
    Posts
    2932
    What control?

    Fanuc, Haas, Yasnac, etc. use "(" and ")" as control out/control in codes.

  3. #3
    Join Date
    Aug 2008
    Posts
    247

  4. #4
    Join Date
    Aug 2007
    Posts
    24
    The comments are for personal reminders as to which set of fixtures in a setup pertain to the g code lines.
    AJ

  5. #5
    Join Date
    Aug 2008
    Posts
    247

    Comments In Any Program

    . . . are added to create clarity and understanding about the source code being viewed. All program compilers and interpreters allow for comments to be included. How the comments are used is entirely up to the programmer.

  6. #6
    Join Date
    Jun 2008
    Posts
    1511
    I believe that most common is to put the comments in () parenthesis or "". However it will depend on the model of control. So as Dave has already asked, we need to know what model control you are using.

    Stevo

  7. #7
    Join Date
    Feb 2008
    Posts
    586
    Old Cincinattis (Sabre and the like) required:

    (MSG, your note here

    End parenthesis not required, but no other info went on that line.

  8. #8
    Join Date
    Aug 2007
    Posts
    24
    I am running Mach 3 . I have been getting lost in some parts of the program, that is why I need the commets.
    My understanding is that I can add a comment at the beginning or end of a line of g code as long as it is inclosed in () or "", is that correct?

    Thanks for all your input.
    AJ

  9. #9
    Join Date
    Feb 2008
    Posts
    183
    Parenthesis work most of the time but not allways, are 20 year old mitsy mo control dosn't like them,so I just put a block delete in that line.If I'm putting info about a part in the program like, (take jack screw out) ,after a M00,I will put empty end of blocks so when the program stops the operator can see only the message on the screen (take jack screw out).Just a little trick I use,although the new hass recuiers a few more eob's then the old one.

    Hey beege how old of cincy? I never tried putting them in ours,it is a 74.Not that we put new jobs on it but the one job it does a message at one point would be nice for new guys.
    Just push the button,what's the worst that could happen.

  10. #10
    Join Date
    Jan 2008
    Posts
    89
    I would agree the addition of end of blocks before and after the M00 and comment line is a good idea. Aside from the comment being the only thing that operators can see, it is handy to be able to look across the shop and see the machine is stopped. Be it time to remove parts, add parts, change a bar, etc.....

  11. #11
    Join Date
    Feb 2007
    Posts
    664
    try ;comment

  12. #12
    Join Date
    Mar 2003
    Posts
    2932
    According to "Using Mach3 Mill":

    10.5.5 Comments and Messages

    A line that starts with the percent character, %, is treated as a comment and not interpreted in any way.

    Printable characters and white space inside parentheses is a comment. A left parenthesis always starts a comment. The comment ends at the first right parenthesis found thereafter.

    Once a left parenthesis is placed on a line, a matching right parenthesis must appear before the end of the line.

    Comments may not be nested; it is an error if a left parenthesis is found after the start of a comment and before the end of the comment.

    Here is an example of a line containing a comment: G80 M5 (stop motion)

    An alternative form of comment is to use the two characters // The remainder of the line is treated as a comment

    Comments do not cause the machining system to do anything.

    A comment that is included in parenthesese, contains a message if MSG, appears after the left parenthesis and before any other printing characters. Variants of MSG, which include white space and lower case characters are allowed. Note that the comma which is required. The rest of the characters before the right parenthesis are considered to be a message to the operator. Messages are displayed on screen in the "Error" intelligent label.

  13. #13
    Join Date
    Feb 2008
    Posts
    586
    Quote Originally Posted by fuzzyracing1967 View Post
    Parenthesis work most of the time but not allways, are 20 year old mitsy mo control dosn't like them,so I just put a block delete in that line.If I'm putting info about a part in the program like, (take jack screw out) ,after a M00,I will put empty end of blocks so when the program stops the operator can see only the message on the screen (take jack screw out).Just a little trick I use,although the new hass recuiers a few more eob's then the old one.

    Hey beege how old of cincy? I never tried putting them in ours,it is a 74.Not that we put new jobs on it but the one job it does a message at one point would be nice for new guys.
    The Sabre I worked with was circa 1993 ish. Acramatic 850SX. Long time since I had to look at that control.

Similar Threads

  1. Replies: 4
    Last Post: 03-29-2011, 02:39 PM
  2. Replies: 8
    Last Post: 12-15-2010, 09:32 PM
  3. G-code for beginners - want to learn G-code
    By FPV_GTp in forum G-Code Programing
    Replies: 7
    Last Post: 11-18-2008, 06:25 AM
  4. new hobby router coments please
    By rob gib in forum DIY CNC Router Table Machines
    Replies: 16
    Last Post: 11-20-2006, 11:21 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
  •