|
1.转速检测,包括最大和最小转速
+ c* D& n& _' n: z0 d b# _if { $mom_spindle_speed == 0.0 } {
* E+ w+ w/ X( l, b$ c #MOM_output_literal " ( ZERO SPINDLE SPEED PROGRAMMED )" 8 O/ x# a3 `% `% Z! h: F
#MOM_output_literal " M00 " ) b2 ]) z% w* X
set mom_spindle_speed 20. ;# dodge div.by zero in tap
+ v' S. ^2 U8 Q, u" |. s2 W set errmes "\n\n *** Spindle Speed Not set ***\n*** IN OPERATION $mom_operation_name ***\n\n"
) H) _- j# Z3 O% }8 z MOM_abort "$errmes" ) [! I/ ~+ e7 f( J: Z
8 n! E1 j) I/ \最大转速 5 @; ]3 d) X% w
if { $mom_spindle_speed > 10000 } {
$ o+ o S8 m2 {/ j3 Q, ^& u) q! v set errmes "\n\n *** Spindle Speed Over Max 10000 ***\n*** IN OPERATION $mom_operation_name ***\n\n"
1 P/ x( m8 v) V) H5 G" m MOM_abort "$errmes"
5 D' ~! E0 d1 w
6 l# p8 K, p& I: _* D最小转速
0 U# S9 |& U. i' F9 |* |if { $mom_spindle_speed < 50 } {
5 K' V- ~) t9 I set errmes "\n\n *** Spindle Speed Under Min 50 ***\n*** IN OPERATION $mom_operation_name ***\n\n" " q c0 d4 _7 r9 ]
MOM_abort "$errmes" S7 P* ?2 I% e* _; `7 f" Y1 i
) N9 o0 l j4 }& m0 |
4.刀具号未设置检测等..
9 d& A/ H# R+ E' \* Dif { $mom_tool_number == 0.0 } {
* F5 A5 \0 O4 b6 \ #MOM_output_literal " ( TOOL ZERO PROGRAMMED ) " ) b- s5 t5 l+ R
#MOM_output_literal " M00 "
' t w, z$ {: e4 Q. X set errmes "\n\n *** Tool Number Not set ***\n*** IN OPERATION $mom_operation_name ***\n\n" - g# m7 W1 N: V) W& g: q+ q
MOM_abort "$errmes"
% r9 a) o' Z% y3.进给检测# E! }9 Y/ s6 _; i2 _1 D4 ^
4.钻孔的安全平面检测, p" a y1 f- m; L, g
$ I: E2 K2 X! ]- \1 p- H- @以下主要是钻孔的一些常用检测功能# A: h! I! b8 u9 q1 }, @, q) I
global mom_cycle_retract_mode
# U" }9 }- T b' _3 i/ A, Mglobal mom_clearance_plane_usage
: q' g' T9 i' Lglobal mom_clearance_plane_status
9 \3 v+ h5 A w' K4 Uglobal mom_operation_name/ B0 S/ R' j3 e7 @- {/ A" d) Z5 F
global mom_cycle_cam6 h m# q0 ^" M$ Z# I. C' A
set alarm 0
I5 w. E! m# V* e: Oset em "\n\n OPERATION : $mom_operation_name \n\n "+ N% X( h0 W) `! k$ i
if { $mom_cycle_retract_mode != "AUTO" } { , e# e2 I4 {* F9 k
incr alarm $ k. |/ F3 t$ f- q9 b
set tt "\n\n RTCTO Mode not set to AUTO \n\n "; |* T, |& s& S# {
set em $em$tt 5 ^2 F1 Z+ H2 N
}$ s9 y6 N7 Y P; g: o; ?! A$ Q5 K3 H. V/ ^
if { $mom_clearance_plane_status != 1 } { $ f6 g' M2 u- P+ W* r+ }
incr alarm8 a% v8 _( S2 ~2 L6 a }8 P
set tt "\n\n Clearance Plane not Defined and Active \n\n "
" O4 K' ~! r9 c* }( x" D5 A/ }0 S set em $em$tt " g: f' M- ]& H' Z" _, s& d/ ? F
}
5 F- K: A# z1 y& ]! x, f. v2 {& cif { $mom_clearance_plane_usage != 1 } { # K7 }0 o0 [0 C M& @. \
incr alarm v0 {! y9 s$ d) f1 a
set tt "\n\n Clearance Plane not set to Start and End \n\n "
6 O$ ^& f! m, _# U0 z set em $em$tt $ M4 t7 T7 Q2 q9 a, L
}. I# h" A7 w7 ]; Z
7 O7 t) J+ E. i Z
if {[ info exists mom_cycle_cam ]} {% E7 s$ b9 r: y P, S4 R5 L
if { $mom_cycle_cam > 0 } {
% r. F T) U& `* }) j* g incr alarm+ `, V/ q% ?: G4 T- A) f, A
set tt "\n\n Illegal CAM setting in canned cycle \n Set Spindle Speed on Feedrate Dialog \n\n "9 T; g' X& b$ }
set em $em$tt ! |& }+ K8 D. R# `- `% R v
}6 z; \" [5 \0 @& l$ z* |
}
+ M# N* n0 |: s5 Fif { $alarm > 0 } { MOM_abort $em }
D$ W6 F2 V' D+ j} |
|