|
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区
您需要 登录 才可以下载或查看,没有账号?立即注册
×
楓大您好..因為需要一個AC的五轴後處理,自己改了一下後處理,NC出來的部份都不正確.能幫忙一下嗎?非常感謝.$ N% Q5 h4 H/ o
, V* }; r, r7 a* B. P! v% a4 b S
# --------------------------------------------------------------------------
+ d4 n' x) s, [2 P# R) u, `# 5 Axis Rotary Settings
6 A( A. N! F; w) o) x+ Z# --------------------------------------------------------------------------
% y! N% w0 o# [8 `9 K#Assign axis address) M7 `" x2 D# ~; R' c* b) Q% @" y4 L
str_pri_axis : "C"8 o$ U1 r0 I9 P" Z) \
str_sec_axis : "A"* I5 p' |1 P! M; _, s# r& b/ c
str_dum_axis : "B"+ @; x9 N( ^8 h$ _5 J( c
. ~4 E- i. L- ~* y
#Toolplane mapped to top angle position strings
2 D: v, D" }( R) S+ P: ^str_n_a_axis : "C"
) J( l0 ]& q. o; y$ ?( Ystr_n_b_axis : "A"
) Z9 x. M$ l0 q6 Q" m0 b. N- q. h7 q kstr_n_c_axis : "B"! R2 R% n; ~) j+ [
1 q( O% D, x }7 R#Machine rotary routine settings
4 c( M3 {# G n, [mtype : 0 #Machine type (Define base and rotation plane below) , {& S2 S! ~& Q9 L, }' ~& I
#0 = Table/Table! J8 [+ W' @8 J/ o
#1 = Tilt Head/Table
J# L, C. D; i. a. T8 V/ c; G #2 = Head/Head
$ [4 D7 H; U! R; N( w3 A$ @ #3 = Nutator Table/Table
$ s+ h4 r- t1 I5 @! Y: o; ?! ]* {; s #4 = Nutator Tilt Head/Table
/ A& T+ q7 E5 e5 W4 } #5 = Nutator Head/Head
0 b( t& _# f( N" n, P
% X+ P, }, K, l2 ~) z0 x& b; v# u9 A" bhead_is_sec : 1 #Set with mtype 1 and 4 to indicate head is on secondary
; l# D+ s. }: l/ Y3 k& q9 @! W( @# U% ~( E& i
#Preferred setup is pri. zero matches sec. zero/direction
% Y# M' P6 D3 y4 B& l" {1 ~" h& l#Zero machine and determine the planes perp. to axis rotations
, J9 ^' L7 x: G* I5 c0 K- w' u#These plane combinations are valid:
6 X+ ]) [1 j2 X& i5 m#Primary plane XY XZ YZ$ G2 R4 d. H- B" {$ V) H
#Secondary or XZ XY XY
" `5 \8 [/ q+ D8 r) w#Secondary YZ YZ XZ5 s; f2 l! P1 r5 l. s6 n5 ?
7 c7 A# |$ B+ U) A: T! d/ e
#Primary axis angle description (in machine base terms); M! @% t- S' x8 B: n% B. k, s2 T
#With nutating (mtype 3-5) the nutating axis must be the XY plane
8 i8 H, r l+ J* Z% J) nrotaxis1$ = vecx #Zero
7 i( K7 a' I5 |' }7 G0 o2 krotdir1$ = -vecy #Direction
2 C- N( Y+ N2 r8 r: w0 g# }
T: j. e" q7 a% P8 p#Secondary axis angle description (in machine base terms)
) \# t- }2 s- w) n9 i8 }8 F#With nutating (mtype 3-5) the nutating axis and this plane normal
0 V! W5 X2 M5 @4 W#are aligned to calculate the secondary angle - C) ]. b: m4 h
rotaxis2$ = vecz #Zero
; [/ |- G: [ }0 e5 H/ rrotdir2$ = vecy #Direction
5 B1 v+ Q7 k* G: a& S* i7 Y1 T( W/ ~6 @, u6 U
#NOTE: Use of 'top_map' requires the dealer match the
% J% L9 h u: V7 V/ @: o# above settings below. These must match initial settings!!!
, y- ~5 z9 A& K8 y# @$ A- z$ X! n( j. Q" qp_nut_restore #Postblock, restores original axis settings . q* P( t3 T( [+ n. y! U
result = updgbl(rotaxis1$, "vecx")#Zero) r2 d. J9 i5 S4 b0 ~* Z- [* L
result = updgbl(rotdir1$, "-vecy")#Direction$ [: S$ Z' `$ K
result = updgbl(rotaxis2$, "vecz")#Zero% x# a) W2 G& L0 x
result = updgbl(rotdir2$, "vecy")#Direction |
|