Trying to get the following behavior:
Move to pierce height
Jet on
ramp from pierce height to cut height over leadin with leadin taking pierce delay time
continues cut at feed rate
This is a dynamic pierce
Currently getting:
Move to pierce height
jet on
lower to cut height at plunge feed rate
cut leadin at cuting feed rate
Attached are an example gcode file and post I am using. Maybe This isnt possible or I have something set wrong.
waterjet pierce
waterjet pierce
- Attachments
-
- N0010 (Filename RARS_ELEC_PLATE_1_8.txt
- (2.97 KiB) Downloaded 75 times
-
- LinuxCNC Waterjet TXRX 11-16-23.scpost
- (3.86 KiB) Downloaded 71 times
Re: waterjet pierce
I noticed in the .scpost in OnPenDown() that the pierce delay has been commented out, so effectively zero seconds. Thus if you change the Leadin Type to Ramp (in the Tool def) doesn't that give you the pierce outcome that you want ? If so, then you can either adjust plungeRate to suit the ramp-down time you want.
Or consider using this OnPenDown() function substitute in your .scpost to calculate a Ramp down feedrate based on pierceDelay value.
corrected: ModalNumber()...
Also, ModalNumber() function is handy so that the same exact text (including format of number) is not posted twice on consecutive calls. So I use it in this case to post the real plungeRate as a comment after overriding it with the calculated plungeRate (rampSpeed). In order for this to work as planned, the ModalNumber(" F", ... ) stmts in OnMove() and OnArc() must be exactly the same formatting text, so change those stmts to use global var FRformat (feedrate format) so they are sure to match. Notice OnMove() and OnArc() had been using differing " F" word formatting.
Or consider using this OnPenDown() function substitute in your .scpost to calculate a Ramp down feedrate based on pierceDelay value.
Code: Select all
function OnPenDown()
post.ModalText (" o<touchoff> call")
post.Eol()
post.ModalText (" G00")
post.ModalNumber (" Z", pierceHeight * scale, "0.0000")
post.Text ("\n M03 M07\n")
if pierceDelay > 0 then
if leadinType ~= 0 then --assume this is a Ramp style leadin
local rampDistance = math.abs(pierceHeight - cutHeight) * 1.414 -- 45deg ramp angle
local rampSpeed = rampDistance / pierceDelay * 60 --speed in units/minute
post.ModalNumber(" F", rampSpeed * scale, FRformat) --post Ramp speed to match pierceDelay
post.Text(" (overriding plungeRate of:")
-- now ModalNumber() here will nullify posting the same value in OnMove() or OnArc() later
post.ModalNumber(" F", plungeRate * scale, FRformat)
post.Text(" )\n")
else
post.NonModalNumber(" G04 P", pierceDelay, "0.##")
post.Eol()
end
end
end
FRformat = "0.##"
Also, ModalNumber() function is handy so that the same exact text (including format of number) is not posted twice on consecutive calls. So I use it in this case to post the real plungeRate as a comment after overriding it with the calculated plungeRate (rampSpeed). In order for this to work as planned, the ModalNumber(" F", ... ) stmts in OnMove() and OnArc() must be exactly the same formatting text, so change those stmts to use global var FRformat (feedrate format) so they are sure to match. Notice OnMove() and OnArc() had been using differing " F" word formatting.
Last edited by bLouChip on Thu Dec 28, 2023 7:19 pm, edited 1 time in total.
MillRight CNC MegaV XL XYZA Tri-CAM Mill/Plasma/Laser
grbl 1.1i, UGS, Win 11, LightBurn, SC, Aspire, and sometimes [con]Fusion360
my youtube channel
grbl 1.1i, UGS, Win 11, LightBurn, SC, Aspire, and sometimes [con]Fusion360
my youtube channel
Re: waterjet pierce
Just FYI. Per Les, the ramp lead always ramps at a 45 degree angle.