Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: Waynec on August 31, 2009, 08:57:31 PM

Title: Notes in GCode files
Post by: Waynec on August 31, 2009, 08:57:31 PM
I use a CAM program to create my GCode files, but I often want to put a note or two at the beginning of the file, or in the file before tool changes.  I'd like to put the name of the file, its revision, and what tool and material to use, for example.  And on tool changes, I'd like to put the tool name, diameter etc. 

How do you do this in GCode so that Mach doesn't read it or trip over it?  Is it just a semicolon in front of the comment, like in other programming languages?

Alternately, can I get Mach 3 to display info based on what it reads in GCode?  Nah.  It would be best to just read the line or two in the GCode header.

Thanks so much for the help.

Wayne C
Title: Re: Notes in GCode files
Post by: HimyKabibble on August 31, 2009, 09:15:33 PM
Simply enclose the comments in parentheses, at the beginning and end of each line.  Mach will ignore them completely.

Regards,
Ray L.
Title: Re: Notes in GCode files
Post by: Waynec on August 31, 2009, 11:11:24 PM
HAH!  Perfect!  Thanks for the quick reply. 

W
Title: Re: Notes in GCode files
Post by: alenz on September 01, 2009, 02:08:23 AM
Ray, is there any way to include a memory jogger in a comment that also contains a parentheses?
Example, (SetOEMDRO(827, NewValC) 'C-axis) gives a nested comment error.
TIA
Al Lenz
Title: Re: Notes in GCode files
Post by: GaryB on September 01, 2009, 07:46:22 AM
Another way is to customise your post processor to include the info from your toolpath when generated.
Now its automatically applied at the top of each file. ;D
Title: Re: Notes in GCode files
Post by: HimyKabibble on September 01, 2009, 10:49:13 AM
Ray, is there any way to include a memory jogger in a comment that also contains a parentheses?
Example, (SetOEMDRO(827, NewValC) 'C-axis) gives a nested comment error.
TIA
Al Lenz


I believe you can use any character *except* parentheses within the comment, so just change your comment to:

(SetOEMDRO[827, NewValC] 'C-axis)

Regards,
Ray L.
Title: Re: Notes in GCode files
Post by: alenz on September 01, 2009, 11:46:36 PM
Thanks Ray,
But would you believe I stumbled on a way to imbed the parentheses.

  ;SetOEMDRO(827, NewValC) 'C-axis

FWIW
Al
Title: Re: Notes in GCode files
Post by: HimyKabibble on September 02, 2009, 01:16:22 AM
Thanks Ray,
But would you believe I stumbled on a way to imbed the parentheses.

  ;SetOEMDRO(827, NewValC) 'C-axis

FWIW
Al


Cool!