|
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区
您需要 登录 才可以下载或查看,没有账号?立即注册
×
楓大您好..因為需要一個AC的五轴後處理,自己改了一下後處理,NC出來的部份都不正確.能幫忙一下嗎?非常感謝.
3 [6 t% c4 m3 @% W; K4 u5 C+ |7 p( ]1 I0 I |0 s/ }5 T
# --------------------------------------------------------------------------
! z6 O8 `+ W5 ]# 5 Axis Rotary Settings
! D% G& p( m. C% r8 d# --------------------------------------------------------------------------; ^9 Q- p6 R! V* d/ T2 P: G
#Assign axis address
. e8 S8 v# h8 j% R b5 o c9 dstr_pri_axis : "C"
8 X% t: F/ m3 N. t: L0 N' ^) k8 Gstr_sec_axis : "A"% P+ l l, p8 ^( C) `/ V3 i
str_dum_axis : "B": ~" Z+ \( S* _7 ~3 ~6 O
5 j" N9 L' [1 |3 }+ R; h
#Toolplane mapped to top angle position strings
# \' l) w0 X* e4 A/ J/ l% [& T1 m4 jstr_n_a_axis : "C"3 K& K h6 F+ C% {
str_n_b_axis : "A"( e; J, x6 N7 N$ s. ?5 h5 N
str_n_c_axis : "B"
0 K! x& ~$ N5 I% y( E
) z) h T! j* t" B9 `" v#Machine rotary routine settings
4 A. D( ?( B) Q8 v8 m, imtype : 0 #Machine type (Define base and rotation plane below) t+ ~& D* Q- k3 w( B
#0 = Table/Table
; B: d4 s5 |% \+ h7 o) z7 s #1 = Tilt Head/Table
) u1 {! o. e( @2 r+ Y! m #2 = Head/Head" }8 j3 ^' b9 ?" v
#3 = Nutator Table/Table# S4 d2 |, Q: M" H7 O6 d$ M$ l
#4 = Nutator Tilt Head/Table
- ?- D$ ~; l& F2 ]6 Y- {* p0 F #5 = Nutator Head/Head
' E, E7 _) T; N: g7 ~: m& R. d5 L" J& [$ l% C
head_is_sec : 1 #Set with mtype 1 and 4 to indicate head is on secondary
$ U6 r/ z0 I6 d0 n8 R# d5 Q3 B0 l$ G) N) o
#Preferred setup is pri. zero matches sec. zero/direction
# v( Q3 Y' m- I#Zero machine and determine the planes perp. to axis rotations n; @! g: h. d0 E* s
#These plane combinations are valid:1 j* a& @: }8 y) M. ]
#Primary plane XY XZ YZ0 t: {. D9 T+ T
#Secondary or XZ XY XY
( R! w9 B" x( m' u0 Z6 G1 `2 [* P#Secondary YZ YZ XZ1 w2 `! a( Y$ F9 F" M5 W* [/ o
6 |/ o; @/ ?$ \. I
#Primary axis angle description (in machine base terms)
& m# m9 k8 }- m# `#With nutating (mtype 3-5) the nutating axis must be the XY plane0 H6 U/ T( l P9 C
rotaxis1$ = vecx #Zero 1 q7 g4 Q5 U" |; {5 K
rotdir1$ = -vecy #Direction 2 I! S# K% H2 Q0 R9 i+ M) o
+ f! E2 K3 u( l" b#Secondary axis angle description (in machine base terms)
3 R- i8 |" v/ m6 z5 ?4 k#With nutating (mtype 3-5) the nutating axis and this plane normal/ N( e$ n* `% Q5 T$ U2 q
#are aligned to calculate the secondary angle . g2 q- y) f- C3 m8 }* C
rotaxis2$ = vecz #Zero
. H* ]3 X& ]8 {/ D7 E" {rotdir2$ = vecy #Direction 7 b7 K- O, `1 P( x* r$ x' u+ M
' n; @; G% u' E, @9 k#NOTE: Use of 'top_map' requires the dealer match the
/ p4 p# m( a8 j9 t, w# above settings below. These must match initial settings!!!( ?: B3 }5 ]* L/ \
p_nut_restore #Postblock, restores original axis settings + e: p, t5 L% V. |
result = updgbl(rotaxis1$, "vecx")#Zero
. B. }* K9 }+ l result = updgbl(rotdir1$, "-vecy")#Direction
& Q( }% O6 G9 ^% R, R% T result = updgbl(rotaxis2$, "vecz")#Zero
, A( t/ k+ f! y. u result = updgbl(rotdir2$, "vecy")#Direction |
|