z axis reference slow down
z axis reference slow down
When my torch goes down to sense the plate, it slows down when it gets to pierce height, if im not mistaken.
How can i always have it slow down at 1/4" from the plate, regardless of the pierce height?
I think its in the post-proc., but im not sure...
using MP3000-DTHCII-DCC-Hyt-scriber8
Thank you
Richard
How can i always have it slow down at 1/4" from the plate, regardless of the pierce height?
I think its in the post-proc., but im not sure...
using MP3000-DTHCII-DCC-Hyt-scriber8
Thank you
Richard
Hi Richard,
I don't use that post processor, but I looked at it and learned that this is not an easy thing to do. I edited the "OnPedDown" and "Reference" functions to output text in the gCode to show when they are called in relation to the coordinate that you want to change, and below is what I got.
You can see from this code that the torch moves to the (x,y) coordinate above the pierce, then to the pierce height BEFORE calling the OnPenDown function which calls the Reference function. My hope was that I could modify the OnPenDown function to achieve what you want, but since it is called after the torch is moved to pierce height this is not an option.
With that being said, there are a couple ways we could still achieve what you want. Here I edited the OnRapid function by forcing a 0.25 in for the Z if the torch is making a rapid move to pierce hieght:
However, if you want to avoid having to hard code this value, you can create a custom variable that will allow you to change it without having to edit the post. Here is an example of the code to do that:
If you use this approach, you just need to replace the hard-coded "0.25" in the OnRapid function with the variable refHeight. Again, I dont have a machine like yours and dont use this post so please keep one hand on the e-stop when you are testing any modifications like this!
Let me know if you have more questions.
Thanks,
Clay
I don't use that post processor, but I looked at it and learned that this is not an easy thing to do. I edited the "OnPedDown" and "Reference" functions to output text in the gCode to show when they are called in relation to the coordinate that you want to change, and below is what I got.
Code: Select all
N0590 X44.5658 Y41.0695
N0600 Z2.0320
N0610 (________ Beginning of OnPenDown ________)
N0620 (________ Beginning of Reference ________)
N0630 G28.1 Z3.00 F500.0
N0640 G92 Z0.0
N0650 G00 Z1.5000
N0660 G92 Z0.0
N0670 G00 Z2.0320
With that being said, there are a couple ways we could still achieve what you want. Here I edited the OnRapid function by forcing a 0.25 in for the Z if the torch is making a rapid move to pierce hieght:
Code: Select all
function OnRapid()
if(endX < 1e17 and endY < 1e17) then --don't update the distance moved if X or Y are unknown
local len = math.hypot((endX + offX)-currentX , (endY + offY)-currentY)
dist = dist + len
end
post.ModalText (" G00")
post.ModalNumber (" X", (endX + offX) * scale, "0.0000")
post.ModalNumber (" Y", (endY + offY) * scale, "0.0000")
if(toolClass == "MarkerTool") then
if(firstRef == true) or (finalCut == true) or (markerZ == true) then
post.ModalNumber (" Z", safeZ * scale, "0.0000")
end
finalCut = false
else --this is not a marker tool
if(endZ == pierceHeight) then
post.ModalNumber (" Z", 0.25, "0.0000") --THIS FORCES 0.25 IF WE ARE MOVING TO PIERCE HEIGHT
else
post.ModalNumber (" Z", endZ * scale, "0.0000")
end
end
post.Eol()
end
Code: Select all
post.DefineCustomToolParam("PlasmaTool", "Reference Height", "refHeight", sc.unit3DECPLACE, 0.25, 0, 999)
Let me know if you have more questions.
Thanks,
Clay
all yoou should have to do is add in a piece of code to Rapid to Z0.250 before the REFHOME call. Here is a sample of the old code and new code to replace it with.
SHould WORK (;-)
function Reference()
firstRef = false
if (refHome) then
post.ModalText(" G28.1 Z")
post.Number(3 * scale, "0.00")
else
post.ModalText(" G31 Z -100")
end
post.ModalNumber (" F", refFeed * scale, "0.0###")
post.Eol()
post.ModalText(" G92 Z0.0\n")
post.ModalText (" G00")
post.Text(" Z")
post.Number (switchOffset * scale, "0.0000")
post.Eol()
post.ModalText(" G92 Z0.0\n")
end
NEW section********************************
function Reference()
firstRef = false
if (refHome) then
post.ModalText("G00 Z0.250") ' Rapid to Z0.250" before Ref
post.ModalText(" G28.1 Z")
post.Number(3 * scale, "0.00")
else
post.ModalText("G00 Z0.250") ' Rapid to Z0.250" before Ref
post.ModalText(" G31 Z -100")
end
post.ModalNumber (" F", refFeed * scale, "0.0###")
post.Eol()
post.ModalText(" G92 Z0.0\n")
post.ModalText (" G00")
post.Text(" Z")
post.Number (switchOffset * scale, "0.0000")
post.Eol()
post.ModalText(" G92 Z0.0\n")
end
SHould WORK (;-)
function Reference()
firstRef = false
if (refHome) then
post.ModalText(" G28.1 Z")
post.Number(3 * scale, "0.00")
else
post.ModalText(" G31 Z -100")
end
post.ModalNumber (" F", refFeed * scale, "0.0###")
post.Eol()
post.ModalText(" G92 Z0.0\n")
post.ModalText (" G00")
post.Text(" Z")
post.Number (switchOffset * scale, "0.0000")
post.Eol()
post.ModalText(" G92 Z0.0\n")
end
NEW section********************************
function Reference()
firstRef = false
if (refHome) then
post.ModalText("G00 Z0.250") ' Rapid to Z0.250" before Ref
post.ModalText(" G28.1 Z")
post.Number(3 * scale, "0.00")
else
post.ModalText("G00 Z0.250") ' Rapid to Z0.250" before Ref
post.ModalText(" G31 Z -100")
end
post.ModalNumber (" F", refFeed * scale, "0.0###")
post.Eol()
post.ModalText(" G92 Z0.0\n")
post.ModalText (" G00")
post.Text(" Z")
post.Number (switchOffset * scale, "0.0000")
post.Eol()
post.ModalText(" G92 Z0.0\n")
end
Vmax549,
I copied and pasted your code and this was the output after I removed the comment to get it to compile:
after adding the end of lines and spaces the function looks like this:
the output is now this:
So, does this move to 0.25 prior to reference? Yes, but only after it moves to pierce height. So if pierce height is less than 0.25" (which it likely is on anything less than 3/4" plate) the torch is going to go down to pierce height (0.08" in this case), then up to 0.25", then down to reference the Z. Whether this extra time, movement, and proximity to material for a rapid is acceptable is up to you Richard. Perhaps can you explain why you initially wanted this?
Thanks,
Clay
I copied and pasted your code and this was the output after I removed the comment to get it to compile:
Code: Select all
N0200 X3.3970 Y0.4879
N0210 Z0.0800
N0220G00 Z0.250 G28.1 Z0.12 F19.685
N0230 G92 Z0.0
N0240 G00 Z0.0591
N0250 G92 Z0.0
N0260 G00 Z0.0800
Code: Select all
function Reference()
firstRef = false
if (refHome) then
post.ModalText(" G00 Z0.250")
post.Eol()
post.ModalText(" G28.1 Z")
post.Number(3 * scale, "0.00")
else
post.ModalText(" G00 Z0.250")
post.Eol()
post.ModalText(" G31 Z -100")
end
post.ModalNumber (" F", refFeed * scale, "0.0###")
post.Eol()
post.ModalText(" G92 Z0.0\n")
post.ModalText (" G00")
post.Text(" Z")
post.Number (switchOffset * scale, "0.0000")
post.Eol()
post.ModalText(" G92 Z0.0\n")
end
Code: Select all
N0200 X3.3970 Y0.4879
N0210 Z0.0800
N0220 G00 Z0.250
N0230 G28.1 Z0.12 F19.685
N0240 G92 Z0.0
N0250 G00 Z0.0591
N0260 G92 Z0.0
N0270 G00 Z0.0800
Thanks,
Clay
I see where it puts in the Pierce height. It is at the end of the Rapid move ???.
I corrected what I thought would do it BUT it is doubling some of the posted Gcode when it should NOT. It is making some loops back through through the code that I do not understand or follow (;-)
We will have to ask LES on this one.
(;-) TP
I corrected what I thought would do it BUT it is doubling some of the posted Gcode when it should NOT. It is making some loops back through through the code that I do not understand or follow (;-)
We will have to ask LES on this one.
(;-) TP
- Les Newell
- Site Admin
- Posts: 3683
- Joined: Thu May 11, 2006 8:12 pm
The move to pierce height comes from within SheetCam. The sequence of events for a pierce is as follows:
Rapid to cut start X,Y
Rapid to pierce height
call OnPenDown() where the reference is performed
To stop above pierce height we need to modify the post so it intercepts the move to pierce height. This is fairly easy to do. Edit your post and look for function OnRapid(). This function runs every time a rapid move is needed. Now look for this line:
Now we add a check for the Z move to pierce height:
The post always uses metric even if it is outputting inches so I used 6mm in this example. Of course you can use any value here.
Rapid to cut start X,Y
Rapid to pierce height
call OnPenDown() where the reference is performed
To stop above pierce height we need to modify the post so it intercepts the move to pierce height. This is fairly easy to do. Edit your post and look for function OnRapid(). This function runs every time a rapid move is needed. Now look for this line:
Code: Select all
post.ModalNumber (" Z", endZ * scale, "0.0000")
Code: Select all
if endZ == pierceHeight then
endZ = 6
end
post.ModalNumber (" Z", endZ * scale, "0.0000")
- Les Newell
- Site Admin
- Posts: 3683
- Joined: Thu May 11, 2006 8:12 pm
Plunge safety is only used when milling, routing or drilling. Instead of moving directly to the top of the work at rapid speed it stops just short and moves the rest of the way at feed rate. This prevents damage to the cutter if the work isn't perfectly positioned or there are some chips in the way.WyoGreen wrote:I'm not sure, but I think what you are talking about is Plunge safety clearance, which is set in Sheetcam under Options/Job options/Material, at the bottom of the Job options box.
However the post has access to this value so it could be re purposed for plasma cutting. Here is a modified version of my previous code:
Code: Select all
if endZ == pierceHeight then
endZ = plungeSafety
end
post.ModalNumber (" Z", endZ * scale, "0.0000")
This is a nice solution but it has one major pitfall. Plunge safety is saved with your job and the default is 0.5mm. If you modify your post like this then load an old job and forget to change the plunge safety clearance you may get an unpleasant surprise when you run the job.
Thanks guys for the help, and thanks Les, ill try that.
I asked this, because on thick plate, i slow down to ref. speed too high,
it just takes more time.
On thin, if the plate is warped a little, sometimes the torch hits the plate while coming down to pierce height.
That's why i thought to always start ref. at around 1/4".
Richard
I asked this, because on thick plate, i slow down to ref. speed too high,
it just takes more time.
On thin, if the plate is warped a little, sometimes the torch hits the plate while coming down to pierce height.
That's why i thought to always start ref. at around 1/4".
Richard