|
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区
您需要 登录 才可以下载或查看,没有账号?立即注册
×
楓大您好..因為需要一個AC的五轴後處理,自己改了一下後處理,NC出來的部份都不正確.能幫忙一下嗎?非常感謝.3 E) U) B( q' [5 U& |% D$ N
; _$ K0 t3 E. I$ J7 H/ i% v% H# --------------------------------------------------------------------------* D0 r& _- x5 L* Q6 @
# 5 Axis Rotary Settings
( y' I, a; t. q3 b& u0 l- J3 q# --------------------------------------------------------------------------& o* o0 f3 G0 f% J7 a/ t) s6 s* _. \4 }
#Assign axis address: |- @! X$ i- d* I7 o5 n* u
str_pri_axis : "C"/ d7 Y0 O/ s3 A( A' @/ d; e; Z: \
str_sec_axis : "A"
: S" z7 a4 n" E2 c5 Y- k' O8 rstr_dum_axis : "B"* @. i' L3 ?6 H# P; E8 x
6 O1 p3 K" T8 L! ^
#Toolplane mapped to top angle position strings$ ?2 G* A! l' x9 r* y# i: X
str_n_a_axis : "C"+ f# `- a W6 V, y8 E* A0 I4 @
str_n_b_axis : "A"1 `: Y& J) H, r8 h: e! H
str_n_c_axis : "B"6 n1 K0 j1 \2 h$ c6 {2 G& ?
7 Y# B& a7 f. C, R#Machine rotary routine settings5 p q8 Q, Z' d7 B+ B
mtype : 0 #Machine type (Define base and rotation plane below) + |# n. l! c6 C
#0 = Table/Table; {& k* H$ M% g/ t0 E4 u9 R; e
#1 = Tilt Head/Table
8 U" M4 P' I! l7 Y #2 = Head/Head
$ L7 E8 c* i6 a- K: K #3 = Nutator Table/Table
2 @: G3 X0 l% ]* G7 u" ~$ @4 O4 I #4 = Nutator Tilt Head/Table
; w* A. B8 n+ d3 S #5 = Nutator Head/Head1 v( h9 b4 C& M& D
* ~8 d" R9 `& m4 \) A# K/ }) O% Ghead_is_sec : 1 #Set with mtype 1 and 4 to indicate head is on secondary% P% r% W& g o) Z# [
* K+ ?4 V1 |5 K2 q
#Preferred setup is pri. zero matches sec. zero/direction' h4 ^% E, T$ T6 I% V; R7 m- a) J
#Zero machine and determine the planes perp. to axis rotations* |' g( _4 e1 ^" Z9 g
#These plane combinations are valid:2 A a2 Z+ O- I9 ~* e8 N
#Primary plane XY XZ YZ
5 L( Z1 T8 p- d5 \8 {- \#Secondary or XZ XY XY
3 k: U% B- k5 t, k#Secondary YZ YZ XZ
4 J; X* U: h ^( ?0 ~# R9 o) u" N+ u; r9 y* x5 `# w
#Primary axis angle description (in machine base terms)
% H1 q) n( z. D- g#With nutating (mtype 3-5) the nutating axis must be the XY plane
7 J: M" j- t2 g3 h3 i% ^rotaxis1$ = vecx #Zero
p' j' y7 o# z, ?/ q# B2 r. Brotdir1$ = -vecy #Direction
! Q4 U" h' H0 ~; e0 Y. r4 n: g# h: T
#Secondary axis angle description (in machine base terms)- N1 ]: z# \8 k5 M' r
#With nutating (mtype 3-5) the nutating axis and this plane normal) R6 W# u; Q8 ?
#are aligned to calculate the secondary angle
; W, G. L- l1 c& G5 q4 m3 m3 Vrotaxis2$ = vecz #Zero e* ^/ h* }! ~4 l0 _; u
rotdir2$ = vecy #Direction - H' l( J, w2 U4 y; l
2 G' V) |6 l% t* I% f
#NOTE: Use of 'top_map' requires the dealer match the# f. Z. F% Z1 u
# above settings below. These must match initial settings!!!
6 L% P# k |/ pp_nut_restore #Postblock, restores original axis settings
4 w" s; G* q9 |, P+ ~ result = updgbl(rotaxis1$, "vecx")#Zero
6 P! E, t" F7 k8 c result = updgbl(rotdir1$, "-vecy")#Direction
7 x2 h7 C* T# {3 z0 l% y! B result = updgbl(rotaxis2$, "vecz")#Zero2 j" @2 M% h* Y3 M# d( w
result = updgbl(rotdir2$, "vecy")#Direction |
|