|
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区
您需要 登录 才可以下载或查看,没有账号?立即注册
×
楓大您好..因為需要一個AC的五轴後處理,自己改了一下後處理,NC出來的部份都不正確.能幫忙一下嗎?非常感謝.
0 _" h. g" \% Y& `( _; F+ e. r6 G) N0 `+ R A @
# --------------------------------------------------------------------------# k* L) r9 ?* Q( I& E
# 5 Axis Rotary Settings
- q8 r$ U( k3 b i7 }; ]# --------------------------------------------------------------------------) [" o9 H7 v5 A) x. a$ d# C: c1 U
#Assign axis address
% v' v/ v$ a+ i/ a. bstr_pri_axis : "C"
* o. J: [0 a. |; r- bstr_sec_axis : "A"
' ~8 S. c' S, S; I$ m, Fstr_dum_axis : "B"
. m6 b4 P$ f- ]2 B. f; `* t* Z4 |$ z$ o# U) t- h9 z
#Toolplane mapped to top angle position strings/ e: U7 S* s# H; K
str_n_a_axis : "C"
2 L, V7 K/ S. W9 |str_n_b_axis : "A"
( {! v" L' o8 d( ^6 Y- ~5 _str_n_c_axis : "B"
* P& P3 y$ {% n' o- k+ b4 ? Y# B" l
, c7 K) K! R' a* T; F. {#Machine rotary routine settings, k" l% N& I% W( g: h) Z
mtype : 0 #Machine type (Define base and rotation plane below)
9 B# O' v2 D' t6 f5 c# b3 o1 X( V #0 = Table/Table
t, j: O7 x$ {1 ~1 V6 {# A #1 = Tilt Head/Table
5 C$ `- ?& Q- f4 t #2 = Head/Head$ H( n( q% r5 z% @
#3 = Nutator Table/Table
' E. l6 y. A3 t$ { #4 = Nutator Tilt Head/Table9 Y- ^- [5 @8 u
#5 = Nutator Head/Head
2 e, |% @) s R* S c" d
2 R% s/ y5 w% Z' ?+ Phead_is_sec : 1 #Set with mtype 1 and 4 to indicate head is on secondary( g m1 L5 _% X1 \7 @
- u( [% y w. T0 L( R2 k#Preferred setup is pri. zero matches sec. zero/direction
. a# f# O' x: ?) r u7 [. l6 j#Zero machine and determine the planes perp. to axis rotations
! _6 t5 [& G2 \& h& q' }#These plane combinations are valid: W+ j; h- v* n& Z* Q {
#Primary plane XY XZ YZ
& d" F. q6 e! s$ ~$ Z5 C#Secondary or XZ XY XY8 Y* Y' ]3 G' r9 p' p# h5 Y
#Secondary YZ YZ XZ
) T7 A' F6 Z6 ]4 u
) m( v2 g" ]$ ]1 n4 ]* {# r: t7 |#Primary axis angle description (in machine base terms)
0 F' W: `5 |0 B5 ^5 f- S X#With nutating (mtype 3-5) the nutating axis must be the XY plane
- X$ Y H: W+ m3 l; |4 Y0 U1 z, irotaxis1$ = vecx #Zero
* r8 _$ p# f4 J1 D/ j- srotdir1$ = -vecy #Direction & O, Q8 Z9 R3 n. C
. p, R+ \$ x$ e+ H
#Secondary axis angle description (in machine base terms)
& Q: M" y* m. B7 m7 E D1 X#With nutating (mtype 3-5) the nutating axis and this plane normal
+ O; H2 F$ U: ^ v1 _#are aligned to calculate the secondary angle 4 L5 @3 Y% J0 t8 Z
rotaxis2$ = vecz #Zero
7 `" k; D% i0 A$ grotdir2$ = vecy #Direction
# x, h' d) |0 R1 |5 c% X) n$ D5 A( L0 t' b5 e( d$ `+ e
#NOTE: Use of 'top_map' requires the dealer match the/ Q) @8 i& C& P ^. }* H3 `; b; o
# above settings below. These must match initial settings!!!5 M( @: C; Z, f) j% ~
p_nut_restore #Postblock, restores original axis settings
& `6 z$ u3 _! R( f& q4 `5 _ result = updgbl(rotaxis1$, "vecx")#Zero
% l5 K2 r) a8 g+ V& l- d: g result = updgbl(rotdir1$, "-vecy")#Direction
8 [7 p% b' t1 f7 x; V& G- w result = updgbl(rotaxis2$, "vecz")#Zero* g E H% I6 x1 g, \
result = updgbl(rotdir2$, "vecy")#Direction |
|