|
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区
您需要 登录 才可以下载或查看,没有账号?立即注册
×
楓大您好..因為需要一個AC的五轴後處理,自己改了一下後處理,NC出來的部份都不正確.能幫忙一下嗎?非常感謝.
1 O3 }8 C0 L q5 ?! y6 |0 U
: M9 m1 S p# u3 s4 L, R# --------------------------------------------------------------------------
% `% ?" I6 q1 i& N) D$ z) Z# 5 Axis Rotary Settings/ K K0 G$ f7 N
# --------------------------------------------------------------------------
# o- f2 U# A* ]( P& L; V#Assign axis address+ I/ t" ~/ {% K$ @
str_pri_axis : "C"
q2 v$ v7 m' v( h$ [- g0 L; bstr_sec_axis : "A"" O3 J: J: k6 }6 x" T! e( J. n) X
str_dum_axis : "B"+ Q+ _0 D2 h. F+ Q
: C ~9 G* w. x& M8 B$ n `+ u2 r#Toolplane mapped to top angle position strings
% i# e/ C. y6 H9 G8 [; {1 Z9 q4 |str_n_a_axis : "C"
8 F+ \- v1 Y9 p' ]9 ostr_n_b_axis : "A"
( C; D+ x# S9 {( c2 T1 `4 ustr_n_c_axis : "B"- X3 S! @! `5 T9 _& r4 U1 U
4 [( `3 e& b8 d) e) K9 q6 t#Machine rotary routine settings
& M1 J8 v! e2 p0 W2 ~* \mtype : 0 #Machine type (Define base and rotation plane below) & k0 V- ?. d3 o9 i
#0 = Table/Table- I) y3 |* u0 z- o* ], P
#1 = Tilt Head/Table
* J* i- I% v% g) ^% x; f! b9 J #2 = Head/Head# r5 ]% O7 U' \" O" S
#3 = Nutator Table/Table
# P" t& @! P' ]9 V #4 = Nutator Tilt Head/Table! |1 e0 @' N! t- ^8 o4 x/ F
#5 = Nutator Head/Head9 B* F& J. y5 f8 }
& E9 d* I# ~3 W% C
head_is_sec : 1 #Set with mtype 1 and 4 to indicate head is on secondary
3 y, s% q7 U* ~- n- y- v
6 ]! ^. R) T! f+ }#Preferred setup is pri. zero matches sec. zero/direction
9 z- t' l% f: D5 T#Zero machine and determine the planes perp. to axis rotations
. n4 }! H0 S0 l6 z8 W% r#These plane combinations are valid:6 N9 y% W @1 `4 u
#Primary plane XY XZ YZ
1 h% q) A% a, X#Secondary or XZ XY XY
9 v- J; g9 F! u# q0 W/ c#Secondary YZ YZ XZ9 O$ L6 R" s# @# t6 Q) ^6 s# ^
, r' X* l5 m3 {8 T: F) U T" I2 D
#Primary axis angle description (in machine base terms)+ C' d: T7 ^% o9 G# ]
#With nutating (mtype 3-5) the nutating axis must be the XY plane
' I' O$ {/ w1 arotaxis1$ = vecx #Zero
1 b6 r: Q6 x; [, R4 ]rotdir1$ = -vecy #Direction
6 ?! d5 a' f P, Q; v6 V+ m
! W$ [5 p" |5 E7 i! t: \, ?#Secondary axis angle description (in machine base terms)+ a+ J; p8 w5 x7 M) n3 _
#With nutating (mtype 3-5) the nutating axis and this plane normal5 U1 m: Q3 A! K- T! i+ Z0 f$ o
#are aligned to calculate the secondary angle ; B; @0 D W/ g
rotaxis2$ = vecz #Zero $ m! ^* h0 b0 ]/ a* M9 Z" h
rotdir2$ = vecy #Direction , v$ _# b. c& t7 I# V
$ B$ {4 `% i( O. ^8 n
#NOTE: Use of 'top_map' requires the dealer match the- K3 ~7 H5 I" e' @9 \
# above settings below. These must match initial settings!!!
+ e: p0 g: m$ B9 Y1 T( B; ip_nut_restore #Postblock, restores original axis settings
/ O( M3 J/ [8 b; j- |& j result = updgbl(rotaxis1$, "vecx")#Zero
0 l% Q+ w8 y2 s1 M: G result = updgbl(rotdir1$, "-vecy")#Direction
2 v0 _+ Y4 y) d. P" g+ s6 M$ S- P5 i result = updgbl(rotaxis2$, "vecz")#Zero# S9 }* \: S! p- v% R
result = updgbl(rotdir2$, "vecy")#Direction |
|