waterjet pierce

Having problems with or questions about SheetCam? Post them here.
Post Reply
rtavk3
Posts: 1
Joined: Wed Dec 27, 2023 4:08 am

waterjet pierce

Post by rtavk3 »

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.
Attachments
N0010 (Filename RARS_ELEC_PLATE_1_8.txt
(2.97 KiB) Downloaded 63 times
LinuxCNC Waterjet TXRX 11-16-23.scpost
(3.86 KiB) Downloaded 53 times
User avatar
bLouChip
Posts: 124
Joined: Tue Nov 09, 2021 4:58 pm
Location: Raleigh, NC
Contact:

Re: waterjet pierce

Post by bLouChip »

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.

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.##"
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.
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
User avatar
djreiswig
Posts: 484
Joined: Sat Feb 20, 2016 4:47 am
Location: SE Nebraska

Re: waterjet pierce

Post by djreiswig »

Just FYI. Per Les, the ramp lead always ramps at a 45 degree angle.
Post Reply