|
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区
您需要 登录 才可以下载或查看,没有账号?立即注册
×
楓大您好..因為需要一個AC的五轴後處理,自己改了一下後處理,NC出來的部份都不正確.能幫忙一下嗎?非常感謝.
`5 u( q, e2 b& \; E) u+ \' J, h' c! k8 O# P7 \: F" N. {
# --------------------------------------------------------------------------
; R5 A) M3 s( {" N4 j. \/ U6 k0 a# 5 Axis Rotary Settings4 B. F! ?+ g6 b, T8 `
# --------------------------------------------------------------------------
' `6 S# R& v' u! r#Assign axis address
% M& q; z9 q5 ?! d- c! Y1 j$ wstr_pri_axis : "C"
- p4 O* Y2 M" @' m4 Gstr_sec_axis : "A"
5 O, X, K- [! z5 E% Q- estr_dum_axis : "B"
( ?' y ?) ~$ g( }% B
) @6 }4 M$ I. @' E$ _0 x- P3 i1 ]#Toolplane mapped to top angle position strings* D! ]: g$ R! H7 z! \
str_n_a_axis : "C"/ v0 F; U% G$ i* ]! K1 s$ \% D& s
str_n_b_axis : "A"
8 d$ @# Y$ g/ A# A6 ?! D+ Astr_n_c_axis : "B"6 v1 j+ U* _* A
8 Z9 R( {" [$ {( V% b6 j
#Machine rotary routine settings
* J2 j2 B: ~7 y/ m# O; }mtype : 0 #Machine type (Define base and rotation plane below)
9 E$ `0 D D1 L w- r #0 = Table/Table
; ~3 q" D" i/ w) J f/ |0 T #1 = Tilt Head/Table- l; i2 [$ W- r0 l, e
#2 = Head/Head( F, W" q) n- v; P) k V! a; E
#3 = Nutator Table/Table
0 W- W$ ]/ s6 {! Q+ m #4 = Nutator Tilt Head/Table
9 S& `2 e: l! Z #5 = Nutator Head/Head3 f9 P4 R2 _; X0 _) G- X
) ^9 M0 d" E! dhead_is_sec : 1 #Set with mtype 1 and 4 to indicate head is on secondary6 n6 t! R) d, Q! [" |# `2 ~
; p/ v7 Z1 ~) R! c$ n#Preferred setup is pri. zero matches sec. zero/direction: J+ ~1 y, M' T3 G
#Zero machine and determine the planes perp. to axis rotations
: f! Z7 B& C0 N#These plane combinations are valid:
: y5 v5 c; n9 d6 j- \#Primary plane XY XZ YZ
& q! \1 V* Y7 M0 o* G: s* M#Secondary or XZ XY XY% E* e2 ]. L& I% L9 y
#Secondary YZ YZ XZ
4 ]# e3 D. ~, D$ V; a7 G7 Z' {5 V" D4 G2 s+ B
#Primary axis angle description (in machine base terms)
' M) t' b% r* [2 {#With nutating (mtype 3-5) the nutating axis must be the XY plane
6 V- v0 A: f* q( I/ Brotaxis1$ = vecx #Zero
( W/ ^" Y, M2 A( f" J( [rotdir1$ = -vecy #Direction 6 |, h+ V) z' C6 o
* A0 i: W% ^8 {1 g4 k2 h9 h
#Secondary axis angle description (in machine base terms)+ t8 c) E+ E6 ~7 e% c
#With nutating (mtype 3-5) the nutating axis and this plane normal
/ m3 R! P; X. w$ u+ Z$ m9 |#are aligned to calculate the secondary angle
. o0 ~2 }) @' F. L* F- Orotaxis2$ = vecz #Zero , l+ p1 g" G6 ~# e7 w
rotdir2$ = vecy #Direction , B/ O$ q) ~2 y; u4 N4 y% P
: U9 o( |9 }1 l3 m6 ^/ x#NOTE: Use of 'top_map' requires the dealer match the
; c4 \# K* C5 w' q, G, `3 V& l: F# above settings below. These must match initial settings!!!! l. o3 K$ K* I# C- o
p_nut_restore #Postblock, restores original axis settings
4 K) z! A5 g6 j" z result = updgbl(rotaxis1$, "vecx")#Zero! P5 T; _- c# G+ @; V+ u- I
result = updgbl(rotdir1$, "-vecy")#Direction9 n# w+ J9 S5 j3 l' B
result = updgbl(rotaxis2$, "vecz")#Zero
6 _! Z$ ]/ u) \ result = updgbl(rotdir2$, "vecy")#Direction |
|