Hello Guest it is April 18, 2024, 02:19:15 AM

Author Topic: Another G41 question - or the same. Sorry! I am kind of a newbie  (Read 4392 times)

0 Members and 1 Guest are viewing this topic.

Just started a new job and they recently went from Bandit to Mach 3.  I have never written g-code for mills.  I do okay.  Thought I understood cutter comps.  I have written a few successfully using g41 for very simple parts.  This program sidemills two parts, one in either end of the vice.  Tried using G52 for this, went to using g55 for the second part instead.  Got same result.  The program below runs the first part just fine.  First comp line of second part sends the tool on an insanely long toolpath.  Used same code for each.  Using G55 (or G52) seemed to work just fine (It went to g55xoyo).  Please somebody help me if you can.  I thought G41 was all about the lead-in moves (comping before actually cutting).  I guess I am missing something.  Machmotion phone/remote support said my code looked good and then had to quit for the day.

The part finishes at 1.3125 wide in the x-direction.  21/2" stk in the y-direction.

%
;HG2420X1
;MATERIAL-1/2"X2-1/2"ALUMINUM
;5/19/15
;LAST RUN 5/19/15 JFO

;TOOL-LIST
;49-1/4"FINISHER

;XOYO UPPER LEFT
;SECOND DATUM IS SET FROM SPAN BETWEEN TWO PARTS C-C (MEASURED JAWS - 5.159")

;G52X0.0Y0.0
G54
G40
G00G53Z0.0
G00G53X0Y0
;G00X10.0Y0.0
M6T49;1/4"FINISHER______________________________
M8
M3S2300
G00X1.439Y.13
G00Z-.95
F18.0
G01Z-1.51
G41
G01X1.3125Y0.030F6.0
G01X1.3125Y-2.63
G40
G00Z0.0
G00X1.439Y.13
G00Z-.95
F18.0
G01Z-1.51
G41
G01X1.3125Y0.030F6.0
G01X1.3125Y-2.63
G00Z0.0


G40
G00X-0.13Y-2.63
G00Z-.95
F18.0
G01Z-1.51
G41
G01X0.000Y-2.53F6.0
G01X0.000Y0.13
G40
G00Z0.0
G00X-0.13Y-2.63
G00Z-.95
F18.0
G01Z-1.51
G41
G01X0.000Y-2.53F6.0
G01X0.000Y0.13
G40
G00G53Z0.0
G00X10.0Y0.0
m30


G55X0Y0
;G52 X0.0 Y0.0
;G52 X5.159 Y0 ;(SECOND DATUM)______________________________________________
G40
M8
M3S2300
G00X1.439Y.13
G00Z-.95
F18.0
G01Z-1.51
G41
G01X1.3125Y0.030
G01X1.3125Y-2.63
G40
G00Z0.0
G00X1.439Y.13
G00Z-.95
F18.0
G01Z-1.51
G41
G01X1.3125Y0.030F6.0
G01X1.3125Y-2.63
G00Z0.0


G40
G00X-0.13Y-2.63
G00Z-.95
F18.0
G01Z-1.51
G41
G01X0.000Y-2.53F6.0
G01X0.000Y0.13
G40
G00Z0.0
G00X-0.13Y-2.63
G00Z-.95
F18.0
G01Z-1.51
G41
G01X0.000Y-2.53F6.0
G01X0.000Y0.13
G40
G00G53Z0.0
G00G54X0Y0
;G52X0Y0
M5
M9
G00G53X0Y0
M30
%

Offline Graham Waterworth

*
  • *
  •  2,672 2,672
  • Yorkshire Dales, England
    • View Profile
Re: Another G41 question - or the same. Sorry! I am kind of a newbie
« Reply #1 on: May 20, 2015, 04:38:19 AM »
Mach3 likes G41/G42 to use a line and arc lead in/line out.
Without engineers the world stops
Re: Another G41 question - or the same. Sorry! I am kind of a newbie
« Reply #2 on: May 20, 2015, 09:22:54 AM »
Hey Graham,
I was hoping you would see this. Thank you so much for the reply!
 i thought moving x from 1.493 to1.3125 and y from .13 to .030 was working as a lead in. execute the g41 on a lead-in before the actual cut right? the cut being the last 2 lines shown below.

G00X1.439Y.13
G00Z-.95
F18.0
G01Z-1.51
G41
G01X1.3125Y0.030F6.0
G01X1.3125Y-2.63

Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: Another G41 question - or the same. Sorry! I am kind of a newbie
« Reply #3 on: May 20, 2015, 10:51:36 AM »
No, the lead in is applied on the move after the G41.
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html
Re: Another G41 question - or the same. Sorry! I am kind of a newbie
« Reply #4 on: May 20, 2015, 04:51:40 PM »
G00X1.439Y.13             
G00Z-.95
F18.0
G01Z-1.51
G41
G01X1.3125Y0.030F6.0
G01X1.3125Y-2.63

So, it will have already comped before it executes line seven shown above, correct? It moved in a straight line from the point in line 6 to the point in line 7.  The part at g54 ran fine.  For some reason, I did not get the same result on G55 (2nd part).
« Last Edit: May 20, 2015, 04:54:43 PM by Sprayall »
Re: Another G41 question - or the same. Sorry! I am kind of a newbie
« Reply #5 on: May 22, 2015, 01:59:04 AM »
Okay, Machmotion has said, exact quote "I'm learning that cutter comp is problematic with the G55. I noticed you had G52 in there and that was mentioned as the alternative. Can you use the G52 instead to offset it?"
  I have attached a dwg and png showing a crude sketch of my setup along with a toolpath generated by running the code through CNCSimulator.  Can someone please let me know If my lead-ins are correct, and if not, how should they be done?  I ended up running out the parts one at a time on G54 (m30 before the g55 portion of the program).  Never got the path to work out on G55, or by using G52.  Somebody please clue me in as to what I am doing wrong.

TIA!!!!
Jim
« Last Edit: May 22, 2015, 02:12:17 AM by Sprayall »

Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: Another G41 question - or the same. Sorry! I am kind of a newbie
« Reply #6 on: May 22, 2015, 08:39:12 AM »
Sorry, I'm in a tent right now and can't really look at your examples or do any testing.
But I can tell you that G41/G42 is buggy when used with offsets.(and other times as well, especially subs)
Not sure if it works with G52 either.
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Another G41 question - or the same. Sorry! I am kind of a newbie
« Reply #7 on: May 22, 2015, 02:07:23 PM »
He is a simple example of using the G41 offset with G52


;SECOND DATUM IS SET FROM SPAN BETWEEN TWO PARTS C-C (MEASURED JAWS - 5.159")
G40 G90 G49 G80
G54

M6T1
F30
G0 Z1.000
G0 X0.000 Y0.000  (Move to Point Of Origin)

G0 X-.500 Y-.500   ( give room for leadin)
G41 D1
G1 X0.000 Y0.000 Z-.100 (Leadin move)
Y2.5
G40
X-.500  Y3.000  Z1.000  (Leadout move)
G0 X1.8125  Y3.000  (give room for leadin)
G1 Z-.100
G41
G1 X1.3125 Y2.5     ( LeadIn Move)
X1.3125 Y0.000
G40
G1 X1.8125 Y-.500  Z1.000     ( Lead Out Move)

(End first segment)
(Move to next segment G52 offset)


G0 X5.159 Y0.000    ( Move to new Point of Origin)
G52 X0.000
G0 X-.500 Y-.500   ( give room for leadin)
G41 D1
G1 X0.000 Y0.000 Z-.100 (Leadin move)
Y2.5
G40
X-.500  Y3.000 Z1.000  (Leadout move)
G0 X1.8125  Y3.000  (give room for leadin)
G1 Z-.100
G41
G1 X1.3125 Y2.5     ( LeadIn Move)
X1.3125 Y0.000
G40
G1 X1.8125Y-.500  Z1.000     ( Lead Out Move)

G0 X0 Y0
G52 X5.159
G0 X0.000
(Return to Original POI)
M30
%