summaryrefslogtreecommitdiff
path: root/configs/sim/axis/remap/extend-builtins/nc_subroutines/extend_m1.ngc
blob: 4b1bee9ccc0cebe056657166e2f2484c52d4f3f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
; extend M1 to:
; turn off spindle, flood, mist if optional stop = 1 and block delete is off
;
; on cycle restart:
; turn on spindle
; turn mist on if it was on before the m1
; turn flood on if it was on before the m1

o<extend_m1> sub
(debug, extend_m1:)

; record whether mist/flood were on
#<mist> = #<_mist>
#<flood> = #<_flood>

/M5 M9 ; stop spindle, mist+flood off

/m1 (refer to builtin m1)

; restore mist, flood setting
/o100 if [#<mist>]
/      m7
/o100 endif

/o200 if [#<flood>]
/      m8
/o200 endif

/M3 ; spindle on

(debug, extend_m1 done)

o<extend_m1> endsub
m2