Hello Guest it is March 28, 2024, 08:32:32 AM

Author Topic: G52 use and problems with toolpath on subsequent parts  (Read 4574 times)

0 Members and 1 Guest are viewing this topic.

G52 use and problems with toolpath on subsequent parts
« on: October 06, 2009, 06:41:41 AM »
I originally had my programs written to do 2 parts at a time.  Well, I bought two more vises so now I can do 6 parts at a time.  When I was modifying my programs I decided to use the G52 command so I could reuse the same gcode for parts 3 & 4 on Vise 2 and for parts 5 & 6 on vise 3.

Toolpath view on Mach 3 shows big arcs on parts 3 thru 6 that don't belong there and the machine will "sometimes" try to follow them.  However if you step thru the program the trace on the screen is fine.

Machine is in Absolute IJ mode and I don't see why it would get changed.  Is there an issue within Mach when using the G52 command?  Maybe someone can tell me whats wrong in my code possibly?  The problem seems to occur around the G03 command...

(***** Remove material before cutting threads part 1 *****)
(***** Reset Z zero at this time *****)
M6 T1
M03 S4000
M9
G00G43 H1 Z0.1
G00 X1.182 Y0.375
G41 P0.25
G01 X0.807 F5
G03 X0.432 Y0 R0.375 F5
G4 P0.5
G02 X-0.432 Y0 R0.432 Z-0.025 F24
X0.432 Y0 R0.432 Z-0.05
X-0.432 Y0 R0.432 Z-0.075
X0.432 Y0 R0.432 Z-0.1
X-0.432 Y0 R0.432 Z-0.125
X0.432 Y0 R0.432 Z-0.15
X-0.432 Y0 R0.432 Z-0.175
X0.432 Y0 R0.432 Z-0.2
X-0.432 Y0 R0.432 Z-0.225
X0.432 Y0 R0.432 Z-0.25
X-0.432 Y0 R0.432 Z-0.275
X0.432 Y0 R0.432 Z-0.3
X-0.432 Y0 R0.432 Z-0.325
X0.432 Y0 R0.432 Z-0.35
X-0.432 Y0 R0.432 Z-0.375
X0.432 Y0 R0.432 Z-0.4
X-0.432 Y0 R0.432 Z-0.425
X0.432 Y0 R0.432 Z-0.45
X-0.432 Y0 R0.432 Z-0.475
X0.432 Y0 R0.432 Z-0.5
X-0.432 Y0 R0.432 Z-0.525
X0.432 Y0 R0.432 Z-0.55
X-0.432 Y0 R0.432 Z-0.575
X0.432 Y0 R0.432 Z-0.6
X-0.432 Y0 R0.432 Z-0.625
X0.432 Y0 R0.432 Z-0.65
X-0.432 Y0 R0.432 Z-0.6625
X0.432 Y0 R0.432 Z-0.675
X-0.432 Y0 R0.432
X0.432 Y0 R0.432
G00 Z0.1
G40

(***** Remove material before cutting threads part 2*****)
G00 Z0.1
G00 X4.182 Y0.375
G41 P0.25
G01 X3.807 F5
G03 X3.432 Y0 R0.375 F5
G4 P0.5
G02 X2.568 Y0 R0.432 Z-0.025 F24
X3.432 Y0 R0.432 Z-0.05
X2.568 Y0 R0.432 Z-0.075
X3.432 Y0 R0.432 Z-0.1
X2.568 Y0 R0.432 Z-0.125
X3.432 Y0 R0.432 Z-0.15
X2.568 Y0 R0.432 Z-0.175
X3.432 Y0 R0.432 Z-0.2
X2.568 Y0 R0.432 Z-0.225
X3.432 Y0 R0.432 Z-0.25
X2.568 Y0 R0.432 Z-0.275
X3.432 Y0 R0.432 Z-0.3
X2.568 Y0 R0.432 Z-0.325
X3.432 Y0 R0.432 Z-0.35
X2.568 Y0 R0.432 Z-0.375
X3.432 Y0 R0.432 Z-0.4
X2.568 Y0 R0.432 Z-0.425
X3.432 Y0 R0.432 Z-0.45
X2.568 Y0 R0.432 Z-0.475
X3.432 Y0 R0.432 Z-0.5
X2.568 Y0 R0.432 Z-0.525
X3.432 Y0 R0.432 Z-0.55
X2.568 Y0 R0.432 Z-0.575
X3.432 Y0 R0.432 Z-0.6
X2.568 Y0 R0.432 Z-0.625
X3.432 Y0 R0.432 Z-0.65
X2.568 Y0 R0.432 Z-0.6625
X3.432 Y0 R0.432 Z-0.675
X2.568 Y0 R0.432
X3.432 Y0 R0.432
G00 Z0.1
G40

