Hi all, I’ve just done a little tweak to the setup at work while trying to fix something which has revealed an unrelated issue.
The problem right now is that the “Plunge Safety Clearance” value being set isn’t being used, instead it’s using the pierce height in the same way (I think) it should be using the plunge safety clearance.
To be clear, it’s not going straight to the pierce. After a cut it’s going to the rapid clearance height, moving to the next cut location, diving blindly down to the value set by pierce height (I changed the pierce height to make sure it wasn’t using a value that happened to be the same as the pierce height, and the height it dived to changed as well to the new pierce height value), then starting the touch off code, then going to the pierce height and firing the torch etc.
It’s not a huge issue, but on thinner (warpier) and less flat material this can mean the torch hits the workpiece before starting the touch off procedure, leading to excess consumable wear etc.
I just updated to V7.0.19 to try and fix it, but no luck.
Here is my post processor (if relevant), I modified it from one of the GRBL ones I think to suit the machine we have at work
firstPierceTime = 0 --this is an extra delay added to the first pierce as needed by some machines
function OnAbout(event)
ctrl = event:GetTextCtrl()
ctrl:AppendText("GRBL plasma post processor\n")
ctrl:AppendText("\n")
ctrl:AppendText("Generic plasma post for machines with or without THC\n")
ctrl:AppendText("\n")
ctrl:AppendText("Modal G-codes and coordinates\n")
ctrl:AppendText("No comments\n")
ctrl:AppendText("M3/M5 turn the torch on/off\n")
ctrl:AppendText("Incremental IJ\n")
end
post.ForceExtension("nc")
post.SetOptions(post.ARC_SEGMENTS)
function OnInit()
post.SetCommentChars ("()", "[]") --make sure ( and ) characters do not appear in system text
if(scale == metric) then
post.Text ("G21\n") --metric mode
format = "0.0##"
else
post.Text ("G20\n") --inch mode
format = "0.0###"
end
bigArcs = 1 --stitch arc segments together
minArcSize = 0.05 --arcs smaller than this are converted to moves
firstPierce = firstPierceTime
oldFeed = -1
post.Text ("G90\n")
post.Text ("G92 X0 Y0 Z0\n")
end
function OnFinish()
post.Text ("\nM11\nM5\n")
post.Text ("\nG1 X0 Y0 Z15 F5000\n")
end
function OnRapid()
post.Text ("G0")
post.ModalNumber ("X", endX * scale, format)
post.ModalNumber ("Y", endY * scale, format)
post.ModalNumber ("Z", endZ * scale, format)
post.Eol()
end
function OnMove()
if oldFeed ~= feedRate then
oldFeed = feedRate
post.ModalNumber ("F", feedRate * scale, "0.0###")
post.Eol()
end
post.Text ("G1")
post.NonModalNumber ("X", endX * scale, format)
post.NonModalNumber ("Y", endY * scale, format)
post.ModalNumber ("Z", endZ * scale, format)
post.Eol()
end
function OnArc()
if oldFeed ~= feedRate then
oldFeed = feedRate
post.ModalNumber ("F", feedRate * scale, "0.0###")
post.Eol()
end
if(arcAngle <0) then
post.Text ("G3")
else
post.Text ("G2")
end
post.NonModalNumber ("X", endX * scale, format)
post.NonModalNumber ("Y", endY * scale, format)
post.ModalNumber ("Z", endZ * scale, format)
post.Text ("I")
post.Number ((arcCentreX - currentX) * scale, format)
post.Text ("J")
post.Number ((arcCentreY - currentY) * scale, format)
post.ModalNumber ("F", feedRate * scale, "0.0###")
post.Eol()
end
function OnPenDown()
post.Text ("G4 P1000\n")
post.Text ("\nM100\n")
post.Text ("G4 P500\n")
post.Text ("G30 Z0\n")
post.Text ("G92 Z0\n")
post.Text ("M101\n")
post.Text ("G4 P1000\n")
post.Text ("G1")
post.NonModalNumber ("Z", pierceHeight * scale, format)
post.Text ("\nM3\n")
if (pierceDelay > 0.001) then
post.Text ("G04 S")
post.Number (pierceDelay + firstPierce,"0.###")
firstPierce = 0
post.Eol()
end
post.Text ("G1")
post.NonModalNumber ("Z", cutHeight * scale, format)
post.Text ("\nM10\n")
end
function OnPenUp()
post.Text ("\nM11\nM5\n")
if (endDelay > 0) then
post.Text ("G4 S")
post.Number (endDelay,"0.###")
post.Eol()
end
post.Text ("G1 Z15\n")
end
function OnDrill()
OnRapid()
OnPenDown()
endZ = drillZ
OnMove()
OnPenUp()
endZ = safeZ
OnRapid()
end
Here is a sample G Code file showing the issue. The problematic lines are marked with the -------. “Plunge Safety Clearance” is set to 25mm, But the 3mm “Pierce Height” variable from the tool is being used instead.
G21
G90
G92 X0 Y0 Z0
G0Z30.0 ---------
G0X21.602Y-26.128 ---------
G0Z3.0 ---------
G4 P1000
M100
G4 P500
G30 Z0
G92 Z0
M101
G4 P1000
G1Z3.0
M3
G04 S0.5
G1Z1.6
M10
F1000.0
G1X21.602Y-26.128
F2500.0
G1X21.602Y-26.128
G3X26.128Y-26.128I2.263J2.263
G3X36.95Y0.0I-26.128J26.128
G3X0.0Y36.95I-36.95J-0.0
G3X-36.95Y0.0I0.0J-36.95
G3X0.0Y-36.95I36.95J-0.0
G3X23.923Y-28.161I-0.0J36.95
M11 (On lead out)
F2475.0
G3X26.128Y-26.128I-23.923J28.161
G3X26.825Y-25.411I-26.128J26.128
M11 (On lead out)
M5 (On lead out)
G3X27.503Y-24.676I-26.825J25.411
G3X27.405Y-22.868I-0.953J0.855
M11
M5
G4 S2
G1 Z15
G0Z30.0 --------------
G0X72.09Y-67.564 --------------
G0Z3.0 --------------
G4 P1000
M100
G4 P500
G30 Z0
G92 Z0
M101
G4 P1000
G1Z3.0
M3
G04 S0.5
G1Z1.6
M10
F1000.0
G1X72.09Y-67.564
F2500.0
G1X72.09Y-67.564
G3X67.564Y-67.564I-2.263J-2.263
G2X0.0Y-95.55I-67.564J67.564
G2X-95.55Y0.0I-0.0J95.55
G2X0.0Y95.55I95.55J-0.0
G2X95.55Y0.0I0.0J-95.55
G2X69.652Y-65.41I-95.55J0.0
M11 (On lead out)
F2475.0
G2X67.564Y-67.564I-69.652J65.41
G2X66.853Y-68.267I-67.564J67.564
M11 (On lead out)
M5 (On lead out)
G2X66.135Y-68.963I-66.853J68.267
G3X66.097Y-70.773I0.886J-0.924
M11
M5
G4 S2
G1 Z15
G0Z30.0
M11
M5
G1 X0 Y0 Z15 F5000
Thanks in advance for any help.