Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: JohnHaine on February 11, 2012, 03:48:34 PM

Title: Inserting comment in G-code
Post by: JohnHaine 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.
Title: Re: Inserting comment in G-code
Post by: ger21 on February 11, 2012, 05:04:36 PM
Not sure about the //, but the (comment) form works fine.
Title: Re: Inserting comment in G-code
Post by: JohnHaine on February 12, 2012, 05:48:14 AM
OK thanks, I'll give that a try.

John.
Title: Re: Inserting comment in G-code
Post by: JohnHaine 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.