G52 X9.388

(***** Remove material before cutting threads part 3 *****)

G00G43 H1 Z0.1
G00 X1.182 Y0.375
G41 P0.25
G01 X0.807 F5
G03 X0.432 Y0 R0.375 F5
G4 P0.5
G02 X-0.432 Y0 R0.432 Z-0.025 F24
X0.432 Y0 R0.432 Z-0.05
X-0.432 Y0 R0.432 Z-0.075
X0.432 Y0 R0.432 Z-0.1
X-0.432 Y0 R0.432 Z-0.125
X0.432 Y0 R0.432 Z-0.15
X-0.432 Y0 R0.432 Z-0.175
X0.432 Y0 R0.432 Z-0.2
X-0.432 Y0 R0.432 Z-0.225
X0.432 Y0 R0.432 Z-0.25
X-0.432 Y0 R0.432 Z-0.275
X0.432 Y0 R0.432 Z-0.3
X-0.432 Y0 R0.432 Z-0.325
X0.432 Y0 R0.432 Z-0.35
X-0.432 Y0 R0.432 Z-0.375
X0.432 Y0 R0.432 Z-0.4
X-0.432 Y0 R0.432 Z-0.425
X0.432 Y0 R0.432 Z-0.45
X-0.432 Y0 R0.432 Z-0.475
X0.432 Y0 R0.432 Z-0.5
X-0.432 Y0 R0.432 Z-0.525
X0.432 Y0 R0.432 Z-0.55
X-0.432 Y0 R0.432 Z-0.575
X0.432 Y0 R0.432 Z-0.6
X-0.432 Y0 R0.432 Z-0.625
X0.432 Y0 R0.432 Z-0.65
X-0.432 Y0 R0.432 Z-0.6625
X0.432 Y0 R0.432 Z-0.675
X-0.432 Y0 R0.432
X0.432 Y0 R0.432
G00 Z0.1
G40

(***** Remove material before cutting threads part 4*****)
G00 Z0.1
G00 X4.182 Y0.375
G41 P0.25
G01 X3.807 F5
G03 X3.432 Y0 R0.375 F5
G4 P0.5
G02 X2.568 Y0 R0.432 Z-0.025 F24
X3.432 Y0 R0.432 Z-0.05
X2.568 Y0 R0.432 Z-0.075
X3.432 Y0 R0.432 Z-0.1
X2.568 Y0 R0.432 Z-0.125
X3.432 Y0 R0.432 Z-0.15
X2.568 Y0 R0.432 Z-0.175
X3.432 Y0 R0.432 Z-0.2
X2.568 Y0 R0.432 Z-0.225
X3.432 Y0 R0.432 Z-0.25
X2.568 Y0 R0.432 Z-0.275
X3.432 Y0 R0.432 Z-0.3
X2.568 Y0 R0.432 Z-0.325
X3.432 Y0 R0.432 Z-0.35
X2.568 Y0 R0.432 Z-0.375
X3.432 Y0 R0.432 Z-0.4
X2.568 Y0 R0.432 Z-0.425
X3.432 Y0 R0.432 Z-0.45
X2.568 Y0 R0.432 Z-0.475
X3.432 Y0 R0.432 Z-0.5
X2.568 Y0 R0.432 Z-0.525
X3.432 Y0 R0.432 Z-0.55
X2.568 Y0 R0.432 Z-0.575
X3.432 Y0 R0.432 Z-0.6
X2.568 Y0 R0.432 Z-0.625
X3.432 Y0 R0.432 Z-0.65
X2.568 Y0 R0.432 Z-0.6625
X3.432 Y0 R0.432 Z-0.675
X2.568 Y0 R0.432
X3.432 Y0 R0.432
G00 Z0.1
G40

G52 X18.27

(***** Remove material before cutting threads part 5 *****)
G00G43 H1 Z0.1
G00 X1.182 Y0.375
G41 P0.25
G01 X0.807 F5
G03 X0.432 Y0 R0.375 F5
G4 P0.5
G02 X-0.432 Y0 R0.432 Z-0.025 F24
X0.432 Y0 R0.432 Z-0.05
X-0.432 Y0 R0.432 Z-0.075
X0.432 Y0 R0.432 Z-0.1
X-0.432 Y0 R0.432 Z-0.125
X0.432 Y0 R0.432 Z-0.15
X-0.432 Y0 R0.432 Z-0.175
X0.432 Y0 R0.432 Z-0.2
X-0.432 Y0 R0.432 Z-0.225
X0.432 Y0 R0.432 Z-0.25
X-0.432 Y0 R0.432 Z-0.275
X0.432 Y0 R0.432 Z-0.3
X-0.432 Y0 R0.432 Z-0.325
X0.432 Y0 R0.432 Z-0.35
X-0.432 Y0 R0.432 Z-0.375
X0.432 Y0 R0.432 Z-0.4
X-0.432 Y0 R0.432 Z-0.425
X0.432 Y0 R0.432 Z-0.45
X-0.432 Y0 R0.432 Z-0.475
X0.432 Y0 R0.432 Z-0.5
X-0.432 Y0 R0.432 Z-0.525
X0.432 Y0 R0.432 Z-0.55
X-0.432 Y0 R0.432 Z-0.575
X0.432 Y0 R0.432 Z-0.6
X-0.432 Y0 R0.432 Z-0.625
X0.432 Y0 R0.432 Z-0.65
X-0.432 Y0 R0.432 Z-0.6625
X0.432 Y0 R0.432 Z-0.675
X-0.432 Y0 R0.432
X0.432 Y0 R0.432
G00 Z0.1
G40

(***** Remove material before cutting threads part 6 *****)
G00 Z0.1
G00 X4.182 Y0.375
G41 P0.25
G01 X3.807 F5
G03 X3.432 Y0 R0.375 F5
G4 P0.5
G02 X2.568 Y0 R0.432 Z-0.025 F24
X3.432 Y0 R0.432 Z-0.05
X2.568 Y0 R0.432 Z-0.075
X3.432 Y0 R0.432 Z-0.1
X2.568 Y0 R0.432 Z-0.125
X3.432 Y0 R0.432 Z-0.15
X2.568 Y0 R0.432 Z-0.175
X3.432 Y0 R0.432 Z-0.2
X2.568 Y0 R0.432 Z-0.225
X3.432 Y0 R0.432 Z-0.25
X2.568 Y0 R0.432 Z-0.275
X3.432 Y0 R0.432 Z-0.3
X2.568 Y0 R0.432 Z-0.325
X3.432 Y0 R0.432 Z-0.35
X2.568 Y0 R0.432 Z-0.375
X3.432 Y0 R0.432 Z-0.4
X2.568 Y0 R0.432 Z-0.425
X3.432 Y0 R0.432 Z-0.45
X2.568 Y0 R0.432 Z-0.475
X3.432 Y0 R0.432 Z-0.5
X2.568 Y0 R0.432 Z-0.525
X3.432 Y0 R0.432 Z-0.55
X2.568 Y0 R0.432 Z-0.575
X3.432 Y0 R0.432 Z-0.6
X2.568 Y0 R0.432 Z-0.625
X3.432 Y0 R0.432 Z-0.65
X2.568 Y0 R0.432 Z-0.6625
X3.432 Y0 R0.432 Z-0.675
X2.568 Y0 R0.432
X3.432 Y0 R0.432
G00 Z0.1
G40

G52 X0

G00 X-2 Y0
Re: G52 use and problems with toolpath on subsequent parts
« Reply #1 on: March 07, 2010, 10:13:46 PM »
Did you figure anything out?  I'm having the same problem right now.  See my youtube vid...

http://www.youtube.com/watch?v=n5DQIz702fQ

Offline Graham Waterworth

*
  • *
  •  2,668 2,668
  • Yorkshire Dales, England
    • View Profile
