Hello, i search a post processor for my cnc System

controller is the cc-s3c
and the thc is xpthc-4

the code functions is for the cc-s3c:

Code Function
G00 - Fast positioning point to point
G01 - Linear cutting
G02 - Circular cutting clockwise
G03 - Circular cutting anti-clockwise
G04 - Dwell (Stop-delay)
G22 - Recycle (should be used with G80)
G26 - Back to reference point axis X
G27 - Back to reference point axis Y
G28 - Back to reference point axis X and Y
G40 - Cancel kerf compensation
G41 - Kerf compensation left
G42 - Kerf compensation Right
G70 - English units
G71 - Metric units
G80 - Cancel recycle (Should be used with G22)
G90 - Absolute distance mode
G91 - Incremental distance mode
G92 - Reference point set-up
G97 - Recyle
G98 - To open a sub-programme (should be used with G99)
G99 - To go back to programme (should be used with G98)


M00 - Stop programme
M02/M30- Programme ended
M07/M08- Cutting oxygen valve ON/OFF
Plasma cutter ON/OFF
M14/M15- Torch up ON/OFF
M24/M25- Preheat oxygen ON/OFF
M38 - THC ON
M39 - THC OFF
M50 - Preheat pierce cycle
M51 - Turning OFF cycle function
M52 - Turning OFF cutting cycle function
M70 - Torch up function
M71 - Torch down function
M80 Power OFF (all output after M80 will be shut down)

ERROR Code Description

01H - Overflow/illegal characters in programme
20H - Division overflow
21H - Error starting/ending point of arc (G02 G03)
22H - Error radius of arc (G02 G03)
24H - Error condition of arc (G02 G03)
2AH - Overflow programme lines No torch movement of this line
34H - Illegal operation
40H - Emergency stop pressed
41H - Limit X+
42H - Limit X-
43H - Limit Y+
44H - Limit Y-
45H - Negative limit of software coordinate
46H - Positive limit of software coordinate

the common parameters of thc
P1- ARC setting
P2-Piercing time
P3-IHS height
P4- dynamic pierce height
P5- Arc sampling logic
P6- limit logic
P7- Corner singal logic
P8- Up Height of Arc off
P9- proximity switch IHS logic

I need a post processor for this parts.
procedure what I want.
I drive manually to the 0 point on the sheet metal.
then the torch should set the sheet metal to 0 point and go back up to the cutting height (which height I have set for this sheet metal thickness). when piercing, the torch should rise a little and then return to cutting height after piercing.

my actuall post processor:
function OnAbout(event)
ctrl = event:GetTextCtrl()
ctrl:AppendText("START post processor\n")
ctrl:AppendText("\n")
ctrl:AppendText("Non modal G-codes\n")
ctrl:AppendText("Modal coordinates\n")
ctrl:AppendText("No comments\n")
ctrl:AppendText("Incremental\n")
end


-- Created 30/6/2006



function OnInit()
post.Text("%\n")
if(scale == metric) then
post.Text ("G71\n") --metric mode
else
post.Text ("G70\n") --inch mode
end
post.Text ("G91\nG40\nG92X0Y0\n")
bigarcs = 1 --stitch arc segments together
minArcSize = 0.2 --arcs smaller than this are converted to moves
curx =0
cury =0
firstmove = 1
end


function OnFinish()
OnPenUp()
endX = 0
endY = 0
OnRapid()
post.Text ("M30\n")
end

function OnRapid()
if(firstmove == 1) then
firstmove=0
return
end
if (math.hypot(endX - currentX, endY - currentY) < 0.01) then return end
post.Text("G0");
doxy()
post.Eol()
end

function OnMove()
if (math.hypot(endX - currentX, endY - currentY) < 0.01) then return end
post.Text("G1");
doxy()
-- post.ModalNumber("F", feedRate * scale, "0")
post.NonModalNumber("F", feedRate * scale, "0")
post.Eol()
end

function doxy()
tmp = (endX * scale) - curx
tmp = math.toint(tmp * 1000)/1000
curx = curx + tmp
if(tmp ~=0) then
post.NonModalNumber("X",tmp,"0.0##")
end

tmp = (endY * scale) - cury
tmp = math.toint(tmp * 1000)/1000
cury = cury + tmp
if(tmp ~=0) then
post.NonModalNumber("Y",tmp,"0.0##")
end
end

function OnArc()
if(arcAngle <0) then
post.Text ("G03")
else
post.Text ("G02")
end
doxy()
if((arcCentreX - currentX) ~=0) then
post.NonModalNumber ("I", (arcCentreX - currentX) * scale, "0.0##")
end
if((arcCentreY - currentY) ~=0) then
post.NonModalNumber ("J", (arcCentreY - currentY) * scale, "0.0##")
end
--post.ModalNumber("F", feedRate * scale, "0")
post.NonModalNumber("F", feedRate * scale, "0")
post.Eol()
end

function OnPenDown()
post.Text("M50\n")
end

function OnPenUp()
post.Text("M08\n")
post.Text("G04 L1\n")
end

function OnDrillStart()
if(toolClass == "DrillTool") then
post.CancelModalNumbers()
post.Text("M68\n")
firstmove=0
currentX = endX + 0.1
end
end

function OnDrillEnd()
if(toolClass == "DrillTool") then
post.Text("M69\n")
end
end


function OnDrill()
OnRapid()
if(toolClass == "DrillTool") then
post.Text("M66\n")
else
OnPenDown()
OnPenUp()
end
end


i think this is not right. i need help.

Similar Threads: