Rotary Plasma Scribe Post Offset Problem??

Having problems with or questions about SheetCam? Post them here.
Wolfes Metal Fab
Posts: 64
Joined: Wed Jan 14, 2009 6:08 am

Post by Wolfes Metal Fab »

Ok worked with it a little more while i was not in a rush.

Here is what i have so far

function Reference()
firstRef = false
local matZ = sc.QueryDll(qryCHKEND, endY, dllId)
if (toolClass == "MarkerTool" or tool> 99) then
post.Text(" M09\n")
end
if (refHome) then
post.ModalText(" G28.1 Z")
post.Number((3 + matZ) * scale, "0.00")
else
post.ModalText(" G31 Z -100")
end
post.ModalNumber (" F", refFeed * scale, "0.0###")
post.Eol()
post.ModalText(" G92 Z")
post.Number ((matZ - switchOffset) * scale, "0.0000")
post.Eol()
if (toolClass == "MarkerTool" or tool > 99 ) then
local clearZ = sc.QueryDll(qryGETSAFEZ, 0, dllId) --guaranteed safe clearance height ---------Added
endZ = (safeZ + clearZ) --safe clearance height ---------Added
post.ModalText (" G00") ---------Added
post.ModalNumber (" " .. currentZAxis, (endZ + offZ) * scale, "0.0000") ---------Added
post.Eol() ---------Added
post.Text(" M08\n")
end
end

And it puts out....

N0010 (Filename: 1.5 square tube Chair test.tap)
N0020 (Post processor: PlasmaRotary Mach3 swapped axes.scpost)
N0030 (Date: 12/11/2014)
N0040 G20 (Units: Inches)
N0050 F1
N0060 G53 G90 G40
N0070 G00 Z1.6947
N0080 (Part: 1.5 square tube Chair)
N0090 (Operation: No Offset, scribe, T202: Plate marker 50 FineCut)
N0100 G00 Y0.9315 X-0.4689 Z1.5000 A0.0000
N0110 Z1.2500
N0120 M09
N0130 G28.1 Z0.87 F50.0
N0140 G92 Z0.7402
N0150 G00 Z1.6947 ---------before M08 is good
N0160 M08
N0170 G00 -----------this is now empty, it will probably be ok, but not sure why it disappeared
N0180 Y0.9319 X-3.4400
N0190 Z1.2500
N0200 G01 Y0.9345 X-3.4279

Is this a good fix, and did i mess up any hidden things by grabbing that z height?

Thought i had a problem, but my A axis was switched again for some reason, fixed the problem, now we are good to go i think.....

Brian
User avatar
Les Newell
Site Admin
Posts: 3681
Joined: Thu May 11, 2006 8:12 pm

Post by Les Newell »

Your solution should work. I would put the M08 in OnPenDown():

function OnPenDown()
sc.QueryDll(qryRAPIDY, endY, dllId)
local matZ = sc.QueryDll(qryCHKEND, currentY, dllId)
if(toolClass == "MarkerTool") or tool > 99 then
if (firstRef) then
local ez = endZ
Reference()
local clearZ = sc.QueryDll(qryGETSAFEZ, 0, dllId) --guaranteed safe clearance height
local ex = endX --cache end of move
local ey = endY
endX = currentX --don't move X,Y yet
endY = currentY
endZ = safeZ + (clearZ - matZ) --safe clearance hight
if(scriberZ >= 0) then
offZ = scriberZ --use the highest offset to ensure everything clears
end
OnRapid()
post.Text(" M08\n")
currentY = endY --currentY changed when we last called OnRapid() so reset it
offZ = scriberZ --apply scriber offsets
offX = scriberX
offY = scriberY
OnRapid()
currentY = endY
endZ = ez --move down to cut height
OnRapid()
endX = ex --restore move end coordinates
endY = ey
end
--post.Text(" M08\n") --removed and done in toolchange instead
else
if(dist >= refDistance) then
dist = 0
Reference();
end
post.ModalText (" G00")
post.Text(" Z")
post.Number ((matZ + pierceHeight) * scale, "0.0000")
post.Eol()
if (preheat > 0) then
post.Text ("\n G04 P")
post.Number (preheat,"0.###")
post.Eol()
end
post.Text ("\n M03\n")
end
if (pierceDelay > 0) then
post.Text (" G04 P")
post.Number (pierceDelay,"0.###")
post.Eol()
end
end
Wolfes Metal Fab
Posts: 64
Joined: Wed Jan 14, 2009 6:08 am

Post by Wolfes Metal Fab »

Wouldn't this undo what i already changed? I modified it so that it does not activate the M8 Scribe solenoid every time it lifts because it takes too much time, not 100% consistent on lowering time, cycles the solenoid alot, and i can eliminate the start and end divot if it is already running and just lowered into the work and moved instead of being air plunged into the part hard.

That was the reasoning behind 1 M8 at scribe toolchange, and 1 M9 at toolchange from Scribe.

Unless I am reading the post code wrong and it would still function this way.

Brian
User avatar
Les Newell
Site Admin
Posts: 3681
Joined: Thu May 11, 2006 8:12 pm

Post by Les Newell »

That part of the post only runs when it references so you will only see the M8 after it has referenced and lifted to a safe clearance height.
Post Reply