I have been trying with some other guys on a german forum and got it managed to work. Nearly. It stops after the secound measure routine.
Heres the post processor:
Code:
-- version 29/8/2017
function OnAbout(event)
ctrl = event:GetTextCtrl()
ctrl:AppendText("PlanetCNC Plasma+THC+Höhenmessung\n")
end
function OnNewLine()
end
function OnInit()
post.Text ("(Filename: ", fileName, ")\n")
post.Text ("(Post processor: ", postName, ")\n")
post.Text ("(Date: ", date, ")\n")
post.Eol()
post.Text ("o<measure> sub\n")
post.Text ("G65 P120 R1\n")
post.Text ("M2\n")
post.Text ("o<measure> endsub\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 ("G90 (Distance Mode: Absolute)\n")
post.Text ("G91.1 (Distance Mode IJK: Incremental)\n")
post.Text ("G94 (Feed Rate Mode: Units per Minute)\n")
post.Eol()
post.ModalText ("G00")
post.ModalNumber (" Z", (safeZ + toolOffset) * scale, "0.0000")
post.Eol()
bigArcs = 1 --stitch arc segments together
minArcSize = 0.05 --arcs smaller than this are converted to moves
end
function OnFinish()
post.Text ("M02\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.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()
post.Text ("o<measure> call\n")
post.CancelModalText()
post.CancelModalNumbers()
post.ModalText ("G00")
post.ModalNumber (" Z", pierceHeight * scale, "0.0000")
post.Eol()
post.Text ("M03\n")
if (pierceDelay > 0.001) then
post.Text ("G04 P")
post.Number (pierceDelay,"0.0###")
post.Eol()
end
post.ModalText ("G01")
post.ModalNumber (" Z", cutHeight * scale, "0.0000")
post.ModalNumber (" F", plungeRate * scale, "0.0###")
post.Eol()
post.Text ("M54 P1\n")
end
function OnPenUp()
post.Text ("M54 P0\n")
post.Text ("M05\n")
if (endDelay > 0) then
post.Text ("G04 P")
post.Number (endDelay,"0.0###")
post.Eol()
end
post.ModalText ("G00")
post.ModalNumber (" Z", (endZ + toolOffset) * scale, "0.0000")
end
function OnNewPart()
post.Text ("(Part: ",partName,")\n");
end
function OnNewOperation()
post.Text ("(Operation: ", operationName, ")\n")
end
function OnComment()
post.Text ("(",commentText,")\n")
end
And heres what comes out as GCode:
Code:
(Filename: Anschweißlasche 45x30x8.tap)
(Post processor: PlanetCNC plasma THC (floating Z)_NEU3.scpost)
(Date: 17.10.2022)
o<measure> sub
G65 P120 R1
M2
o<measure> return
G21 (Units: Metric)
G90 (Distance Mode: Absolute)
G91.1 (Distance Mode IJK: Incremental)
G94 (Feed Rate Mode: Units per Minute)
G00 Z10.0000
(Part: Anschweißlasche 45x30x8)
(Operation: Außen Versatz, 0, T5: Stahl - 3,0 mm - 40 Ampere - 1,0 mm_Fertig)
G00
X39.0228 Y15.6890
o<measure> call
G00 Z5.0000
M03
G04 P1.0
G01 Z1.0000 F3810.0
M54 P1
X39.0228 Y15.6890
G02 X35.0000 Y9.6685 I-5.0216 J-0.9989 F2249.9999
G01 X33.0000
X13.5000 F3000.0
X12.5000 F2249.9999
G02 X7.3450 Y13.9245 I0.0000 J5.2500
X12.5000 Y20.1685 I5.1550 J0.9940 F1500.0
G01 X14.5000
X34.0000 F3000.0
X35.0000 F2249.9999
G02 X40.1550 Y15.9125 I0.0000 J-5.2500
X35.0000 Y9.6685 I-5.1550 J-0.9940 F1500.0
X32.4400 Y12.2285 I0.0000 J2.5600
M54 P0
M05
G00 Z10.0000
X50.6200 Y2.8800
o<measure> call
G00 Z5.0000
M03
G04 P1.0
G01 Z1.0000 F3810.0
M54 P1
X50.6200 Y2.8800
G02 X45.5000 Y8.0000 I0.0000 J5.1200 F2249.9999
G01 Y10.0000
Y21.0000 F3000.0
Y22.0000 F2249.9999
G03 X37.0000 Y30.5000 I-8.5000 J-0.0000
G01 X35.0000
X-1.0075 F3000.0
X-2.0075 F2249.9999
G02 X-0.5000 Y32.0075 I0.0000 J1.5075
G01 Y28.0000
Y-1.0075 F3000.0
Y-2.0075 F2249.9999
G02 X-2.0075 Y-0.5000 I-1.5075 J0.0000
G01 X2.0000
X36.0000 F3000.0
X37.0000 F2249.9999
G03 X45.4412 Y7.0023 I0.0000 J8.5000
X45.5000 Y8.0000 I-8.4412 J0.9977
G02 X48.0600 Y10.5600 I2.5600 J-0.0000
M54 P0
M05
G00 Z10.0000
M02
It measures the first time, then i goes to the destination XY, goes to Z10 as it should and it measures as it should. But after the measure it stops. Any ideas on how to fix that? I've come so far with that but it seems to be only one small thing.