Machsupport Forum
G-Code, CAD, and CAM => G-Code, CAD, and CAM discussions => Topic started by: MrGreen on February 05, 2013, 12:51:01 PM
-
I’m trying to cut multiple hearts on the same metal sheet. I omitted the part of the code that works ok. Getting a loop within a loop seems to be the challenge.
M98 P2 L4 (Main program calls for O2 to move axis 5 times)
M0
O2 (moves axis to different part of sheet to carve heart)
M98 P1 L32 (Calls O1 to cut heart in 0.1mm increments through ¼”metal)
#2=[#2-38] (advances axis counter)
G52 Y#2 (moves axis to next heart in line)
M99
#1= -0.1
O1 (sub for carving hearts)
Bunch of lines of gcode that inscribe heart
#1=[#1-.01] (advances depth by 0.1mm increments)
M99
When I do this, the tool path generator will outline the number of hearts along the y axis but will not move beyond cutting the first. Help,valentines day is soon and I have three daughters.
-
IF you are just Dry running the code for checking the code the display will show all the offsets BUT will only repeat the first section. It is a glitch in Mach3's toolpath code.
It should cut as programmed.
(;-)TP
-
Tried tonight and results were worse than expected. It would not go past first heart. Also it would randomly start at 0 or -10 on the z. Restarting Mach 3 will make it start at 0.
-
The highlighted red code should be inside the sub. its in no mans land there. Also make sure you have an end of line on the last line of the code.
Graham
O2 (moves axis to different part of sheet to carve heart)
M98 P1 L32 (Calls O1 to cut heart in 0.1mm increments through ¼”metal)
#2=[#2-38] (advances axis counter)
G52 Y#2 (moves axis to next heart in line)
M99
#1= -0.1
O1 (sub for carving hearts)
Bunch of lines of gcode that inscribe heart
#1=[#1-.01] (advances depth by 0.1mm increments)
M99