|
|
global mom_kin_machine_type
6 I$ Z6 h8 A% f* Z global mom_kin_4th_axis_type mom_kin_4th_axis_plane! V9 |5 b: Z; N+ |0 i v
global mom_kin_5th_axis_type
; F+ b9 [- ^9 k' N* F# E$ n global mom_tool_axis mom_sys_spindle_axis mom_kin_spindle_axis
: O4 }, s; q! c5 [) d) `4 \/ g9 {, u global mom_pos
* h# N3 V5 l. ^! z global mom_cycle_spindle_axis mom_cutcom_plane mom_pos_arc_plane
/ g1 z! c& w \+ O/ L9 Q7 t3 C' s2 U1 x
Y, ?7 T+ N$ L9 o# F( _- N' m% L/ ?5 _4 V) K% O
# Default cycle spindle axis to Z
5 V* H+ i4 L$ L }( e8 t& d' A: N set mom_cycle_spindle_axis 2
- x: I$ S6 u: @9 @8 x( j" i
1 Y! ?) H$ G0 a6 F0 O" D: X3 M
% m, h8 g5 Y7 O3 L+ k0 Y if { ![string match "*3_axis_mill*" $mom_kin_machine_type] } {
q9 F8 r% E8 ]: R
- [$ _! N6 H5 q$ j0 O3 R* U if { $mom_kin_4th_axis_type == "Head" } {& x: @ P' p; I. H* r
/ I. e: k9 @1 ~' ?% o# K- _
if [EQ_is_equal [expr abs($mom_tool_axis(0))] 1.0] {
0 R, E1 l, V0 D; u- u7 Z set mom_cycle_spindle_axis 03 L$ i( z9 D9 [$ f- p4 L$ ?
}% l: b" c3 |8 n6 ^ s
) g6 d/ V6 k- g+ j$ D1 m; \2 Q/ g# ^ if [EQ_is_equal [expr abs($mom_tool_axis(1))] 1.0] {" ?; x7 e% G/ {) u: d
set mom_cycle_spindle_axis 16 K9 f8 h- }3 z7 ^# P9 X
}* s6 E$ m$ U8 v# s5 C! d# h8 M
( z: n) j+ c* l if { $mom_kin_5th_axis_type == "Table" } {
( N* B0 n# C& V. c
+ ~9 `4 g& c$ Z if { [EQ_is_equal [expr abs($mom_pos(3))] 90.0] || [EQ_is_equal [expr abs($mom_pos(3))] 270.0] } {2 S" y+ O& c4 Z( X4 k' Y. l* d6 `* Q
6 g: \5 t# q) Y G% S
switch $mom_kin_4th_axis_plane {
( ~/ v6 m" z& S* x/ [* ]9 B. g "YZ" {
' b: ]2 e8 J1 } n# d set mom_cycle_spindle_axis 1+ y* L6 a* w `. M- G# W- S+ |
}
% _% o* d: h/ G6 M' | "ZX" {# D- P3 ] ]+ |
set mom_cycle_spindle_axis 0
{7 [" c! J f+ X3 b, |! b$ ]" F }
5 t# y8 f. l; y) E }( L ?: }3 I* e9 y2 ?6 q k. h0 d
}+ c1 c! ^( M, [+ v- ?
}! |9 x' @: o7 A* I. L- K
}3 ^6 E5 B6 L, _+ l! [7 d" u
}% c5 Z+ |7 c f, h2 c" M
; }/ O4 A. i- H: H1 y
7 S6 s B. I! t( d" z3 K' K switch $mom_cycle_spindle_axis {
0 g4 W) |2 ^1 E* S7 F 0 {2 Z( P& k- D0 u. `0 }, q( U
set mom_cutcom_plane YZ; { y+ V9 ^ X# z& E, l X
set mom_pos_arc_plane YZ2 _! s) N8 t" A) v: o) a. O
set principal_axis X
9 Z" [0 X0 X1 u% R& h5 A- S- @& g }
9 R. Y5 I3 p+ O: f7 Q! t 1 {! f) A' A. P9 X2 {8 _) B+ d; i# j
set mom_cutcom_plane ZX
' D& A, ~) y) F. @0 r4 t set mom_pos_arc_plane ZX
9 t/ z7 W: @8 i: h set principal_axis Y' X; D, f- T4 w/ G
}/ w6 n8 U" f+ L1 p% W/ O
2 {# e8 L) v2 N m" b% {3 a: p
set mom_cutcom_plane XY6 p" U3 o1 {+ H8 j; e. S
set mom_pos_arc_plane XY
; ^4 y {9 _; Z) D" f set principal_axis Z6 e w" U0 P2 {
}
1 y( ~4 R8 g* s* P' r# R+ q default {% N& g- n( I8 R- H
set mom_cutcom_plane UNDEFINED
V: F6 N S" L) f+ n" E v set mom_pos_arc_plane UNDEFINED
$ C+ O$ o3 }/ n5 y set principal_axis ""7 y: z3 Z, g9 I/ X+ x( D, E
}2 U+ k1 |9 ~6 G q( z
}" K" X* X C8 C8 y5 I$ d/ V3 c3 `2 L
; d+ r8 |1 t1 n: l4 o
* l- a4 k* r$ t- [- W if { $suppress_principal_axis && [string length $principal_axis] > 0 } {6 D' s. _5 c6 G8 H( g! u# _
MOM_suppress once $principal_axis# p/ U+ J t! ^$ e+ ~
}/ t! _* D8 `) }' u/ B# e
$ h3 B6 Z1 C5 ~
% _( g2 |* E' D, f9 L$ z6 S v$ u, p if { $force_plane_code } {
0 B8 E7 G8 r% N6 G: Y global cycle_init_flag
9 _7 J" D8 Q! d- M9 |; f; k
, m' c2 `8 z* c h" F! F f if { [info exists cycle_init_flag] && [string match "TRUE" $cycle_init_flag] } {: ]8 o2 `2 S* N4 o
MOM_force once G_plane
' \+ @0 m9 q! e, Z# P1 {2 k5 C }3 |9 ]# Q R" n" n3 H$ l0 Z7 L: y
} |
|