|
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区
您需要 登录 才可以下载或查看,没有账号?立即注册
×
楓大您好..因為需要一個AC的五轴後處理,自己改了一下後處理,NC出來的部份都不正確.能幫忙一下嗎?非常感謝.
. a$ l5 c s$ n
/ W! a9 M3 } V( K! f) Z4 t# -------------------------------------------------------------------------- o5 w$ Q7 B& h
# 5 Axis Rotary Settings7 n; O' c/ }7 W! x' z9 c9 s
# --------------------------------------------------------------------------
9 g" R1 K# u/ ^$ i5 F8 A#Assign axis address
7 q5 S% D9 u. Ustr_pri_axis : "C", Y; H- L5 W3 P) j C
str_sec_axis : "A"* K$ y2 a, |1 T" a& B. ]: O
str_dum_axis : "B"
0 t1 O/ Z2 D* q u
3 @) i) U% G& v! B0 _#Toolplane mapped to top angle position strings
* d9 D! q* c4 L% j3 x2 ^str_n_a_axis : "C"
0 B4 L, I; z2 x* {& d9 z, jstr_n_b_axis : "A"
& n- [0 d+ n: m7 s6 g% Y0 Rstr_n_c_axis : "B"
, h/ f9 E* W( V& T& @1 q5 i m5 X, u" ^2 O _2 U
#Machine rotary routine settings
7 I) k$ L7 r) G8 Xmtype : 0 #Machine type (Define base and rotation plane below)
; p6 m4 C. h. X6 `! a- B! S ] #0 = Table/Table7 g* U- p9 N+ ^$ m8 ]
#1 = Tilt Head/Table
7 h5 @% }/ H& H! ]3 b, l #2 = Head/Head
9 O" Q% ?3 O3 @9 Z #3 = Nutator Table/Table
4 z( V$ u5 F' h; V& x #4 = Nutator Tilt Head/Table
2 I( B# R6 k& p( ]) p7 H* g5 |5 x #5 = Nutator Head/Head
8 v8 \/ r9 X. }# f( J9 N' Q/ v0 n3 R' I* ?" e; }" Y i) g0 {- S; N
head_is_sec : 1 #Set with mtype 1 and 4 to indicate head is on secondary
" w5 G7 E* t2 x$ D1 c( T' ^: S7 Z+ }! G4 W5 r
#Preferred setup is pri. zero matches sec. zero/direction' T* [( P/ B" ^, T9 w7 S
#Zero machine and determine the planes perp. to axis rotations
( R/ H# D6 n; N6 W# M5 o" t0 h" ~$ Q#These plane combinations are valid:
' g4 Q/ K2 x, J2 ~3 X) J: E6 M#Primary plane XY XZ YZ
) K. }% J; l' y4 E/ ^#Secondary or XZ XY XY! U' x1 {' ~4 m# [$ b3 f! c
#Secondary YZ YZ XZ2 [5 e( P, b4 \# P
, j; \& u( f. {" y# ?2 [#Primary axis angle description (in machine base terms)
( \. ?' M4 k& {4 Z4 V' J6 C1 ~. ~#With nutating (mtype 3-5) the nutating axis must be the XY plane: F- X! o0 ~1 b6 k
rotaxis1$ = vecx #Zero ) x. ]/ p8 k# r/ ?
rotdir1$ = -vecy #Direction 6 S5 ], ~8 r: w- N# Y. V$ i
1 o m+ D" h. `
#Secondary axis angle description (in machine base terms)2 |( _" f( r2 M, b$ o; u
#With nutating (mtype 3-5) the nutating axis and this plane normal
4 c1 m Q0 K/ d- k, Q4 ^#are aligned to calculate the secondary angle ( a4 \" U0 \& G
rotaxis2$ = vecz #Zero
7 g8 V" f9 _- Y+ S c7 X0 Krotdir2$ = vecy #Direction
9 @5 Y; R* {& p! w. u3 \
2 h0 [" M. m" c#NOTE: Use of 'top_map' requires the dealer match the
3 ]& _* M; a3 a# E2 k# above settings below. These must match initial settings!!!4 e j. F( |, D* O5 U5 ?; s5 b
p_nut_restore #Postblock, restores original axis settings + c% }! j0 v( i1 E( j
result = updgbl(rotaxis1$, "vecx")#Zero
" k+ \! {: |5 Y, k* [1 C, K result = updgbl(rotdir1$, "-vecy")#Direction7 W0 G7 a" a+ m, B4 q& c7 Y2 g
result = updgbl(rotaxis2$, "vecz")#Zero
; B" G9 t+ P2 q+ p" m# A! Q result = updgbl(rotdir2$, "vecy")#Direction |
|