Re: G52 use and problems with toolpath on subsequent parts
« Reply #2 on: March 08, 2010, 07:14:56 AM »
The only thing that I can see in the previous code is that the G52 should be cancelled (G52 X0) before the next one is commanded.

Graham
Without engineers the world stops
Re: G52 use and problems with toolpath on subsequent parts
« Reply #3 on: March 08, 2010, 11:56:13 AM »
My code is using G02's and I'm running Absolute IJ mode.  The first radius is fine, then for some reason it pukes on the second one and everting there after is off...  I still don't have a clue whats going on.  I think the next thing I'll do is completely uninstall Mach3, delete the directory and completely remove any trace of Mach3 from my system then reinstall.

My best guess is that when the power went out a file somewhere in Mach3 got corrupted...
The code hasn't changed and I've been running projects for a week now that have been coming out just fine.

Its the only thing I can think of...

Code: [Select]
(***********************************************)
(     PROGRAM NAME  -  DARK TOWER CASE.NC)
(     MACHINE  -   K2 KG-2525)
(     POST  -  Mach3-******)
(     DATE  -  SUN. 03/07/2010 - 03:39PM)
(***********************************************)


(___STARTUP___)
G00 Z1.
M03


(___008 - TOP FINAL PROFILE ___)
G00 X0.613 Y12.8594
Z1.
G01 Z-0.25 F30.
X0.4596 Y16.5469 F60.
G02 X0.4593 Y16.5625 I0.3747 J0.0156
G02 X0.8343 Y16.9375 I0.375 J0.
G01 X4.6657
G02 X5.0407 Y16.5625 I0. J-0.375
G02 X5.0404 Y16.5469 I-0.375 J0.
G01 X4.7336 Y9.1719
G02 X4.3589 Y8.8125 I-0.3747 J0.0156
G01 X1.1411
G02 X0.7664 Y9.1719 I0. J0.375
G01 X0.613 Y12.8594


(___009 - BASE FINAL PROFILE ___)
X0.613 Y4.6406
Z1.
G01 Z-0.25 F30.
X0.7664 Y8.3281 F60.
G02 X1.1411 Y8.6875 I0.3747 J-0.0156
G01 X4.3589
G02 X4.7336 Y8.3281 I0. J-0.375
G01 X5.0404 Y0.9531
G02 X5.0407 Y0.9375 I-0.3747 J-0.0156
G02 X4.6657 Y0.5625 I-0.375 J0.
G01 X0.8343
G02 X0.4593 Y0.9375 I0. J0.375
G02 X0.4596 Y0.9531 I0.375 J0.
G01 X0.613 Y4.6406


(___SHUTDOWN___)
M05
G00 Z1.
G00 X0 Y0


(___COMPLETE___)
M02
Re: G52 use and problems with toolpath on subsequent parts
« Reply #4 on: March 08, 2010, 01:36:14 PM »
I just read in a post on CNCzone back in 2006 that a guy was having issues with I and J values being zero.

Could that be the issue?  I wouldn't think so because it does the first radius just fine and fails on the second one...

(___008 - TOP FINAL PROFILE ___)
G00 X0.613 Y12.8594
Z1.
G01 Z-0.25 F30.
X0.4596 Y16.5469 F60.

(THESE TWO LINES RUN JUST FINE)
G02 X0.4593 Y16.5625 I0.3747 J0.0156
G02 X0.8343 Y16.9375 I0.375 J0.


G01 X4.6657

(THESE TWO LINES FAIL)
G02 X5.0407 Y16.5625 I0. J-0.375
G02 X5.0404 Y16.5469 I-0.375 J0.


G01 X4.7336 Y9.1719
G02 X4.3589 Y8.8125 I-0.3747 J0.0156
G01 X1.1411
G02 X0.7664 Y9.1719 I0. J0.375
G01 X0.613 Y12.8594
« Last Edit: March 08, 2010, 01:38:33 PM by MA$TER_E »
Re: G52 use and problems with toolpath on subsequent parts
« Reply #5 on: March 09, 2010, 01:14:41 PM »
Uninstalled, Deleted the Directory then Reinstalled Mach3 and everything works fine now.

Unfortunately, in my haste to figure this all out I forgot to plug the fans in that keep my stepper drivers cool and fried them...

Neat...