Machsupport Forum

G-Code, CAD, and CAM => G-Code, CAD, and CAM discussions => Topic started by: B5 on October 27, 2012, 04:36:11 PM

Title: G-code tool-path is much to large, Any ideas?
Post by: B5 on October 27, 2012, 04:36:11 PM
Hi there, I'm new to all of this but I just got a Zen Toolworks 12"x12" CNC machine.  In Mach3 I've set up all the ports and pins, set soft and hard limits and calibrated the machine.  All is running well however when I import my G-code my design, instead of being 80MM x 80MM or so, it's huge, its probably 2.5 x 2.5 feet.  I am using artCAM to build the code and have a Post processor for millimetres.  Any ideas as to whats going on?
Title: Re: G-code tool-path is much to large, Any ideas?
Post by: BR549 on October 27, 2012, 04:55:43 PM
IS your machine setup in MMs ?  Is there a G21 at the start of the Gcode to tell it to use MM ?

IF you command a move of say 80mm does it move exactly 80mm?

Can you post the file so we can look at it.

(;-) TP

Title: Re: G-code tool-path is much to large, Any ideas?
Post by: B5 on October 27, 2012, 05:19:27 PM
Here it is, the G-code is attached as a PDF, I guess the forum cant upload a .cnc file.  There is no G21 at the beginning although I tried to put it after the % and regenerated the toolpath but no luck.  Where do I put the G21?  And yes I set up Mach3 for millimetres and under the settings tab it is set on MM.

Thanks for your quick reply

Here's the beginning

(%
G91.1
M5 M9
M6 T1
G43 H1
M3 S15000
G0 X40.058 Y58.559 Z5.000
G1   Z-2.000 F720
G1 X85.555 Y58.564  F1200
G0   Z5.000
G0 X85.557 Y58.559
G1   Z-2.000 F720
G1 X62.808 Y97.968  F1200
X40.061 Y58.559...............)
Title: Re: G-code tool-path is much to large, Any ideas?
Post by: BR549 on October 27, 2012, 06:54:33 PM
IF your machine is in MM and the CAM created MM code as it appears then that is not the problem BUT it should have put a G21 at the start to insure it is in Metric mode.

NOW if you command a move from the MDI line say G1 X10 F100. Does it move exactly 10mm?




%
G91.1 G21 
M5 M9
M6 T1
G43 H1
M3 S15000
G0 X40.058 Y58.559 Z5.000
G1   Z-2.000 F720
G1 X85.555 Y58.564  F1200
G0   Z5.000
G0 X85.557 Y58.559
G1   Z-2.000 F720
G1 X62.808 Y97.968  F1200
X40.061 Y58.559
Title: Re: G-code tool-path is much to large, Any ideas?
Post by: B5 on October 27, 2012, 08:43:12 PM
I put in the code but like you said it didn't change anything.  I put that G-code into the MDI though and my machine went 10.5 inches!!!!!  So something is definitely wrong there.
Title: Re: G-code tool-path is much to large, Any ideas?
Post by: BR549 on October 27, 2012, 08:51:56 PM
YOUR motor tuning settings are off on  Steps per MM. Either recalculate them or use the calibrate utility it get it right.

(;-) TP
Title: Re: G-code tool-path is much to large, Any ideas?
Post by: B5 on October 27, 2012, 09:06:35 PM
Cool, I'll try re-calibrating and let you know
Title: Re: G-code tool-path is much to large, Any ideas?
Post by: B5 on October 27, 2012, 09:20:20 PM
So tried re-calibrating and nothing changed.  It asked how far I want it to move, I put 5 which I assume would be MM, and it moved 5MM so I put that in when it asked me how far it traveled.  Then it said that it would change it to 200 (steps a minute I think) and I said OK.

Am I doing that wrong? 
Title: Re: G-code tool-path is much to large, Any ideas?
Post by: BR549 on October 27, 2012, 09:25:34 PM
Sounds right. NOW does it move the correct distance when commanded ?   does G1X10 F100 = 10mm movement ?

(;-) TP
Title: Re: G-code tool-path is much to large, Any ideas?
Post by: B5 on October 27, 2012, 09:59:52 PM
No, still 10.5 inches. 
Title: Re: G-code tool-path is much to large, Any ideas?
Post by: BR549 on October 27, 2012, 10:20:11 PM
HUM something fishy.

Go to COnfig / native units / what is selected mm or inch?

Go to COnfig/motor tuning what is the Steps per setting on X axis(lower left side of window?

On the main screen to the right of the DROs is there a yellow led blinking ?

Main screen top right DO you see a G20 in the Modal line or a g21?



(;-) TP
Title: Re: G-code tool-path is much to large, Any ideas?
Post by: B5 on October 27, 2012, 10:27:55 PM
MM is selected

Steps per in the motor tuning is 200

No LED flashing

And Yes there is a G20 in the #s  at the to right


Thanks for your help man, I really appreciate it:)
Title: Re: G-code tool-path is much to large, Any ideas?
Post by: B5 on October 27, 2012, 10:49:24 PM
Oh sorry, its a G21 not a G20 at the top right
Title: Re: G-code tool-path is much to large, Any ideas?
Post by: BR549 on October 27, 2012, 11:02:01 PM
WHen you commanded the machine to move 10mm and it moved 10.5" what did the DROs say it moved ?

(;-) TP

Title: Re: G-code tool-path is much to large, Any ideas?
Post by: BR549 on October 28, 2012, 08:53:19 PM
HAve you found the problem yet?

(;-) TP
Title: Re: G-code tool-path is much to large, Any ideas?
Post by: B5 on October 28, 2012, 11:21:51 PM
Something must have reset when I tuned my computer off.  Your code does now move the machine 10MM:)  But my tool-path is still massive.  Is there anything else it could be?
Title: Re: G-code tool-path is much to large, Any ideas?
Post by: B5 on October 28, 2012, 11:59:21 PM
Do you think its the Code?  I have a mach3 MM post-processor so it seems like the code should be right.  Ive run the code offline and everything seems great, It's just way bigger than its supposed to be.
Title: Re: G-code tool-path is much to large, Any ideas?
Post by: B5 on October 29, 2012, 12:22:27 AM
Yeeeeeehaaaa!! Awesome, it just dawned on me that I forgot to redo my limits after I calibrated, now all is good.  The code wasn't to big, the table was to small.  I'm a total dunce.  Thanks for your help though man.
Title: Re: G-code tool-path is much to large, Any ideas?
Post by: BR549 on November 01, 2012, 08:42:49 AM
Glad you got it figured out

(;-) TP