Hello Guest it is March 29, 2024, 03:40:49 AM

Author Topic: Cutter Compensation and Arcs: Confused by tool path from G02 when G42 is used  (Read 5038 times)

0 Members and 1 Guest are viewing this topic.

Hi,
   I'm learning to write Gcode by hand.  I have a project where I want to cut 7 full circle arcs out, and I thought using G42 to account for the cutter diameter would be pretty straight forward.  My code does show in the tool path the nice purple lines for the circles, but then it also shows a white spiral line which when I run the program seems to be the true cutter motion.  So I'm totally confused why it won't just follow out the purple arc lines.  Where is the spiral coming from?? 

   Here is my program.  Note that I've tried both settings for IJ being relative or absolute.  Doesn't change the behavior at all.  Let me know if you need me to include a screen shot of the sprials.  I've also tried putting G42 on the same line as G02.  Didn't help either.  When I did that, the arc actually didn't cut out at ALL!  It would plunge to start the cut, and then just raise again and move to the next hole location.  I did learn that the spiral depends on where I put the G42 line in sequence of the other lines. 

Code: [Select]
% 6 LEDS and reset button
G40
G01 F20 S5000
M03
G21
(-----hole1------)
G00 Z5.0
G00 X25.0
G00 X25.0 Y19.0
G42 P3.175
G01 Z-5.0 F80
G02 X25.0 Y19.0 I25.0 J15.0
G40
(-----hole2------)
G00 Z5.0
G42 P3.175
G00 X40.0 Y34.0
G01 Z-5.0 F80
G02 X40.0 Y34.0 I40.0 J30.0
G40
(-----hole3------)
G00 Z5.0
G00 X55.0 Y49.0
G01 Z-5.0 F80
G02 X55.0 Y49.0 I55.0 J45.0
G40
(-----hole4------)
G00 Z5.0
G00 X70.0 Y49.0
G01 Z-5.0 F80
G02 X70.0 Y49.0 I70.0 J45.0
G40
(-----hole2------)
G00 Z5.0
G00 X85.0 Y34.0
G01 Z-5.0 F80
G02 X85.0 Y34.0 I85.0 J30.0
G40
(-----hole1------)
G00 Z5.0
G00 X100.0 Y19.0
G01 Z-5.0 F80
G02 X100.0 Y19.0 I100.0 J15.0
G40
(-----reset hole------)
G00 Z5.0
G00 X62.5 Y21.625
G01 Z-5.0 F80
G02 X62.5 Y21.625 I62.5 J15.0
G40
G00 Z5.0
G00 X0.0 Y0.0
I uspect that teh sprial line is the actual tool movement and the purple line is what your part will end up looking like?

 
Hi,
Quote
I uspect that teh sprial line is the actual tool movement and the purple line is what your part will end up looking like?
that's  right.

Here is an example how it should look like.

G00 Z10.0
G00 X10.0 Y19.0
G01 Z5.0 F500
G42 G1 X25  P3.125 (start cutter comp lead in move )
G02 X25.0 Y19.0 I-25.0 J0 ( cut circle midpoint  X0 Y19  50mm Diameter )
G40 G1 X10 (stop cutter comp lead out move )
G0 Z10
M30
%

just a thought

Alex

Offline RICH

*
  • *
  •  7,427 7,427
    • View Profile
I would suggest that if you want to learn Gcode buy Smid's Programming Handbook and study it.
RICH