|
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区
您需要 登录 才可以下载或查看,没有账号?立即注册
×
楓大您好..因為需要一個AC的五轴後處理,自己改了一下後處理,NC出來的部份都不正確.能幫忙一下嗎?非常感謝.5 g$ j6 t6 ?( v% c
' X6 k: w4 R& L. z, J' Z+ r# --------------------------------------------------------------------------2 l/ P8 M# `/ D& `
# 5 Axis Rotary Settings0 p1 V" p, s& F/ S# x4 o0 Z
# --------------------------------------------------------------------------. O. p" A4 l& Y \; E
#Assign axis address
. r J1 E% K; C- q9 P/ B5 Bstr_pri_axis : "C"6 ^: }# ^* u( F" m6 s( o
str_sec_axis : "A"
2 O u- t2 f0 ] H( T! T4 Bstr_dum_axis : "B"
# z- [ i: [. _! D, _0 o+ J# _
4 g7 y" v2 A% m$ K#Toolplane mapped to top angle position strings( `7 Y4 W g( }; j/ a9 z' h
str_n_a_axis : "C"
' ~! j9 F* P' u5 b, B5 [str_n_b_axis : "A"
6 {% r- T; z6 M4 I) @& v; kstr_n_c_axis : "B"
u9 k! R) | z# B3 }5 y. s) r* [6 r$ L" r/ C: q& F% j) Y5 u
#Machine rotary routine settings
9 n8 X; N) z; L0 l6 Emtype : 0 #Machine type (Define base and rotation plane below)
D; j9 v) F9 V" E! K9 }$ H& J #0 = Table/Table
& F% s2 T4 r% R" o9 J #1 = Tilt Head/Table
( A0 x0 D# V+ t+ u3 D% p; _ #2 = Head/Head
8 _, j- K' g7 c4 z& {! |; t #3 = Nutator Table/Table/ p' B3 m# ?' ], F p4 M4 E. S0 C% [
#4 = Nutator Tilt Head/Table
4 e7 }. ?7 a( z+ ~" [* q #5 = Nutator Head/Head: y& I# |" D) @) f
9 J9 U6 r* T0 r; J7 L; Jhead_is_sec : 1 #Set with mtype 1 and 4 to indicate head is on secondary4 V% ?5 P8 @7 K( s
, b" B* H3 X6 }#Preferred setup is pri. zero matches sec. zero/direction
l6 i/ T8 h( y& `6 X#Zero machine and determine the planes perp. to axis rotations
' |8 |7 p( t/ p& O! I, `( [1 C8 ]5 [' o& l#These plane combinations are valid:
" B, O" B& R& q) y u7 h#Primary plane XY XZ YZ% J# X" ~* n# S9 r" G2 k
#Secondary or XZ XY XY/ m5 x# s+ I# \2 c1 }- a
#Secondary YZ YZ XZ' N. w w5 x4 b; {5 I
! h2 R5 e( U9 D6 e: r% n#Primary axis angle description (in machine base terms)
/ |& j7 v9 A {& v1 n: T! h/ T#With nutating (mtype 3-5) the nutating axis must be the XY plane) p6 |% h3 R0 X) g4 s8 ?" ^ m
rotaxis1$ = vecx #Zero
0 R0 `2 G) c1 x; U' \3 e5 ]8 Wrotdir1$ = -vecy #Direction * R/ U. l+ q" r7 g
7 `% n/ L. A! |1 u, i#Secondary axis angle description (in machine base terms)3 N: {% z( P9 }$ n0 E
#With nutating (mtype 3-5) the nutating axis and this plane normal
0 z5 t* r' I8 b2 p/ C! t#are aligned to calculate the secondary angle
' ~" q" S( z9 \rotaxis2$ = vecz #Zero
, B; ~& @2 R3 T3 Protdir2$ = vecy #Direction
3 [, M* t4 H5 m0 O& d! A. t
% I8 Z; I# a$ @/ \#NOTE: Use of 'top_map' requires the dealer match the( l) g; _- l+ K. h f
# above settings below. These must match initial settings!!!
7 Z+ g" J" c; d1 U1 up_nut_restore #Postblock, restores original axis settings
0 x: _/ S' {3 t, A( H; G4 G A w result = updgbl(rotaxis1$, "vecx")#Zero
4 Z6 M4 n# i2 d! N3 c2 Z/ E2 K b result = updgbl(rotdir1$, "-vecy")#Direction! Y' `* I/ R9 k/ r
result = updgbl(rotaxis2$, "vecz")#Zero' A" ~% R: a8 x! Q; |$ c
result = updgbl(rotdir2$, "vecy")#Direction |
|