How do I change the torch retract height after machine is finished cutting? After cutting when homing the torch just barely clears the material and some times drags across. Is there a way to change it? Is it in fire control or sheet cam?
That is a good question. I used to βhomeβ the machine after installing limit switches and it would raise the torch automatically as it went to the left, back corner of the PRO table. Then it stopped doing that. It seems to me that the last time I performed the βhomeβ feature, it was raising the torch again. But I cannot say that positively.
I donβt know of a short cut command but I am sure there is a g-code command that could add manually just before the end of the gcode file. You need to allow the last two lines to read something similar to this:
M30
(PS18)
The (PS18) tells FireControl the cut speed, which in this case is 18. If FireControl does not find that line at the end, it will run.
Sorry. I am not much help: Just commiserating with you.
The standard retract height is 1". That is built into the post processor and canβt be changed unless you edit the post processor.
Post the last 5 lines of your g code.
There should be a line with G0 Z1
Sorry for taking so long to post. Life gets in the way at times. Here is the g code file from sheet cam. Please let me know what you think and any changes that should be made.
Thanks
firstPierceTime = 0 --this is an extra delay added to the first pierce as needed by some machines
version = 1.6
local function isEmpty(s)
return s == nil or s == ββ
end
function OnAbout(event)
ctrl = event:GetTextCtrl()
ctrl:AppendText(βPost for CrossFire PRO and CrossFire using FireControl Software\nβ)
ctrl:AppendText(β\nβ)
ctrl:AppendText(βFor CrossFire PRO and CrossFire w/powered z-axis add-on, be sure to set Pierce Height, Plunge Rate, and Cut Height values in order to activate IHS sequence. There is a 1 inch rapid retract move after each cut loop by default.\nβ)
ctrl:AppendText(β\nFor CrossFire without powered Z-axis, Pierce Height and Cut Height must be both set to 0 to disable IHS.\nβ)
end
function OnInit()
programSpeed = 0 β variable overridden with fastest cut speed
post.SetOptions(post.ARC_SEGMENTS)
post.SetCommentChars (β()β, ββ) --make sure ( and ) characters do not appear in system text
post.Text (β(vββ¦ version β¦β-sc)\nβ)
post.Text (βG90 G94\nβ)
post.Text (βG17\nβ)
if(scale == metric) then
post.Text (βG21 (Units: Metric)\nβ) --metric mode
else
post.Text (βG20 (Units: Inches)\nβ) --inch mode
end
post.TextDirect (βH0\nβ) β thc OFF, Machine in control of Z
bigArcs = 1 --stitch arc segments together
minArcSize = 0.05 --arcs smaller than this are converted to moves
firstPierce = firstPierceTime
end
function OnFinish()
post.Text (βM5 M30\nβ)
post.Text (β(PSβ β¦ programSpeed β¦ β)\nβ)
end
function OnRapid()
if (math.hypot(endX - currentX, endY - currentY) < 0.001) then return end
if(endX > 1e30) then return end
post.Text (βG0β)
post.ModalNumber (" X", endX * scale, β0.0###β)
post.ModalNumber (" Y", endY * scale, β0.0###β)
β post.ModalNumber (" Z", endZ * scale, β0.0###β)
post.Eol()
end
function OnMove()
if(currentX ~= endX or currentY ~= endY) then
post.Text (βG1β)
post.ModalNumber (" X", endX * scale, β0.0###β)
post.ModalNumber (" Y", endY * scale, β0.0###β)
βpost.ModalNumber (" Z", endZ * scale, β0.0###β)
post.ModalNumber (" F", feedRate * scale, β0.0###β)
post.Eol()
if(feedRate * scale > programSpeed and leadinType == 0) then
programSpeed = feedRate * scale
end
end
end
function OnArc()
if(arcAngle <0) then
post.Text (βG3β)
else
post.Text (βG2β)
end
post.NonModalNumber (" X", endX * scale, β0.0###β)
post.NonModalNumber (" Y", endY * scale, β0.0###β)
β post.ModalNumber (" Z", endZ * scale, β0.0###β)
post.Text (" I")
post.Number ((arcCentreX - currentX) * scale, β0.0###β)
post.Text (" J")
post.Number ((arcCentreY - currentY) * scale, β0.0###β)
post.ModalNumber (" F", feedRate * scale, β0.0###β)
post.Eol()
if(feedRate * scale > programSpeed and leadinType == 0) then
programSpeed = feedRate * scale
end
end
function OnPenDown()
post.TextDirect (β\nβ)
ihs = pierceHeight ~= 0 and cutHeight ~= 0 --enable IHS if both pierce and cut are non-zero
if (ihs) then
post.TextDirect (βG92 Z0.\nβ) β reset Z to 0
post.TextDirect (βG38.2 Zββ¦ post.FormatNumber(-5 * 25.4 * scale, β0.0##β) β¦" F"β¦ post.FormatNumber(100 * 25.4 * scale, β0.0##β) β¦β\nβ) β IIHS Fast Down
post.TextDirect (βG38.4 Zββ¦ post.FormatNumber(0.5 * 25.4 * scale, β0.0##β) β¦" F"β¦ post.FormatNumber(20 * 25.4 * scale, β0.0##β) β¦β\nβ) β IIHS Slow Up
post.TextDirect (βG92 Zββ¦post.FormatNumber(0, β0.0##β) β¦β\nβ) β reset Z to IHS 0
post.TextDirect (βG0 Zββ¦post.FormatNumber(0.02 * 25.4 * scale, β0.0##β) β¦" (IHS Backlash)\n") β reset Z to IHS 0
post.TextDirect (βG92 Zββ¦post.FormatNumber(0, β0.0##β) β¦β\nβ) β reset Z to IHS 0
post.TextDirect ("G0 Z"..post.FormatNumber(pierceHeight * scale, "0.0##") .." (Pierce Height)\n") -- Z to Pierce
end
post.Text (βM3\nβ) β fire torch
if (pierceDelay + firstPierce > 0.001) then β pierce delay
post.Text (βG4 Pβ)
post.Number (pierceDelay + firstPierce,β0.###β)
firstPierce = 0
post.Eol()
end
if (ihs) then
post.TextDirect (βG1 Zββ¦post.FormatNumber(cutHeight * scale, β0.0##β) β¦" F"β¦ post.FormatNumber(plungeRate * scale, β0.0##β) β¦" (Cut Height)\n") β Z to Cut
end
post.TextDirect (βH1\nβ) β thc ON, THC in control of Z
end
function OnPenUp()
ihs = pierceHeight ~= 0 and cutHeight ~= 0 --enable IHS if both pierce and cut are non-zero
post.Text (βH0\nβ) β thc OFF, Machine in control of Z
post.Text (βM5\nβ)
if (endDelay > 0) then
post.Text (βG4 Pβ)
post.Number (endDelay,β0.###β)
post.Eol()
end
if (ihs) then
post.TextDirect (βG0 Zβ β¦ post.FormatNumber(25.4 * scale, β0.0##β) β¦ β\nβ) β Z to rapid height
end
post.CancelModalNumbers()
end
function OnDrill()
OnRapid()
OnPenDown()
endZ = drillZ
OnMove()
OnPenUp()
endZ = safeZ
OnRapid()
end
If the built in 1 inch retract isnβt enough to let you home the torch, it seems like something is wrong.
Is your material warping so much or you have so many tip ups you canβt home?
Why not manually jog it up?
That is the post processor, not a G-code file.
The retract is defined in the following:
The post.TextDirect line references the Z axis move. The 25.4 * scale defines the distance. (For scale = metric, 25.4 * 1 = 25.4mm, for scale = inches, 25.4 * .03937 = 1")
If you need more travel, adjust the 25.4 (in mm) to your required height.
Thank you for the information. Iβm glad someone has an answer. I donβt know why or how my post processor got changed and stopped raising the torch. I will change the post processor code and hope it works again. Thanks again.
You still didnβt post any code, so we donβt really know if the code calls for a 1" retract or not. The code could be fine and your Z axis coupler is slipping.
But I did. Just look above in the posts
Thatβs not G code. Itβs the post processor that the CAM program uses to make the code.
The line that writes the retract is calling for a 1" retract height on the post processor that you posted.
Plugged the code in sheet cam you posted. Now works perfectly. Thank you for the help.