Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: Lloyd on June 30, 2017, 07:35:38 AM

Title: Editing Gcode question
Post by: Lloyd on June 30, 2017, 07:35:38 AM
After saving my Crv files in Vcarve Pro and changing it into text files for Mach3-I have one letter on my engraving project that is not cutting deep enough. How do I edit the text files in Mach 3 and how do I know the exact ones to edit to allow the engraving to cut deeper on just that letter?  Thank you! 
Title: Re: Editing Gcode question
Post by: GaryB on June 30, 2017, 03:18:49 PM
create a toolpath for that one letter only
Gary
Title: Re: Editing Gcode question
Post by: joeaverage on July 01, 2017, 11:59:22 PM
Hi,
can you identify that block of Gcode that corresponds to the letter that you wish to cut a little deeper? Often Cam programs number, or
at least give you the opportunity to number Gcode lines.

My thought is to write a macro which takes your Gcode file and modifies it from line N1510 to line N1980 for instance where that chunk
of code is the letter you are interested in.

As a rough sketch, your macro called M150 for instance:
1)Open your Gcode file as input
2)Open another similarly named file as output
3)Input your beginning and ending line numbers
4)Read line by line input file
5)If the line number is in range
      6)If the line contains a Z reference then Z=Z-.01   ie increase the depth
                7)Form the modified line and output it to file
       8)Else copy the line unmodified to the output file.
9)Until end of file.

Craig
Title: Re: Editing Gcode question
Post by: reuelt on July 02, 2017, 06:02:21 PM
After saving my Crv files in Vcarve Pro and changing it into text files for Mach3-I have one letter on my engraving project that is not cutting deep enough. How do I edit the text files in Mach 3 and how do I know the exact ones to edit to allow the engraving to cut deeper on just that letter?  Thank you! 

I would replace the default editor (notepad) with the FREE CNCCoder  from http://www.cnccoder.com/  first.
CNCCoder allows you to change colors of letters e.g make G green and Z red for ease of viewing.
It also has a search function so by knowing your y position you can find the block for that letter.
replace z with a bigger negative number
You open CNCCoder using the Edit button in Mach3
After making the changes save the file and new gcode file will  automatically be reloaded
Perhaps find the line and do a RUN from here and then stop.