|
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区
您需要 登录 才可以下载或查看,没有账号?立即注册
×
楓大您好..因為需要一個AC的五轴後處理,自己改了一下後處理,NC出來的部份都不正確.能幫忙一下嗎?非常感謝.& C7 b1 k" J& d1 o! m8 H
7 S. F/ X% d9 B$ L
# --------------------------------------------------------------------------$ L" B5 H" Z* l5 ^% E9 z
# 5 Axis Rotary Settings q3 r% G2 ]$ B! e! Z7 F' M" I
# --------------------------------------------------------------------------7 ~" w2 B8 ^5 X2 w
#Assign axis address
{: X3 D' k' g+ c! o2 M: Fstr_pri_axis : "C"
9 E- P! e$ }6 e( D% i. p4 ]str_sec_axis : "A"
) D9 Y8 P4 A# V- f& Qstr_dum_axis : "B"/ ]% B# ]' h. K0 o" F6 d
- P% r9 T! D4 E+ a0 T: a
#Toolplane mapped to top angle position strings
S8 t; s4 a( Z* _9 D# jstr_n_a_axis : "C"
4 J: ]. ?) b# C& A! istr_n_b_axis : "A"* O0 A4 A/ G6 P6 g0 E
str_n_c_axis : "B"
4 L/ t$ _, U- x H5 k2 Z- q8 T3 I
6 H y+ I) k2 M9 c+ \4 q; w#Machine rotary routine settings
! H! Q4 v( t. h4 D) l6 O+ s& [mtype : 0 #Machine type (Define base and rotation plane below) # V0 `! L! V4 C, I' z: k
#0 = Table/Table: p6 E5 i$ C+ _* i: U3 ?
#1 = Tilt Head/Table3 N9 v" D3 Z0 w; K/ d0 m
#2 = Head/Head
) f( |# S1 f, T& k1 t #3 = Nutator Table/Table7 [; F( d- W4 ~' [+ {. _* Y" x6 H
#4 = Nutator Tilt Head/Table3 H& ]3 }. |. N- N
#5 = Nutator Head/Head
. p* D3 ]; k$ X3 F1 x* O% `9 x+ U l) G
head_is_sec : 1 #Set with mtype 1 and 4 to indicate head is on secondary" P, D' y2 k6 u
9 w% n; a7 }0 U; s* k
#Preferred setup is pri. zero matches sec. zero/direction9 t4 X6 s' {$ G: l' b. g6 I7 u
#Zero machine and determine the planes perp. to axis rotations2 V" P5 m% y/ [) t# m' s. k
#These plane combinations are valid:
. N$ r8 S6 w: a, C, z/ G G#Primary plane XY XZ YZ% \6 c: }- b% T/ M% j
#Secondary or XZ XY XY
- e. e4 @0 n& w5 U#Secondary YZ YZ XZ P/ Y- J @3 q( ^* z4 r9 N* f7 I P
- H* d8 a/ ^6 F% S3 ?
#Primary axis angle description (in machine base terms)
3 v/ o M" u/ P$ E% ]& j* u#With nutating (mtype 3-5) the nutating axis must be the XY plane! ^" N$ x* h( C9 k+ x+ j6 Q+ g
rotaxis1$ = vecx #Zero
- X2 I6 ]! Z1 [, t) [$ p: I# }; `- ^rotdir1$ = -vecy #Direction
& k% ]( e$ h' F6 B, G, n* N0 p3 M* X- |. V
#Secondary axis angle description (in machine base terms)/ B' s) O, A) t/ M$ I" u
#With nutating (mtype 3-5) the nutating axis and this plane normal
& H% F5 C- q! f) x$ T4 q2 n#are aligned to calculate the secondary angle * i1 o6 I1 f9 ~& U1 V
rotaxis2$ = vecz #Zero 2 r% F4 _2 h3 r' t5 f& R8 ?
rotdir2$ = vecy #Direction
2 }& K/ O1 t5 c- H& R: C' ?1 e2 e! K8 g) j% T# n
#NOTE: Use of 'top_map' requires the dealer match the
; i3 x# m$ @6 x1 s" o# above settings below. These must match initial settings!!!% S' v' Z+ n- u: y; q) j; U x
p_nut_restore #Postblock, restores original axis settings ' I" k* i5 @% n
result = updgbl(rotaxis1$, "vecx")#Zero9 L0 N7 [* P3 r% Q. \% R
result = updgbl(rotdir1$, "-vecy")#Direction
' k- L2 t( W @8 J8 w* C result = updgbl(rotaxis2$, "vecz")#Zero
$ Q; d3 J0 {% O, F. U result = updgbl(rotdir2$, "vecy")#Direction |
|