Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: Okcsmurf on September 17, 2018, 11:24:22 AM

Title: G Code Question
Post by: Okcsmurf on September 17, 2018, 11:24:22 AM
G code question
I have a code that makes a square 1.25 inch x 1.25 inch. I adjust the motor tuning setting to get it to 1.25 inch x 1.25 inch
I go to cut a circle that is suppose to be 1.00 it cuts it to 1.75 od. What can be causing this?
Title: Re: G Code Question
Post by: garyhlucas on September 18, 2018, 01:06:34 PM
G-code is a tool path for the centerline of the tool not the size of part or hole. The G-code must be written with an offset for the tool. For a 1” square hole with a 1/4” diameter tool the path will be 3/4” x 3/4”.
Title: Re: G Code Question
Post by: Tweakie.CNC on September 19, 2018, 02:50:22 AM
You may also like to check that you have your Steps per Unit set correctly.

This can easily be done by using the Axis Calibration feature (Settings page) – choose a dimension of 10” or so and if the axis moves the correct amount then your Steps per Unit are set correctly.
Title: Re: G Code Question
Post by: JEFFOFX on September 20, 2018, 09:11:38 AM
What thread would be correct one to ask a question about running a job that has been posted from BobCam that works fine and the same job posted from HSMWorks that doesn't work?
Title: HSMWorks and Mach3
Post by: JEFFOFX on September 20, 2018, 09:33:14 AM
Hey Y'all  I've run into a funny and don't know which door to open.

When I run a job that has been posted to Mach3 from BobCam everything works fine
When I run the same job posted to Mach3 from HSMWorks, It doesn't work. ( it starts by trying to move the z past zero and bury the router bit into the router table.

I'm using the most current Mach3 post file from Autodesk Website.

These are the first few lines of my job that was posted from HSMWorks.  Line 4(G28 G91 Z0.) is where the z starts misbehaving and goes into the negative values.


(T6  D=0.25 CR=0. - ZMIN=-0.53 - FLAT END MILL)
G90 G94 G91.1 G40 G49 G17
G20
G28 G91 Z0.
G90

(2D CONTOUR2)
M5
M9
T6 M6
S17000 M3...
......................
.................
.............
.........
.....
...

ANY THOUGHTS OR HELP?  I'd much appreciate it. :)
Title: Re: G Code Question
Post by: ger21 on September 20, 2018, 11:31:53 AM
Line 4(G28 G91 Z0.) is where the z starts misbehaving and goes into the negative values.


It does that for a lot of people.
Either get rid of that line, or home your Z axis first.

Z is usually in negative values, unless you set Z zero to the bottom of your part.
Title: Re: G Code Question
Post by: JEFFOFX on September 20, 2018, 02:08:16 PM
Thanks for the reply.  I'm gonna try that right now.  Stand by.
Title: Re: G Code Question
Post by: JEFFOFX on September 20, 2018, 03:49:29 PM
That worked.  Just that simple as deleting a bad line of code.

My question is why is it there and can I modify my post to stop it?

oh and I also found out the hard way that the same line of bad g code is also at the end of the program.

Thanks and if anyone knows how to modify a post I'm open for input.