adding files
This commit is contained in:
4
my-emco-compact-5/custom-m-codes/M103
Normal file
4
my-emco-compact-5/custom-m-codes/M103
Normal file
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
# axis reload after
|
||||
axis-remote --reload
|
||||
exit 0
|
||||
5
my-emco-compact-5/custom-m-codes/M199
Normal file
5
my-emco-compact-5/custom-m-codes/M199
Normal file
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
# set spindle speed gain corresponding to selected motor-spindle-belt-wheel
|
||||
halcmd setp scale.1.gain $1
|
||||
halcmd setp scale.1.offset $2
|
||||
exit 0
|
||||
37
my-emco-compact-5/custom-m-codes/extend_m0.ngc
Normal file
37
my-emco-compact-5/custom-m-codes/extend_m0.ngc
Normal file
@@ -0,0 +1,37 @@
|
||||
; extend M0 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_m0> sub
|
||||
;(debug, extend_m0:)
|
||||
|
||||
; record whether mist/flood were on
|
||||
#<mist> = #<_mist>
|
||||
#<flood> = #<_flood>
|
||||
#<spindle_on> = #<_spindle_on>
|
||||
|
||||
M5 M9 ; stop spindle, mist+flood off
|
||||
|
||||
m0 (refer to builtin m0)
|
||||
|
||||
; restore mist, flood setting
|
||||
o100 if [#<mist>]
|
||||
m7
|
||||
o100 endif
|
||||
|
||||
o200 if [#<flood>]
|
||||
m8
|
||||
o200 endif
|
||||
|
||||
o300 if [#<spindle_on>]
|
||||
m3 ; spindle on
|
||||
o300 endif
|
||||
|
||||
;(debug, extend_m0 done)
|
||||
|
||||
o<extend_m0> endsub
|
||||
m2
|
||||
34
my-emco-compact-5/custom-m-codes/extend_m1.ngc
Normal file
34
my-emco-compact-5/custom-m-codes/extend_m1.ngc
Normal file
@@ -0,0 +1,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
|
||||
31
my-emco-compact-5/custom-m-codes/mysetspeed.ngc
Normal file
31
my-emco-compact-5/custom-m-codes/mysetspeed.ngc
Normal file
@@ -0,0 +1,31 @@
|
||||
o<mysetspeed> sub
|
||||
(DEBUG, S#<speed> setspeed)
|
||||
o10 if [#<speed> LE 950]
|
||||
o11 if [#4997 NE 1]
|
||||
(MSG, Set spindle speed selection belt in AC1 position)
|
||||
O<myspindlegain> call [0.48483] [20.16466]
|
||||
#4997 = 1
|
||||
o11 endif
|
||||
o10 else
|
||||
o20 if [#<speed> LE 1500]
|
||||
o21 if [#4997 NE 2]
|
||||
(MSG, Set spindle speed selection belt in AC2 position)
|
||||
O<myspindlegain> call [0.32571] [-8.05714]
|
||||
#4997 = 2
|
||||
o21 endif
|
||||
o20 else
|
||||
o30 if [#<speed> LE 2400]
|
||||
o31 if [#4997 NE 3]
|
||||
(MSG, Set spindle speed selection belt in AC3 position)
|
||||
O<myspindlegain> call [0.20098] [22.64117]
|
||||
#4997 = 3
|
||||
o31 endif
|
||||
o30 else
|
||||
(MSG, Unsupported spindle speed. will continue anyway. Safest is probably to abort and regenerate program)
|
||||
o30 endif
|
||||
o20 endif
|
||||
o10 endif
|
||||
S#<speed>
|
||||
M0
|
||||
o<mysetspeed> endsub [1]
|
||||
M2
|
||||
6
my-emco-compact-5/custom-m-codes/myspindlegain.ngc
Normal file
6
my-emco-compact-5/custom-m-codes/myspindlegain.ngc
Normal file
@@ -0,0 +1,6 @@
|
||||
o<myspindlegain> sub
|
||||
M199 P#1 Q#2
|
||||
#4998 = #1
|
||||
#4999 = #2
|
||||
o<myspindlegain> endsub
|
||||
M2
|
||||
12
my-emco-compact-5/custom-m-codes/myspindlespeeddown.ngc
Normal file
12
my-emco-compact-5/custom-m-codes/myspindlespeeddown.ngc
Normal file
@@ -0,0 +1,12 @@
|
||||
o<myspindlespeeddown> sub
|
||||
o10 if [#<_spindle_on> EQ 1]
|
||||
O20 if [#<_rpm> GT 100]
|
||||
#<speed-cmd> = [#<_rpm> - 100]
|
||||
O20 else
|
||||
#<speed-cmd> = 0
|
||||
M5
|
||||
O20 endif
|
||||
S#<speed-cmd>
|
||||
o10 endif
|
||||
o<myspindlespeeddown> endsub
|
||||
M2
|
||||
11
my-emco-compact-5/custom-m-codes/myspindlespeedup.ngc
Normal file
11
my-emco-compact-5/custom-m-codes/myspindlespeedup.ngc
Normal file
@@ -0,0 +1,11 @@
|
||||
o<myspindlespeedup> sub
|
||||
;o10 if [#<_spindle_on> EQ 1]
|
||||
#<speed-cmd> = [#<_rpm>+100]
|
||||
O10 if [#<speed-cmd> GT 4500]
|
||||
#<speed-cmd> = 4500
|
||||
O10 endif
|
||||
S#<speed-cmd>
|
||||
M3
|
||||
;o10 endif
|
||||
o<myspindlespeedup> endsub
|
||||
M2
|
||||
10
my-emco-compact-5/custom-m-codes/myspindlestart.ngc
Normal file
10
my-emco-compact-5/custom-m-codes/myspindlestart.ngc
Normal file
@@ -0,0 +1,10 @@
|
||||
o<myspindlestart> sub
|
||||
o10 if [#<_spindle_on> EQ 1]
|
||||
M5
|
||||
o10 else
|
||||
S800
|
||||
M3
|
||||
o10 endif
|
||||
;M103
|
||||
o<myspindlestart> endsub
|
||||
M2
|
||||
23
my-emco-compact-5/custom-m-codes/mytouch.ngc
Normal file
23
my-emco-compact-5/custom-m-codes/mytouch.ngc
Normal file
@@ -0,0 +1,23 @@
|
||||
o<mytouch> sub
|
||||
o10 if [EXISTS[#<_hal[jog-axis-sel]>]]
|
||||
#<selected-axis> = #<_hal[jog-axis-sel]>
|
||||
;(DEBUG, my-mpg.axis-selector: #<selected-axis>)
|
||||
|
||||
(touch off)
|
||||
o20 if [#<selected-axis> EQ 0]
|
||||
G10 L20 P0 X0
|
||||
M103
|
||||
(MSG, touch off x axis)
|
||||
o20 endif
|
||||
|
||||
(touch off z axis)
|
||||
o30 if [#<selected-axis> EQ 1]
|
||||
G10 L20 P0 Z0
|
||||
M103
|
||||
(MSG, touch off z axis)
|
||||
o30 endif
|
||||
o10 else
|
||||
(DEBUG, didn't exist)
|
||||
o10 endif
|
||||
o<mytouch> endsub
|
||||
M2
|
||||
Reference in New Issue
Block a user