Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: skipper on February 11, 2008, 01:53:58 AM

Title: Metric/English unit help
Post by: skipper on February 11, 2008, 01:53:58 AM
Hi All,

I recently got my first real g-code from a part I made loaded on to Mach3.  I created the part in Engish units but the CAM program converted it to metric . So, I can see that the gcode has rather large units, so they are metric.  How do I tell Mach3 they are metric and not English units.  I think my Mach3 is reading the gcode file in inches and it does not have room to run the program with out exceeding the physical dimension of the machine (Rockcliff Router)  The code calls out fog Gx25 but it want to travel 25 inches instead of the proper 25mm.  Is this clear?

Thanks,
skipper
Title: Re: Metric/English unit help
Post by: Hood on February 11, 2008, 02:27:16 AM
G21 at the start of the code will tell Mach its metric, G20 will tell Mach its Imperial.
Hood
Title: Re: Metric/English unit help
Post by: skipper on February 14, 2008, 01:06:52 AM
Hi All,
you mentioned that the G20 or G21 should be at the begining of the program.  It seems that my programs do not have this when I load the Gcode.  I see that it is on the top line (see pictue) but how do I edit that line?  I ended up trying to edit the program by adding the G21 line and it worked. Is the machine suppose to add the line automatically?

Also, I have attached another picture.  Why does the program start so far away from where it is going to start cutting (see pic).  The x-coordinate is over 200mm away from the part.  If I zero my axis at the corner of my parts, shouldn't that be where the mill should be located to start cutting?
thanks,
skipper
Title: Re: Metric/English unit help
Post by: Sailboat Larry on February 16, 2008, 04:09:52 PM
Hi Skipper...

 I have the reverse problem...  I got my .tap file working... but it was done in inches... and for some dopey reason I chose mm for the default.  How did you edit the line to change the G21 to G20 ?

I remember in the first video it said basically that once you chose a native unit, you were pretty much stuck with it.. does this mean that I have to uninstall/reinstall to change the native units?

 thanks in advance...
 Larry
Title: Re: Metric/English unit help
Post by: skipper on February 18, 2008, 02:29:48 AM
Hi Larry,

Right next to the start cycle button there is a button called "Edit G-code".  This will bring up the G-code file into Notepad which will allow you to edit it.  I was not sure really what I was doing but I added G21 on the 3rd or 4th line of where the g-code began and hit save.  The program seemed to work after that with the correct scaleling.  The top line that I circled, I am not sure how to edit that line.  Hope this helps, I am just learning all this stuff myself.
skipper
Title: Re: Metric/English unit help
Post by: Hood on February 18, 2008, 02:54:48 AM
All G-Code should have a G20 or G21 in it so that the machine knows but in reality this seems not to be the case a lot of the time, more so for Imperial ;)
 As skipper said editing the code is simple enough to do but some people like to make up two profiles for Mach, one metric, one imperial. Depending on what code they awill be running they start Mach with that profile.
 Another thing that can be done if you dont want to edit the code for some reason is just go to the MDI line and type in G20 or G21 .
Hood
Title: Re: Metric/English unit help
Post by: Chaoticone on February 18, 2008, 03:51:53 AM
Another way may be to add the appropriate code to your Initialization string in General config.

Brett
Title: Re: Metric/English unit help
Post by: Sailboat Larry on February 18, 2008, 11:41:42 AM
Thanks so much, it is working now and appears to be correct.

 Thanks again! ;D
Title: Re: Metric/English unit help
Post by: pudly123 on October 30, 2017, 09:46:40 AM
 I edited the roadrunner file and changed the very first line to G20. It is still engraving at the same small size. Should I change some other setting?
Title: Re: Metric/English unit help
Post by: Tweakie.CNC on October 30, 2017, 11:49:51 AM
Hi Pudly123,

The G20 should do it.

However, try some of the files in the zip folder here (I have tried them all and know they are OK) http://www.machsupport.com/forum/index.php/topic,18345.0.html

Tweakie.
Title: Re: Metric/English unit help
Post by: pudly123 on October 30, 2017, 12:21:05 PM
Thanks Tweakie. I am going to restart my computer and Mach3 to see if that helps with the G20 part.   If anyone had a screenshot of exactly how the file was edited and where the G20 was placed, that would be wonderful! I tried the scorpion gcode and it plunged my spindle into my sacrifice board and broke the bit! So i would advise newbies like me to be aware of this. I am going to try the other files shortly and keep my fingers crossed.
Title: Re: Metric/English unit help
Post by: Tweakie.CNC on October 30, 2017, 12:46:45 PM
Ooops !

I have now reduced the Z plunge depth and feed-rate of the Scorpion file - hope that works better for you.

Tweakie.
Title: Re: Metric/English unit help
Post by: pudly123 on October 30, 2017, 05:02:12 PM
Tweakie, it's good that you resized it. But I bet we all have had a broken bit or two at the beginning. I reinstalled Mach3 and set inches as my units. I got the roadrunner file to work properly by typing G20 G40 G90 as the very first line.
 However, I cannot get the file that I made and you downloaded and looked at to carve at inches instead of mm.
 It was made in inches using Solidcam.
 I tried putting G20 G40 G90 at the beginning of the file, but it didn't change.
 Any suggestions?
Title: Re: Metric/English unit help
Post by: Tweakie.CNC on October 31, 2017, 02:45:46 AM
Threads are starting to overlap here - please refer to your other post http://www.machsupport.com/forum/index.php/topic,35867.msg245540.html#msg245540

Tweakie.