|
1.转速检测,包括最大和最小转速
2 \6 [) u5 y2 S2 F( E& o# Hif { $mom_spindle_speed == 0.0 } {
0 X, [. B& q! T- s2 F #MOM_output_literal " ( ZERO SPINDLE SPEED PROGRAMMED )" # g+ s I0 U2 o$ W& @) a
#MOM_output_literal " M00 "
% p f# ~% H( c N9 }; [ set mom_spindle_speed 20. ;# dodge div.by zero in tap
$ J- J& ?5 V) a5 g" l set errmes "\n\n *** Spindle Speed Not set ***\n*** IN OPERATION $mom_operation_name ***\n\n"
1 ^5 v6 e9 }0 [$ T+ u8 Y/ h* y. H, I MOM_abort "$errmes" ( i$ b/ T: l! p; |, X: _
* P' }6 R+ ^( a9 ^$ z0 J最大转速
0 V) j. C1 v: s5 ?/ j; Dif { $mom_spindle_speed > 10000 } { 1 E+ v9 @+ }/ `1 D& ?
set errmes "\n\n *** Spindle Speed Over Max 10000 ***\n*** IN OPERATION $mom_operation_name ***\n\n"
9 U9 q4 ]! G! {4 k4 s! R MOM_abort "$errmes"
' D! H/ _1 C" E) ?; h( H
. w- p# l9 B: M/ ~最小转速$ R3 |' Z* d( D% R, y' T b
if { $mom_spindle_speed < 50 } {
: S2 [: E" P0 n4 R9 d7 x( X set errmes "\n\n *** Spindle Speed Under Min 50 ***\n*** IN OPERATION $mom_operation_name ***\n\n" 1 s4 x! }% i0 F3 u$ e
MOM_abort "$errmes"
' X, P( _5 S9 _( G- ?3 K
, T) I# R# K) u& p t! _4.刀具号未设置检测等..8 N! z" N6 J; ^2 |; m T
if { $mom_tool_number == 0.0 } {
]" D6 u6 m: d1 y #MOM_output_literal " ( TOOL ZERO PROGRAMMED ) "
+ t- v; D8 ^9 p2 M3 {2 |; C #MOM_output_literal " M00 "
u7 c; |8 l/ E5 s7 R set errmes "\n\n *** Tool Number Not set ***\n*** IN OPERATION $mom_operation_name ***\n\n" # l$ O0 C. C6 w1 P# g
MOM_abort "$errmes"
/ P8 M) |" O/ g) z2 p$ ?' m3 [3.进给检测
6 V( E+ n3 g" u8 C4.钻孔的安全平面检测! I) w+ K0 N1 c+ }
) Z1 ]( m) K3 U* w& N& P
以下主要是钻孔的一些常用检测功能
3 r. j1 S; A+ E. ]9 mglobal mom_cycle_retract_mode , d% i* X ?! S% T
global mom_clearance_plane_usage 8 P, n9 e4 q+ Y% }$ C) h
global mom_clearance_plane_status
6 ]$ m" Z3 T& b$ \, ^. N* \global mom_operation_name9 D: b3 V, F1 k# C! r! _
global mom_cycle_cam
# E3 k2 A1 h1 T( K6 jset alarm 02 @4 ]. _* F! N1 k
set em "\n\n OPERATION : $mom_operation_name \n\n "+ Z2 @* O# K1 p) I' ?. ~+ ? N C6 U7 j
if { $mom_cycle_retract_mode != "AUTO" } {
; B+ w/ O" B3 S6 _' h$ P0 E incr alarm
4 K8 z* i S2 ^# S, W set tt "\n\n RTCTO Mode not set to AUTO \n\n "7 O; O# I0 N+ Z5 B
set em $em$tt
) v% r( b5 i7 o+ K* ~8 `# _ }4 |3 `; C8 j' A4 v& c* @- }
if { $mom_clearance_plane_status != 1 } {
% m" K0 q4 d8 r" G2 H incr alarm. N6 B: @$ r! m7 u" u
set tt "\n\n Clearance Plane not Defined and Active \n\n "
$ b, i3 |9 `% s: R3 y set em $em$tt . Z+ i& h( \, r
}
- r) v6 i4 H# E* Y1 v1 ^if { $mom_clearance_plane_usage != 1 } { + c' u' l" `) S
incr alarm
3 `( c6 \0 y% S# g) w: w set tt "\n\n Clearance Plane not set to Start and End \n\n "! \3 q9 Z! s( p
set em $em$tt 6 \8 K. h2 `, x- v- v. i
}
+ b; Y3 {1 C( T: G5 Z$ U/ D2 j H
( l' i4 ~) Z! cif {[ info exists mom_cycle_cam ]} {
7 N9 R5 b$ y) O2 f8 L7 ?( F! o if { $mom_cycle_cam > 0 } {
; c! T; s( t3 f incr alarm
- w% X: I/ J0 R' ?$ D set tt "\n\n Illegal CAM setting in canned cycle \n Set Spindle Speed on Feedrate Dialog \n\n "; _4 @! A% C, k/ o# u, M" b" _+ f
set em $em$tt " ^. C. }. J2 I' ~7 [
}% m( g# Z# n* p/ \0 E( y5 Q
}
( T; r4 d y2 W% w, V0 J2 s; xif { $alarm > 0 } { MOM_abort $em } R' S0 M8 J+ [* t( [$ c. `
} |
|