Postprocessor for rotary plasma
Postprocessor for rotary plasma
We are using GRBL1.1h with USB-CNC plasma.scpost. A friend set up a breadboard using an Arduino and drivers and it works! We have built a more permanent copy in a case using identical parts and software and it doesn't fire the plasma to cut-but the table and torch move correctly. We have recently tried adding S1000 to the M03 torch-on command lines and the torch cuts correctly. Can you tell us how to update the postprocessor code to include the S1000 command to the M03 command lines?
- Les Newell
- Site Admin
- Posts: 3666
- Joined: Thu May 11, 2006 8:12 pm
Re: Postprocessor for rotary plasma
Do you need S1000 with the M3 or just at the start of the code?
Re: Postprocessor for rotary plasma
We need to S1000 command to appear on the same line as every M3 command
-
- Posts: 35
- Joined: Sat Apr 13, 2019 6:46 am
Re: Postprocessor for rotary plasma
It's very simple to edit the postprocessor you use.Find the line that says "post.Text ("\n M03\n")" and do it - post.Text ("\n M03 S1000\n")
Re: Postprocessor for rotary plasma
We believe we have your instructions and have updated this postprocessor as shown below. We still don't turn the plasma on, unless we write S1000 after M03 in the post processed .tap file. Is there anything we can do to this postprocessor file to make it work?
USB-CNC plasma.scpost:
function OnAbout(event)
ctrl = event:GetTextCtrl()
ctrl:AppendText("Milling/routing post for Eding CNC USB-CNC controllers\n")
ctrl:AppendText("\n")
ctrl:AppendText("Modal G-codes and coordinates\n")
ctrl:AppendText("Comments enclosed with ( and )\n")
ctrl:AppendText("Incremental IJ\n")
ctrl:AppendText("uses G43 tool length offsets\n")
end
-- revision 7/23/20
-- Added S1000 to post.Text ("\n M03 \n")
-- revision 3/6/09
-- Removed line numbers (they can conflict with 0-word subroutines)
-- revision 3/2/07
-- Removed final safety move. This is now done in SheetCam
-- revision 7/10/04
-- Added new arc handling
-- Created 30/3/2005
-- based on Mach2.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 (" G40 G90\n F1\n")
bigArcs = 1 --stitch arc segments together
minArcSize = 0.05 --arcs smaller than this are converted to moves
end
function OnNewLine()
post.Text ("N")
post.Number (lineNumber, "0000")
lineNumber = lineNumber + 10
end
function OnFinish()
post.Text (" M05 M30\n")
end
function OnRapid()
post.ModalText (" 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()
post.ModalText (" 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.###")
post.ModalNumber (" S", spindleSpeed, "0.##")
post.Eol()
end
function OnArc()
if(arcAngle <0) then
post.ModalText (" G03")
else
post.ModalText (" 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 - currentX) * scale, "0.0000")
post.Text (" J")
post.Number ((arcCentreY - currentY) * scale, "0.0000")
post.ModalNumber (" F", feedRate * scale, "0.0###")
post.ModalNumber (" S", spindleSpeed, "0.##")
post.Eol()
end
function OnPenDown()
if (preheat > 0.001) then
post.ModalText (" G00")
post.ModalNumber (" Z", cutHeight * scale, "0.0000")
post.Text ("\n G04 P")
post.Number (preheat,"0.###")
post.Eol()
end
post.ModalText (" G00")
post.ModalNumber (" Z", pierceHeight * scale, "0.0000")
post.Text ("\n M03 S1000\n")
if (pierceDelay > 0.001) then
post.Text (" G04 P")
post.Number (pierceDelay,"0.###")
post.Eol()
end
end
function OnPenUp()
post.Text (" M05\n")
if (endDelay > 0) then
post.Text (" G04 P")
post.Number (endDelay,"0.###")
post.Eol()
end
end
function OnNewOperation()
post.Text (" (Operation: ", operationName, ")\n")
end
function OnComment()
post.Text(" (",commentText,")\n")
end
function OnToolChange()
--[[post.Text (" M6 T")
post.Number (tool, "0")
post.Text (" (", toolName, ")\n")
post.Text (" G43 H")
post.Number (tool, "0")
post.Eol()]]
end
function OnSpindleChanged()
if (spindleSpeed <= 0) then
post.Warning("WARNING: Spindle speed is zero")
end
end
function OnNewPart()
post.Text(" (Part: ",partName,")\n");
end
function OnDrill()
OnRapid()
OnPenDown()
endZ = drillZ
OnMove()
OnPenUp()
endZ = safeZ
OnRapid()
end
USB-CNC plasma.scpost:
function OnAbout(event)
ctrl = event:GetTextCtrl()
ctrl:AppendText("Milling/routing post for Eding CNC USB-CNC controllers\n")
ctrl:AppendText("\n")
ctrl:AppendText("Modal G-codes and coordinates\n")
ctrl:AppendText("Comments enclosed with ( and )\n")
ctrl:AppendText("Incremental IJ\n")
ctrl:AppendText("uses G43 tool length offsets\n")
end
-- revision 7/23/20
-- Added S1000 to post.Text ("\n M03 \n")
-- revision 3/6/09
-- Removed line numbers (they can conflict with 0-word subroutines)
-- revision 3/2/07
-- Removed final safety move. This is now done in SheetCam
-- revision 7/10/04
-- Added new arc handling
-- Created 30/3/2005
-- based on Mach2.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 (" G40 G90\n F1\n")
bigArcs = 1 --stitch arc segments together
minArcSize = 0.05 --arcs smaller than this are converted to moves
end
function OnNewLine()
post.Text ("N")
post.Number (lineNumber, "0000")
lineNumber = lineNumber + 10
end
function OnFinish()
post.Text (" M05 M30\n")
end
function OnRapid()
post.ModalText (" 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()
post.ModalText (" 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.###")
post.ModalNumber (" S", spindleSpeed, "0.##")
post.Eol()
end
function OnArc()
if(arcAngle <0) then
post.ModalText (" G03")
else
post.ModalText (" 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 - currentX) * scale, "0.0000")
post.Text (" J")
post.Number ((arcCentreY - currentY) * scale, "0.0000")
post.ModalNumber (" F", feedRate * scale, "0.0###")
post.ModalNumber (" S", spindleSpeed, "0.##")
post.Eol()
end
function OnPenDown()
if (preheat > 0.001) then
post.ModalText (" G00")
post.ModalNumber (" Z", cutHeight * scale, "0.0000")
post.Text ("\n G04 P")
post.Number (preheat,"0.###")
post.Eol()
end
post.ModalText (" G00")
post.ModalNumber (" Z", pierceHeight * scale, "0.0000")
post.Text ("\n M03 S1000\n")
if (pierceDelay > 0.001) then
post.Text (" G04 P")
post.Number (pierceDelay,"0.###")
post.Eol()
end
end
function OnPenUp()
post.Text (" M05\n")
if (endDelay > 0) then
post.Text (" G04 P")
post.Number (endDelay,"0.###")
post.Eol()
end
end
function OnNewOperation()
post.Text (" (Operation: ", operationName, ")\n")
end
function OnComment()
post.Text(" (",commentText,")\n")
end
function OnToolChange()
--[[post.Text (" M6 T")
post.Number (tool, "0")
post.Text (" (", toolName, ")\n")
post.Text (" G43 H")
post.Number (tool, "0")
post.Eol()]]
end
function OnSpindleChanged()
if (spindleSpeed <= 0) then
post.Warning("WARNING: Spindle speed is zero")
end
end
function OnNewPart()
post.Text(" (Part: ",partName,")\n");
end
function OnDrill()
OnRapid()
OnPenDown()
endZ = drillZ
OnMove()
OnPenUp()
endZ = safeZ
OnRapid()
end