Hello Guest it is March 28, 2024, 04:47:47 AM

Author Topic: This Code Skips Lines  (Read 4773 times)

0 Members and 1 Guest are viewing this topic.

This Code Skips Lines
« on: November 21, 2007, 01:16:15 AM »
I'm not sure why this code is skipping depth passes after the stops at the beginning. I'm trying to run the same contour code over and over and incrementing the depth by 0.02" each pass. For whatever reason, it goes from -0.02, to 0.06 to 0.10, to 0.14. It's skipping 4, 8, 12 etc. Did I do something wrong or is this a limitation of the demo?
Re: This Code Skips Lines
« Reply #1 on: November 21, 2007, 01:18:13 AM »
Oops! Guess I should have posted some code too...

(File created using FlashCut CNC DXF Import)
(Import File:  Dekley Bellcrank.dxf)
(Import Date:  11/20/2007)

(3/8" hole)
G00 Z0.20000
G00 X1.5525 Y0.3775
M0

(1/4" hole)
G00 Z0.20000
G00 X1.0775 Y0.3775
M0

(1/4" hole)
G00 Z0.20000
G00 X0.7575 Y0.3775
M0

(1/4" hole)
G00 Z0.20000
G00 X0.4375 Y0.3775
M0

(1/4" hole)
G00 Z0.20000
G00 X0.1175 Y0.3775
M0

(insert 1/8" endmill)
M0

G00 Z0.20000
G00 X0.00000 Y0.06300
G01 Z-0.02000 F1.00 M98 P1
G01 Z-0.04000 F1.00 M98 P1
G01 Z-0.06000 F1.00 M98 P1
G01 Z-0.08000 F1.00 M98 P1
G01 Z-0.10000 F1.00 M98 P1
G01 Z-0.12000 F1.00 M98 P1
G01 Z-0.14000 F1.00 M98 P1
G01 Z-0.16000 F1.00 M98 P1
G01 Z-0.18000 F1.00 M98 P1
G01 Z-0.20000 F1.00 M98 P1
G01 Z-0.22000 F1.00 M98 P1
G01 Z-0.24000 F1.00 M98 P1
G01 Z-0.26000 F1.00 M98 P1
G01 Z-0.28000 F1.00 M98 P1
G01 Z-0.30000 F1.00 M98 P1
G01 Z-0.32000 F1.00 M98 P1
G01 Z-0.34000 F1.00 M98 P1
G01 Z-0.36000 F1.00 M98 P1
G01 Z-0.38000 F1.00 M98 P1

G00 Z1
G00 X0.00000 Y0.00000
M30


O1
G03 X0.06300 Y0.00000 I0.06300 J-0.00000 F18.00
G01 X1.67800 Y0.00000
G03 X1.67800 Y0.75600 I0.00000 J0.37800
G01 X0.06300 Y0.75600
G03 X0.00000 Y0.69300 I0.00000 J-0.06300
G01 X0.00000 Y0.06300
M99

Offline Graham Waterworth

*
  • *
  •  2,668 2,668
  • Yorkshire Dales, England
    • View Profile
Re: This Code Skips Lines
« Reply #2 on: November 21, 2007, 04:29:59 AM »
Your M98 P1 all need to be on the next line down

e.g.

G01 Z-.02 F.1
M98 P1
etc.


Graham.
Without engineers the world stops
Re: This Code Skips Lines
« Reply #3 on: November 21, 2007, 11:32:50 AM »
Why?

Offline Graham Waterworth

*
  • *
  •  2,668 2,668
  • Yorkshire Dales, England
    • View Profile
Re: This Code Skips Lines
« Reply #4 on: November 21, 2007, 12:18:10 PM »
Because.
Without engineers the world stops
Re: This Code Skips Lines
« Reply #5 on: November 21, 2007, 12:21:19 PM »
OH! Now I get it. (but not really)

Offline Graham Waterworth

*
  • *
  •  2,668 2,668
  • Yorkshire Dales, England
    • View Profile
Re: This Code Skips Lines
« Reply #6 on: November 22, 2007, 01:37:03 AM »
I think its the way Mach3 executes M codes and how it expects to jump down a line on its return.

Try this code and see if it works better.

Graham.


%
(File created using FlashCut CNC DXF Import)
(Import File:  Dekley Bellcrank.dxf)
(Import Date:  11/20/2007)

(3/8" hole)
G00 Z0.20000
G00 X1.5525 Y0.3775
M0

(1/4" hole)
G00 Z0.20000
G00 X1.0775 Y0.3775
M0

(1/4" hole)
G00 Z0.20000
G00 X0.7575 Y0.3775
M0

(1/4" hole)
G00 Z0.20000
G00 X0.4375 Y0.3775
M0

(1/4" hole)
G00 Z0.20000
G00 X0.1175 Y0.3775
M0

(insert 1/8" endmill)
M0

G00 Z0.20000
X0.00000 Y0.06300
G01 Z0 F1.00
M98 P1 L19 (do 19 sub calls)
G00 Z1.
G00 X0.00000 Y0.00000
M30


O1
G01 G91 Z-.02 F1. (do incremental Z move)
G90 (back to absolute)
G03 X0.06300 Y0.00000 I0.06300 J-0.00000 F18.00
G01 X1.67800 Y0.00000
G03 X1.67800 Y0.75600 I0.00000 J0.37800
G01 X0.06300 Y0.75600
G03 X0.00000 Y0.69300 I0.00000 J-0.06300
G01 X0.00000 Y0.06300
M99
%
Without engineers the world stops
Re: This Code Skips Lines
« Reply #7 on: November 22, 2007, 01:49:41 AM »
Oh that L19 is exactly what I've been needing. I'll have to do a little studying to fully comprehend the G91 and G90 thing but I think I have the basic idea. Using L19 could really shorten some programs, couldn't it? :)
Thanks, gs

Offline Graham Waterworth

*
  • *
  •  2,668 2,668
  • Yorkshire Dales, England
    • View Profile
Re: This Code Skips Lines
« Reply #8 on: November 22, 2007, 02:05:39 AM »
 :)
Without engineers the world stops