Proma SD THC to LinuxCNC implementation (NOT PROMA 150!!)

More
10 Oct 2017 15:26 - 10 Oct 2017 16:07 #100150 by Plasmaguy
Hi guys, I've just built an 8x20' plasma table..which in hindsight was a breeze compared to getting up to speed with implementation of the computer side of things.

Linux and LinuxCNC are totally new to me, I'm learning the very basics so it has not been easy the past few days...however I am progressing along the learning curve; all the axes are running perfectly and am ready for implementation of the Proma SD (NOT PROMA 150!) into my system.

Unfortunately I wasted a day or so attempting to get Tommylight's THC file working as it was rather unclear to me that it works only for the Proma 150 but won't work with the Proma SD (their latest model) because these two THC units function differently.

proma-elektronika.com/download/PDF/thcsd_en.pdf (Proma SD Manual)

proma-elektronika.com/images/no_floating.gif (PROMA SD Implementation without Floating Torch)

Above link is an example of how I'd like to run my THC..as you can see, the torch never touches the work piece but instead fires above the work as the Z travels toward the metal. The ArcOK signal is tied together somehow with the Probe to set the pierce height (not 100% sure how to wire it into my BOB, though). Here's my BOB: Sainsmart 5 axis BOB

Here's the sample Gcode taken from the manual:

G00 Z20 (setting the burner about 20mm over the material)
M3 (Plasma connection)
G31 Z-10 F300 (looking for material at 300 to Z = -10)
G92 Z3 (Z axis reset + sample correction)
G00 Z6 (raising the burner 6mm over the material)
G04 P1000 (material piercing time 1000ms / 1s)
G00 Z1 (lowering the burner 1mm over the material)

I am running a licensed version of Sheetcam which I have quite limited experience with. I am trying to get up to speed on how to edit the post processor to accommodate this bit of code so I can get running asap. I've done a few hours of research on how to put it all together but my brain is mush and here at the finish line I need a little help getting across.

Thank you!

--

Edit: I'm using a Powermax45XP which I already have running manually from my keyboard and can cut perfect straight lines with very little slag. My Proma SD is also working great when I run the machine manually.

Here's my Sheetcam post:

function OnAbout(event)
ctrl = event:GetTextCtrl()
ctrl:AppendText("EMC plasma post processor\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 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 S1\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 + toolOffset) * 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 + toolOffset) * scale, "0.0000")
post.ModalNumber (" F", feedRate * scale, "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 + toolOffset) * 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.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\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 OnNewPart()
post.Text(" (Part: ",partName,")\n");
end


function OnDrill()
OnRapid()
OnPenDown()
endZ = drillZ
OnMove()
OnPenUp()
endZ = safeZ
OnRapid()
end
Last edit: 10 Oct 2017 16:07 by Plasmaguy.

Please Log in or Create an account to join the conversation.

More
10 Oct 2017 21:43 #100166 by rodw
First off, probing on Mach3 where your example came from and LinuxCNC are quite Different. You need to be using G38
linuxcnc.org/docs/2.7/html/gcode/g-code.html#gcode:g38
G38.3 sounds like what you need.

As can be seen in this link, your ArcOK signal needs to be sent to motion.probe-input so the probing works as expected.

In sheetcam, you would need to modify the onPenDown() and onPenUp() procedures. It will probably make life easier if the example code is contained in a separate gcode file "touchoff.ngc" thaty is called from your sheetcam post. Something like this (but you will need to modify this).
function OnPenDown()
   post.NonModalNumber("o<touchoff> call [" ,pierceHeight * scale ,"0.000" )
      post.Text ("] ")
   post.NonModalNumber("[", pierceDelay * scale, "0.##")
   post.Text ("] ")
   post.NonModalNumber("[", cutHeight * scale, "0.##")
   post.Text ("] (Touchoff and start cutting)\n")
   post.NonModalNumber ("F", feedRate * scale, "0.###")
   post.Eol()
end

function OnPenUp()
   post.Text ("M5 (Torch Off)\n")
end

Touchoff.ngc (modify to suit)
o<touchoff> sub
(#1 pierce height, #2 pierce delay, #3 cut height)
F10
G38.2 Z-1.75 (Probe to find the surface)
G0 Z[#5063 + 0.07] (Move to Probe Trip point + switch hysteresis)
G92 Z0 (Set Z zero)
G1 Z#1
M3 S1
M66 P0 L1 Q5 (Wait for Arc OK from Torch)
G4 P#2 (Pause for pierce delay)
F25
Z#3 (goto cut height)
o<touchoff> endsub
M2

Please Log in or Create an account to join the conversation.

Moderators: snowgoer540
Time to create page: 0.139 seconds
Powered by Kunena Forum