|
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区
您需要 登录 才可以下载或查看,没有账号?立即注册
×
楓大您好..因為需要一個AC的五轴後處理,自己改了一下後處理,NC出來的部份都不正確.能幫忙一下嗎?非常感謝.
( h) ~& U, F X4 D: ]( x6 c5 `
. D% p5 F# U1 E& X- L- I" g/ c8 [# --------------------------------------------------------------------------1 o9 ^3 c0 V( A' W. C4 A. {
# 5 Axis Rotary Settings4 U& ^. y8 B: p# R
# --------------------------------------------------------------------------
7 M; g# A( I8 F, }) }#Assign axis address! y' \+ ?2 v! X0 i9 x6 m. X" h
str_pri_axis : "C": Z; q' U8 v& p+ q
str_sec_axis : "A"! x7 o4 g' u$ a2 @1 c
str_dum_axis : "B"
9 V( \7 R1 e8 M
v7 H7 j( J% d4 o x#Toolplane mapped to top angle position strings
. B/ K. V+ ~* C3 Y( @8 v* cstr_n_a_axis : "C"
: H# \. G3 P$ e, E/ Mstr_n_b_axis : "A"# i. n) |7 f$ G* c: w9 t
str_n_c_axis : "B"
, @! T$ g1 X' E$ @" h1 @' o6 j o
#Machine rotary routine settings
/ B' D8 b0 V) X$ N6 ]mtype : 0 #Machine type (Define base and rotation plane below)
$ p0 J5 w( B1 P. P+ \ #0 = Table/Table
% m# f, n1 c" t9 p! o! ^5 O #1 = Tilt Head/Table
2 r9 P# {- {& D g' e4 y/ t5 o #2 = Head/Head
3 _1 s' l1 H5 Y9 C; F #3 = Nutator Table/Table# W, j* H, p& L, x& S
#4 = Nutator Tilt Head/Table$ B3 E4 r% `9 \7 z
#5 = Nutator Head/Head
. F9 e. }3 b& x8 O9 `5 `5 y* G, A/ X; x" U* _- @: A
head_is_sec : 1 #Set with mtype 1 and 4 to indicate head is on secondary
9 c- e [! O6 m/ f
: y: m1 i( C- d( V; x#Preferred setup is pri. zero matches sec. zero/direction
& E: h- s4 S3 d7 n: V" q3 Q' Y7 R#Zero machine and determine the planes perp. to axis rotations
0 h- P7 r$ s1 j. j4 C9 E! F#These plane combinations are valid:% S. N- @3 T# d5 ]
#Primary plane XY XZ YZ
0 p: f1 d# i; |) u) _9 S5 A+ f#Secondary or XZ XY XY( ?: [8 |/ ^- U5 P
#Secondary YZ YZ XZ! o2 N; \7 H) x9 o5 |
; ?7 j, f1 B) j$ j
#Primary axis angle description (in machine base terms)
" A3 C/ _" q' l- O#With nutating (mtype 3-5) the nutating axis must be the XY plane
/ d. _" H4 c0 k) ?7 n! I# urotaxis1$ = vecx #Zero
- U5 m; \; P8 G |: Mrotdir1$ = -vecy #Direction 7 S. t" `+ Y2 H+ }" E
6 T: }# b8 A$ T8 `" f4 l
#Secondary axis angle description (in machine base terms)
# M5 Q2 N' H7 A, N' p#With nutating (mtype 3-5) the nutating axis and this plane normal6 d0 v2 t" g$ s! X+ i+ Z0 b
#are aligned to calculate the secondary angle 9 r( [: p- g- N$ m( T6 `
rotaxis2$ = vecz #Zero
0 f# M% s# a7 D/ _rotdir2$ = vecy #Direction
X+ \4 i8 {0 L0 X) k2 m4 Z) S3 e! h1 ~: Y% C
#NOTE: Use of 'top_map' requires the dealer match the
' F/ U& K- M2 C+ T1 J- R# above settings below. These must match initial settings!!!
# [1 l2 [5 w$ W6 p7 ~p_nut_restore #Postblock, restores original axis settings
a$ c$ i+ N- j, b I- E result = updgbl(rotaxis1$, "vecx")#Zero
8 }, u A9 P# p( a1 d0 `9 x( v result = updgbl(rotdir1$, "-vecy")#Direction
8 w4 L) y9 W( X5 ]9 Z! ~ result = updgbl(rotaxis2$, "vecz")#Zero% }/ b( Y4 b5 O$ ^2 s$ O" \4 Q
result = updgbl(rotdir2$, "vecy")#Direction |
|