|
|

楼主 |
发表于 2007-4-12 13:23:50
|
显示全部楼层
来自: 中国四川阿坝藏族羌族自治州
基于MasterCAM平台的数控编程后处理程序应用开发2
(1)圆弧输出设置9 E9 T7 r: E* g) d5 K# b! F8 \
用于对圆弧插补的输出进行控制,如圆心的表达(R或IJK)、圆弧打断、整圆输出等。- b: m) o. ?/ N# i1 n/ t% o
#Arc output settings! o4 e2 j$ o6 J
breakarcs: 0 #Break arcs, 0 = no, 1 = quadrants, 2 = 180 arcs
. t7 k9 h$ L5 i7 W6 Y/ u% B arcoutput: 0 #0 = IJK, 1 = R no sign, 2 = R signed neg. over 180
1 e$ _0 R6 M; Z" ?* b arctype : 2 #Arc center 1=abs, 2=St-Ctr, 3=Ctr-St, 4=unsigned inc.
@- r8 C$ ?5 @1 ?6 l' t- S* A do_full_arc : 1 #Allow full circle output? 0=no, 1=yes8 k# B" K/ B1 {
helix_arc: 1 #Support helix arc output, 0=no, 1=all planes, 2=XY plane only
5 ]0 G1 W( b7 |7 W" Q arccheck : 1 #Check for small arcs, convert to linear1 M, O/ v9 S5 C- w+ @* z7 G% T
atol : .01#Angularity tolerance for arccheck = 2
+ p: [: M0 G, k9 J q1 n& h (2)五轴机床构造及运动设置
: l. d$ {& `2 d) W" i( @ 用于对典型的五轴机床运动方式进行配置,可对工作台双摆动、主轴头双摆动、主轴摆动及工作台摆动、工作台复合摆动(回转)、主轴复合摆动(回转)等典型五轴机床进行设置。主轴回转或摆动对应于相应机床,可处于主动轴或从动轴的形式。针对KR214机床的配置Mtype设为2。
3 J9 W* H2 A- }: e3 }0 |' z/ V+ V #Machine rotary routine settings: v6 ?% R% p2 h
mtype : 2 #Machine type (Define base and rotation plane below) 6 E6 d. c7 J# w% ]! c( r _' P
#0 = Table/Table, f9 N }5 f! j$ g- G4 ?
#1 = Tilt Head/Table5 f- e* X$ Y8 F" ]+ i
#2 = Head/Head/ J8 Z% H8 [ t U! V
#3 = Nutator Table/Table2 \# h& O5 z+ A4 U3 [! F. B7 J4 ? k
#4 = Nutator Tilt Head/Table
5 g2 P: w! Q i8 j& C- U& q #5 = Nutator Head/Head
3 {( V+ K% X/ P+ G( `4 V head_is_sec : 2 #Set with mtype 1 and 4 to indicate head is on secondary
& e& t+ o1 v# K' q (3)旋转轴矢量平面设置
; u+ o9 D. k ~9 u( k 用于设置主动轴及从动旋转轴矢量方向,设置主轴或工作台复合摆动轴矢量方向。根据KR214(KR211)的C、A轴的运动配置,其C轴在XY平面内旋转,A轴在YZ平面内摆动,因而设置如下:+ M& [& B- J- C( d0 o
#Primary planeXY XZ YZ
1 V: y2 P5 b- @ #Secondary or XZ XY XY* L( a2 Z* q/ \0 V* r8 p
#Secondary YZ YZ XZ
2 \+ B9 a( X/ \1 R+ {4 T; ^4 c; q rotaxis1 = vecy #Zero & v( d$ C/ u) `% x9 ~9 d% ]; c2 u+ g
rotdir1 = vecx #Direction , r W% R5 x1 f% M) L
rotaxis2 = vecz #Zero
! E# x2 ~6 c7 y rotdir2 = vecy #Direction4 t# d$ z! L0 P) `
p_nut_restore #Postblock, restores original axis settings
0 u% p" B. n: O. b3 _8 a. t5 a result = updgbl(rotaxis1, vecy) #Zero
, ~; c, q; d- K: ]( z) y e# \ V result = updgbl(rotdir1, vecx) #Direction
: c x/ E2 @+ D) { result = updgbl(rotaxis2, vecz) #Zero
|- W6 d% Z" W$ j9 J result = updgbl(rotdir2, vecx) #Direction
4 l6 b1 _2 m8 O. u f* B( T nut_ang_pri : -45
?/ ?* k7 b3 h5 }% c% v& z. f 对于旋转平面不在坐标平面的特殊主轴复合摆动或工作台复合摆动的五轴机床,且Mtype设置为3~5的特殊类型时,如DMU125P和DMU50P的机床需要正确设置Nut_ang_pri参数。只有当Mtype设置为3~5时,该参数才起作用。
7 L% m9 x3 T+ l# o, l& { (4)旋转轴中心、偏心设置及刀具轴输出设置$ l7 a7 K% e, S9 M5 n$ J( {
根据KR214(或KR211)机床运动轴配置特点,其g7_tilt参数应设为2。
+ l$ S! f# G3 ^- F) h6 n% [ saxisx: 0 #The axis offset direction?
, C" w) d$ J4 D7 i& H8 d saxisy: 0 #The axis offset direction?
7 m a- d9 _8 e' Y3 L# y: _ saxisz: 0 #The axis offset direction?5 U- `- v% b p- x8 ~
r_intersect : 1 #Rotary axis intersect on their center of ratations. v( s5 x/ r& u
g7_tilt : 2 #With mill_plus and nutating, select toolplane output4 v! q/ N* |$ X9 k
#0 = Post selects G7 rotation axis1 z$ v/ |9 K, @+ D2 E
#1 to 4, user selected G7 rotation axis
/ g# I: r: V B8 M; W1 y #1 = Primary C : X zero, Secondary B) B) d6 M t2 R/ a
#2 = Primary C : Y zero, Secondary A
% F; U& @% ]7 Y) a% X #3 = Primary C : -X zero, Secondary B
4 t% S" y, n, @# y0 n9 x R- k #4 = Primary C : -Y zero, Secondary A6 g# V5 r5 Q4 _) q% x
shift_90_s : 1 #Shift pos.=1, neg.=-1- R. N$ O, _3 I) Y! m0 v/ _
(5)机床行程及转角限位设置/ k$ x9 b3 N* o/ J0 c5 ^
坐标运动轴的行程及软件限位设置的正确性,直接影响五轴机床数控程序输出的正确性,下述分别为KR214的各坐标轴的行程及A/C轴的转角行程设置。
% j" ~8 c7 k# m! G* m8 \( l 1)X、Y、Z线性轴行程设置6 v. h8 l! d8 L3 r# D3 ^
adj2sec : 1
; }% v! ]" d% H$ h! G use_stck_typ : 2 #0=Off, 1=Stock def., 2=Limits
! @# R' U6 q% }1 `' j up_x_lin_lim : 1350#X axis limit in positive direction
; X, P+ {- k, V! J8 L d y1 x up_y_lin_lim : 900#Y axis limit in positive direction
, e1 f% n. s% t) [5 T up_z_lin_lim : 1400#Z axis limit in positive direction
# n% S" S2 R1 `* K lw_x_lin_lim : -1350 #X axis limit in negative direction, \' P- i. z' m4 C o
lw_y_lin_lim : -200 #Y axis limit in negative direction
4 ^+ _( ]) C% Q, ~ lw_z_lin_lim : 200#Z axis limit in negative direction" b6 h, [- S' t
2)主动轴C和从动轴A的转角设置
; y/ L) H _; ?) u auto_set_lim : 1 #Set the type from the angle limit settings (ignore these)7 T) P1 J' l a! ~+ i. @) g: i
pri_limtyp : 1# [; T5 z; h! t9 R) Y% D3 |
sec_limtyp : 1
9 R, @/ ?/ p% @) n; n \ #Set the absolute angles for axis travel on primary' v1 ?$ l) P' S$ |/ ~7 x, ?: x( O- s. [
pri_limlo: -200
7 H8 T" ` }: E; J0 R) ?- L/ t pri_limhi: +200
! M. e( Q d- b0 a, B #Set intermediate angle, in limits, for post to reposition machine
: N1 l0 H. d: d' R& T+ k pri_intlo: -200
# B) [; y" n' l) x. E pri_inthi: +200
7 \! a! G: @1 D: C) O" S, z1 n' _ #Set the absolute angles for axis travel on secondary2 G/ U3 i. m' \! n L
sec_limlo: -115
* Q; A6 f7 Z1 g sec_limhi: +90
& V' b/ m+ P% Y$ Q+ f #Set intermediate angle, in limits,for post to reposition machine+ d0 q$ {; b6 {& o
sec_intlo: -200 8 I% o% [6 ~( S/ `$ n
sec_inthi: +200 ( k, [4 c z x
五坐标机床后处理程序的验证可通过下面的测试进行。例如,我们根据KR214的需求进行了多种测试,如X/W轴联动、固定A轴、变A轴、旋转C轴、五轴底刃、五轴侧刃等典型的五轴加工程序测试。其测试的刀具轨迹与部分程序代码如图3~图5所示。
* ?% M& y, @9 r/ Aa)五轴底刃刀具轨迹及其模拟 b)五轴侧刃刀具轨迹及其模拟 图3 五轴铣削加工功能测试示意图 |
|