View Full Version : Help needed with G-Code
parts 08-06-2006, 01:04 PM I have just finished building a CNC machine. Mechanically t works wvery well. I have downloaded the Mach3 demo software which is also working as it should.
Howeve, I have a problem with G-Code files. I have drawn a template (45 mm square with four 4mm holes at each corner) with CorrelDraw ver.8 and saved as a plt file. When I load this into Mach3, the G-Code produced is dimensionally wrong!. The X and Y values are in the order of 1 or 2 units. Shouldn't it be 45 as I have drawn it?and cut I get a small movements in the X and Y axes. It isn't the machine, for when I manually enter a G-code instruction it works fine. For example, if I enter "G0 X50" the X axis will move 50mm.
Can someone throw some light on this matter. I have absolutely no knowledge of G-Code programming. Thanking you all in advance
Jock
ger21 08-06-2006, 01:40 PM Is there an option on the import for metric units? If so, try turning it off (or on) and see if that helps
motomitch1 08-06-2006, 01:44 PM Try using a (DXF) File
lakeside 08-06-2006, 01:47 PM is there an option on scale that maybe turned on?
Switcher 08-06-2006, 02:12 PM Post your g-code file here
motomitch1 08-06-2006, 02:14 PM Try this file if it dont work Mach3 is set up wrong. if it works CorrelDraw plt file is wrong. :D
parts 08-06-2006, 09:29 PM Thank you to everyone for coming to my rescue. I have imported Motomitch's file and it work as it should. I noticed that G-Code genrated from his file gave a X and Y value of 45. With my file it gave a value of 2.2 for a value that should be 45. The fact that Motomitch's file generated the correct value must mean that the scaling was not on.
Thinking that maybe the dfx file I generated was incorrect, I used DeskEngrave to create three letters (ABC) at 72 pts, which translate to 25.4mm in height. Imported it in Mach3 and yet again the G-Code was wrong! So where did I go wrong ?
Thanks again to all the help
ger21 08-06-2006, 09:31 PM Post the .dxf and we can see what size the .dxf is.
parts 08-06-2006, 09:43 PM Sorry Switcher, I was going to say in my earlier reply that I am not able to sendng to the G-Code file. In a hurry to response to everyone's help I forget to mention it.
Being wrong I deleted it, if you think that the G-Code may throw some light I would be happy to re-generate it and sent it on.
Thanks
Jock
Switcher 08-06-2006, 10:05 PM Go ahead and post your g-code , couldn't hurt anything, we'll have a look at it. :)
parts 08-06-2006, 11:57 PM Here are the files for my 45mm square. Thanks for the help
Jock
parts 08-07-2006, 12:02 AM Don't know why G-Code didn't get sent. Here it is-
Switcher, if you look at it you will find the X and Y values are way out.
I imported the dfx file into Mach3 and generated the code. Juat as I did with Motomitch's dfx, except his came out right.
tobyaxis 08-07-2006, 12:49 AM Don't know why G-Code didn't get sent. Here it is-
Switcher, if you look at it you will find the X and Y values are way out.
I imported the dfx file into Mach3 and generated the code. Juat as I did with Motomitch's dfx, except his came out right.
This is a quick geometry for NC code for others to see so they can help you. I ran your program and loaded your DXF and the G-Code matches what you have drawn. Maybe your WPC needs to be changed.
Ozemale6t9 08-07-2006, 05:09 AM The move values in your program are imperial equivalents of 45mm. I am assuming that your machine is metric, so you will need to convert those values into metric. I am not familiar with Mach3, but is there an option to output in metric?
regards, Oz
ger21 08-07-2006, 06:19 AM Corel Draw is saving you're drawing in inches, not mm. 1.77 inches. You need to scale it up by 25.4
parts 08-07-2006, 11:25 AM I have been trying out different things and I have finally found that if I save my files as .plt files they work. With all software that have used I have in fact set it to metric. It must have revert to inches with my knowing.
By using .plt files I am getting very good results. I like to thank all of you for the help and advice extend to me.
Jock
Jeff Roark 08-08-2006, 09:23 AM take a look at www.simplecnc.com
It is an easy way to make G-Code file
|