Post processor for plasma

Having problems with or questions about SheetCam? Post them here.
Post Reply
Christian
Posts: 1
Joined: Thu Dec 01, 2022 1:50 pm

Post processor for plasma

Post by Christian »

Good morning everyone,
I have a problem with the post processor of my cnc plasma cutter, I use scheetcam with the generic no z plasma postprocessor, the problem consists in the fact that the machine stops at the end of each segment for a fraction of a second ruining the cut piece, I think either a problem about constant speed or exact stop with command g64, below is an example of what the post processor edits by simply cutting a 100x100mm square, below also the post in question:

G00 X1.9349 Y1.9575
M20
G04 K1
M22
G04 K0.5
G01 Y1.4575 F5000.0
G01X102.9349
G01 Y102.4575
G01 X1.9349
G01 Y1.9575
M23
M21
G04 K27
G04K0
M30
-----------------
function OnAbout(event)
ctrl = event:GetTextCtrl()
ctrl:AppendText("2D plasma post processor\n")
ctrl:AppendText("\n")
ctrl:AppendText("Generic plasma post for machines with a pneumatic Z axis\n")
end


-- revision 3/2/07
-- Removed final safety move. This is now done in SheetCam

-- revision 7/10/05
-- Added new arc handling

-- revision 11/7/05
-- Moved torch to cut height when preheating
-- Added dummy spindle speed to prevent Mach2 throwing a zero spindle speed error

-- revision 9/10/04
-- Added preheat

-- revision 28/6/04
-- Replaced startx,y,z with currentx,y,z

-- created 28/5/04
-- Based on Mach2 metric.post



function OnInit()

post.SetCommentChars ("()", "[]") --make sure ( and ) characters do not appear in system text
-- post.Text (" (Filename: ", fileName, ")\n")
-- post.Text (" (Post processor: ", postName, ")\n")
-- post.Text (" (Date: ", date, ")\n")
--[[ if(scale == metric) then
post.Text (" G21 (Units: Metric)\n") --metric mode
else
post.Text (" G20 (Units: Inches)\n") --inch mode
end
post.Text (" G53 G90 G91.1 G40\n F1\n S500\n")]]
bigArcs = 1 --stitch arc segments together
minArcSize = 0.05 --arcs smaller than this are converted to moves
end

function OnNewLine()
end


function OnFinish()
post.Text ("M30\n")
end

function OnRapid()
if(math.hypot(currentX - endX, currentY - endY) < 0.001) then return end
post.Text ("G00")
post.ModalNumber (" X", endX * scale, "0.0000")
post.ModalNumber (" Y", endY * scale, "0.0000")
-- post.ModalNumber (" Z", endZ * scale, "0.0000")
post.Eol()
end

function OnMove()
if(math.hypot(currentX - endX, currentY - endY) < 0.001) then return end
post.Text ("G01")
post.ModalNumber (" X", endX * scale, "0.0000")
post.ModalNumber (" Y", endY * scale, "0.0000")
-- post.ModalNumber (" Z", endZ * scale, "0.0000")
post.ModalNumber (" F", feedRate * scale, "0.0###")
post.Eol()
end

function OnArc()
if(arcAngle <0) then
post.Text ("G03")
else
post.Text ("G02")
end
post.NonModalNumber (" X", endX * scale, "0.0000")
post.NonModalNumber (" Y", endY * scale, "0.0000")
-- post.ModalNumber (" Z", endZ * scale, "0.0000")
post.Text (" I")
post.Number ((arcCentreX ) * scale, "0.0000")
post.Text (" J")
post.Number (( arcCentreY ) * scale, "0.0000")
post.ModalNumber (" F", feedRate * scale, "0.0###")
post.Eol()
end


function OnPenDown()
post.Text("M20\n")
post.Text("G04 K1\n")


if (preheat > 0.001) then
-- post.ModalText (" G00")
-- post.ModalNumber (" Z", cutHeight * scale, "0.0000")
post.Text ("G04 K")
post.Number (preheat,"0.###")
post.Eol()
end
-- post.ModalText (" G00")
-- post.ModalNumber (" Z", pierceHeight * scale, "0.0000")
post.Text ("M22\n")
if (pierceDelay > 0.001) then
post.Text ("G04 K")
post.Number (pierceDelay * 1,"0.###")
post.Eol()
end
end


function OnPenUp()
post.Text ("M23\n")
post.Text ("M21\n")
post.Text ("G04 K27\n")
if (endDelay > 0 ) then
post.Text("G04K")
post.Number (endDelay * 0,"0.###")
post.Eol ()
end
end


function OnNewOperation()
-- post.Text (" (Operation: ", operationName, ")\n")
end

function OnComment()
post.Text(" (",commentText,")\n")
end

function OnToolChange()
end

function OnNewPart()
-- post.Text(" (Part: ",partName,")\n");
end

function OnDrill()
OnRapid()
OnPenDown()
endZ = drillZ
OnMove()
OnPenUp()
endZ = safeZ
OnRapid()
end

Thanks, you would be of great help to me
Post Reply