Hello Guest it is May 09, 2021, 09:15:03 PM

Author Topic: Inserting comment in G-code  (Read 6215 times)

0 Members and 1 Guest are viewing this topic.

Inserting comment in G-code
« on: February 11, 2012, 03:48:34 PM »
Well I tried writing my own G code to mill the moving jaw of a little machine vice that I'm bringing up to scratch for the Novamill.  I was being a good little programmer and commenting my code as I went but when I came to run it in Mach it stopped and gave an error message in the first line which started with a comment.

Now here is the question.  One can insert a comment at the end of a line like this: //<comment text>
which is a natural format to use.  But at the start of a line a / character is a block delete.

So, is it permissible to have a line which is just a comment that starts //...   or should one use an alternate form like ("this comment is the title of this program"), please?

Anyway, once I deleted all the comments the program worked fine but it would be a pain to have to maintain two versions one of which was commented and the other not.

John.

Offline ger21

*
  • *
  •  6,292 6,292
    • View Profile
    • The CNC Woodworker
Re: Inserting comment in G-code
« Reply #1 on: February 11, 2012, 05:04:36 PM »
Not sure about the //, but the (comment) form works fine.
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html
Re: Inserting comment in G-code
« Reply #2 on: February 12, 2012, 05:48:14 AM »
OK thanks, I'll give that a try.

John.
Re: Inserting comment in G-code
« Reply #3 on: February 13, 2012, 05:18:43 PM »
Have now used code generated by G-Simple (an excellent program I find so far) which includes (comments) and they work fine so I'll stick with that form.