Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function OnRapid()
- post.Text("( endZ: ")
- post.Number((endZ + toolOffset) * scale, "0.0000")
- post.Text(", pierceHeight: ")
- post.Number(pierceHeight * scale, "0.0000")
- post.Text(")")
- if((endZ+toolOffset) == pierceHeight) then
- post.Text("(nuke!)")
- post.Eol()
- else
- post.Text("(things!)")
- end
- post.ModalText ("G0")
- post.ModalNumber (" X", endX * scale, "0.0000")
- post.ModalNumber (" Y", endY * scale, "0.0000")
- post.ModalNumber (" Z", (endZ + toolOffset) * scale, "0.0000")
- post.Eol()
- end
- M5 (Torch Off)
- ( endZ: 0.5000, pierceHeight: 0.0800)(things!)G0 Z0.5000
- ( endZ: 0.5000, pierceHeight: 0.0800)(things!) X4.5847 Y6.8003
- ( endZ: 0.0800, pierceHeight: 0.0800)(nuke!)
- Z0.0800
- o<touchoff> call [0.080] [0.1] [0.02] (Touchoff and start cutting)
- ==================================================================
- function OnRapid()
- post.Text("( endZ: ")
- post.Number((endZ + toolOffset) * scale, "0.0000")
- post.Text(", pierceHeight: ")
- post.Number(pierceHeight * scale, "0.0000")
- post.Text(")")
- if((endZ+toolOffset) == pierceHeight) then
- post.Text("(nuke!)")
- post.Eol()
- else
- post.Text("(things!)")
- post.ModalText ("G0")
- post.ModalNumber (" X", endX * scale, "0.0000")
- post.ModalNumber (" Y", endY * scale, "0.0000")
- post.ModalNumber (" Z", (endZ + toolOffset) * scale, "0.0000")
- post.Eol()
- end
- end
- M5 (Torch Off)
- ( endZ: 0.5000, pierceHeight: 0.0800)(things!)G0
- ( endZ: 0.5000, pierceHeight: 0.0800)(things!) X4.5847 Y6.8003
- ( endZ: 0.0800, pierceHeight: 0.0800)(nuke!)
- o<touchoff> call [0.080] [0.1] [0.02] (Touchoff and start cutting)
- ===================================================================
- O<touchoff> SUB
- #<switch_offset> = 0.00
- #<pierce_height> = #1
- #<pierce_delay> = #2
- #<cut_height> = #3
- M1
- (G53 G0 Z0)
- (G92 Z0)
- G91
- G38.2 Z-1 F20
- G90
- G0 Z[#5063 + #<switch_offset>]
- G92 Z0
- G1 Z#<pierce_height>
- M3 S1
- M66 P0 L1 Q5 (wait for arc-ok on digital-in-00 to rise, timeout 5 sec)
- G4 P#<pierce_delay>
- G1 Z#<cut_height> F20
- O<touchoff> ENDSUB
- M2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement