Kod: Zaznacz cały
o<touchoff> sub
(#1 pierce height, #2 pierce delay, #3 cut height)
#<arc-fails> = 0
F40
o100 do
G38.2 Z-1.25 (Probe to find the surface)
G91
G1 Z0.185 (Raise up to Z0)
G90
G92 Z0 (Set Z0)
G1 Z#1 (Raise to pierce height)
M3 S1 (Fire torch)
M66 P0 L1 Q2 (Wait 2 seconds for Arc OK from Torch)
o200 if [#5399 EQ -1] (Check to see if torch failed to fire)
(MSG, Arc Fail)
M5
#<arc-fails> = [#<arc-fails> + 1]
o300 if [#<arc-fails> GT 3.0000] (Check if torch has failed 4 times in a row)
Z2.0000 (raise torch high enough to change consumables)
#<arc-fails> = 0 (reset arc failure counter)
M1 (pause)
o300 endif
o200 endif
o100 while [[#5399 EQ -1]]
G4 P#2 (Pause for pierce delay)
F25
Z#3 (goto cut height)
o<touchoff> endsub
M2