Hello Guest it is April 18, 2024, 07:53:52 PM

Author Topic: Notes in GCode files  (Read 5566 times)

0 Members and 1 Guest are viewing this topic.

Notes in GCode files
« 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
Re: Notes in GCode files
« Reply #1 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.
Regards,
Ray L.
Re: Notes in GCode files
« Reply #2 on: August 31, 2009, 11:11:24 PM »
HAH!  Perfect!  Thanks for the quick reply. 

W

Offline alenz

*
  •  137 137
    • View Profile
Re: Notes in GCode files
« Reply #3 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

Offline GaryB

*
  •  108 108
    • View Profile
Re: Notes in GCode files
« Reply #4 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
Beckwith Decor Products
ArtCam Trainer
Onsrud & Custom CNC tooling Distributor

Wichita/Derby Kansas
http://www.beckwithdecor.com
Re: Notes in GCode files
« Reply #5 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.
Regards,
Ray L.

Offline alenz

*
  •  137 137
    • View Profile
Re: Notes in GCode files
« Reply #6 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
Re: Notes in GCode files
« Reply #7 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!
Regards,
Ray L.