Advertisement
Guest User

Untitled

a guest
Jun 27th, 2014
274
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.14 KB | None | 0 0
  1. function OnRapid()
  2. post.Text("( endZ: ")
  3. post.Number((endZ + toolOffset) * scale, "0.0000")
  4. post.Text(", pierceHeight: ")
  5. post.Number(pierceHeight * scale, "0.0000")
  6. post.Text(")")
  7.  
  8. if((endZ+toolOffset) == pierceHeight) then
  9. post.Text("(nuke!)")
  10. post.Eol()
  11. else
  12. post.Text("(things!)")
  13. end
  14.  
  15. post.ModalText ("G0")
  16. post.ModalNumber (" X", endX * scale, "0.0000")
  17. post.ModalNumber (" Y", endY * scale, "0.0000")
  18. post.ModalNumber (" Z", (endZ + toolOffset) * scale, "0.0000")
  19. post.Eol()
  20. end
  21.  
  22. M5 (Torch Off)
  23. ( endZ: 0.5000, pierceHeight: 0.0800)(things!)G0 Z0.5000
  24. ( endZ: 0.5000, pierceHeight: 0.0800)(things!) X4.5847 Y6.8003
  25. ( endZ: 0.0800, pierceHeight: 0.0800)(nuke!)
  26. Z0.0800
  27. o<touchoff> call [0.080] [0.1] [0.02] (Touchoff and start cutting)
  28.  
  29.  
  30. ==================================================================
  31.  
  32. function OnRapid()
  33. post.Text("( endZ: ")
  34. post.Number((endZ + toolOffset) * scale, "0.0000")
  35. post.Text(", pierceHeight: ")
  36. post.Number(pierceHeight * scale, "0.0000")
  37. post.Text(")")
  38.  
  39. if((endZ+toolOffset) == pierceHeight) then
  40. post.Text("(nuke!)")
  41. post.Eol()
  42. else
  43. post.Text("(things!)")
  44. post.ModalText ("G0")
  45. post.ModalNumber (" X", endX * scale, "0.0000")
  46. post.ModalNumber (" Y", endY * scale, "0.0000")
  47. post.ModalNumber (" Z", (endZ + toolOffset) * scale, "0.0000")
  48. post.Eol()
  49. end
  50.  
  51. end
  52.  
  53. M5 (Torch Off)
  54. ( endZ: 0.5000, pierceHeight: 0.0800)(things!)G0
  55. ( endZ: 0.5000, pierceHeight: 0.0800)(things!) X4.5847 Y6.8003
  56. ( endZ: 0.0800, pierceHeight: 0.0800)(nuke!)
  57. o<touchoff> call [0.080] [0.1] [0.02] (Touchoff and start cutting)
  58.  
  59.  
  60. ===================================================================
  61.  
  62.  
  63. O<touchoff> SUB
  64. #<switch_offset> = 0.00
  65. #<pierce_height> = #1
  66. #<pierce_delay> = #2
  67. #<cut_height> = #3
  68.  
  69. M1
  70. (G53 G0 Z0)
  71. (G92 Z0)
  72. G91
  73. G38.2 Z-1 F20
  74. G90
  75. G0 Z[#5063 + #<switch_offset>]
  76. G92 Z0
  77. G1 Z#<pierce_height>
  78.  
  79. M3 S1
  80. M66 P0 L1 Q5 (wait for arc-ok on digital-in-00 to rise, timeout 5 sec)
  81. G4 P#<pierce_delay>
  82. G1 Z#<cut_height> F20
  83.  
  84. O<touchoff> ENDSUB
  85. M2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement