|
1.转速检测,包括最大和最小转速* e) ~7 d6 L( o. a
if { $mom_spindle_speed == 0.0 } {
3 R2 g, a# s/ r #MOM_output_literal " ( ZERO SPINDLE SPEED PROGRAMMED )" 4 t! y% k4 G) E( v" K% U7 ?
#MOM_output_literal " M00 "
0 I) ?) U6 Y& I+ l; j- K) S set mom_spindle_speed 20. ;# dodge div.by zero in tap
2 d1 @5 _* S( X5 P: \; j! v( L6 h set errmes "\n\n *** Spindle Speed Not set ***\n*** IN OPERATION $mom_operation_name ***\n\n" : }& _" i2 R# ]: a% Y2 m- g
MOM_abort "$errmes" , f. h# N9 P9 J3 F
4 _( U1 k2 }( [- _' B最大转速 9 M" X2 X9 `) V# I* ?9 T
if { $mom_spindle_speed > 10000 } { " d/ l9 n% l0 e* [ _9 a3 j
set errmes "\n\n *** Spindle Speed Over Max 10000 ***\n*** IN OPERATION $mom_operation_name ***\n\n" + R$ o1 d! I: o ?
MOM_abort "$errmes" ! C( w+ K M6 I
1 e( L8 b% |* \4 @6 [
最小转速0 ^" ?1 I4 R* F5 f9 Y, a4 \
if { $mom_spindle_speed < 50 } { * `& T( T) O0 C" h) l4 @4 r0 S; Q
set errmes "\n\n *** Spindle Speed Under Min 50 ***\n*** IN OPERATION $mom_operation_name ***\n\n"
: A1 b5 k. S; ]) D6 k MOM_abort "$errmes"
* t+ e: ? A' j, D: R
5 W2 A( [( O6 F7 U. ]4.刀具号未设置检测等..- E0 Y9 H+ m( v6 I* @
if { $mom_tool_number == 0.0 } { & i. ^& b' b: P- f7 C ?5 B( f
#MOM_output_literal " ( TOOL ZERO PROGRAMMED ) "
! C4 N/ R" |" [/ z) L0 \ #MOM_output_literal " M00 "
1 b6 J& J8 C* I% ]" O! }) _ set errmes "\n\n *** Tool Number Not set ***\n*** IN OPERATION $mom_operation_name ***\n\n"
8 \! E9 v1 a; k1 Y- K2 j MOM_abort "$errmes"
1 F2 f* _$ \# B( F* y2 z% U0 B0 ?3.进给检测
7 X9 y& i7 }1 N5 N: v4.钻孔的安全平面检测
# c9 B" t* C: m
h; B! ^) t9 Y ~/ X; O+ S3 @! |) ~" R% E以下主要是钻孔的一些常用检测功能1 V, r* z5 d, W* \
global mom_cycle_retract_mode : m, `4 i# W F: z: }; L
global mom_clearance_plane_usage ; A# J: H* Y$ p5 T" q. }
global mom_clearance_plane_status
+ A3 O* l$ j& V' V8 ]global mom_operation_name
( L( V0 `. f) c2 C6 jglobal mom_cycle_cam
- D( R8 W$ v5 C- L$ C/ Uset alarm 0+ T+ D/ S+ M1 M2 P4 A
set em "\n\n OPERATION : $mom_operation_name \n\n "
1 \+ c6 T& h2 k. K! w: ^7 rif { $mom_cycle_retract_mode != "AUTO" } {
! H B% r# O6 n7 O incr alarm ; X5 Z6 {8 U) a! I0 U: ?
set tt "\n\n RTCTO Mode not set to AUTO \n\n "4 O7 B( C/ A7 s; t
set em $em$tt 1 R. p9 B& ?( L4 W
}2 A" x6 R" I4 r, m
if { $mom_clearance_plane_status != 1 } { ! h7 |$ X5 k4 u% N7 m# U
incr alarm$ I9 P2 k8 ?- v F" M9 T% {8 ^
set tt "\n\n Clearance Plane not Defined and Active \n\n "/ T; Z# n, N7 T) H
set em $em$tt + F: d+ L$ F! A/ q: [$ D. c0 Z8 ^. N
}& E- l g9 W9 ^/ F
if { $mom_clearance_plane_usage != 1 } {
! U4 T* ^* _: e6 C9 H* F incr alarm
* ^- m, Y' R( }; @0 ? set tt "\n\n Clearance Plane not set to Start and End \n\n "6 G* y) [* ~ |5 j9 l
set em $em$tt - t: v! M6 @+ c! L
}7 s' s. P; \( T" V: F
4 ]6 T7 M" i; x
if {[ info exists mom_cycle_cam ]} {4 r4 S% L9 {$ S! l4 X, W- b
if { $mom_cycle_cam > 0 } {+ N3 j0 h0 \0 P" |) u: t
incr alarm5 I5 y6 d$ P5 K' z7 C) B
set tt "\n\n Illegal CAM setting in canned cycle \n Set Spindle Speed on Feedrate Dialog \n\n "
& j$ Z% B! M: {: p- q: b set em $em$tt 9 c4 X2 Z% E* w* Q; ]0 F
}5 {; p0 S3 D% @
}
8 a, S' o# `+ L7 D0 Nif { $alarm > 0 } { MOM_abort $em }/ a+ [4 f5 y. [6 P! U5 h: i7 k
} |
|