|
|

楼主 |
发表于 2007-4-12 13:23:50
|
显示全部楼层
来自: 中国四川阿坝藏族羌族自治州
基于MasterCAM平台的数控编程后处理程序应用开发2
(1)圆弧输出设置
. b. q/ s6 ]7 b! F+ E+ Y4 G 用于对圆弧插补的输出进行控制,如圆心的表达(R或IJK)、圆弧打断、整圆输出等。
$ b" ^' \& m. C4 E: h #Arc output settings
: p2 C/ Y! f7 F, k4 h breakarcs: 0 #Break arcs, 0 = no, 1 = quadrants, 2 = 180 arcs
- O. i! _ R8 g; R. q) e arcoutput: 0 #0 = IJK, 1 = R no sign, 2 = R signed neg. over 180) x s+ n& Y# A* b; s+ ^0 K
arctype : 2 #Arc center 1=abs, 2=St-Ctr, 3=Ctr-St, 4=unsigned inc.) A, `8 \/ |9 q) M3 s" S
do_full_arc : 1 #Allow full circle output? 0=no, 1=yes6 z# F+ F3 n2 K# p. R7 I* c
helix_arc: 1 #Support helix arc output, 0=no, 1=all planes, 2=XY plane only: ?# e/ Z6 G( l* p4 T8 W' M- \
arccheck : 1 #Check for small arcs, convert to linear3 T ~: U( W1 v2 n
atol : .01#Angularity tolerance for arccheck = 2
% q# _( a: |! a' V$ g/ A (2)五轴机床构造及运动设置3 h% C( H* b: J
用于对典型的五轴机床运动方式进行配置,可对工作台双摆动、主轴头双摆动、主轴摆动及工作台摆动、工作台复合摆动(回转)、主轴复合摆动(回转)等典型五轴机床进行设置。主轴回转或摆动对应于相应机床,可处于主动轴或从动轴的形式。针对KR214机床的配置Mtype设为2。
+ ~' Q, D% C5 J1 X #Machine rotary routine settings
+ a1 K- E/ S! q% ~1 { j mtype : 2 #Machine type (Define base and rotation plane below)
1 Y7 ~. i S Y& n8 } #0 = Table/Table
7 w8 R8 }# a, {! B8 a {9 ^ #1 = Tilt Head/Table
) |- R7 S; _' l( ~& Y8 s #2 = Head/Head
+ h" G: q1 T" j8 d- a$ C3 ] #3 = Nutator Table/Table
- J7 U* {, b( g, n% F) ?5 O #4 = Nutator Tilt Head/Table
' \; Q+ w# R7 z* K: q #5 = Nutator Head/Head
; d* U* f6 d4 m head_is_sec : 2 #Set with mtype 1 and 4 to indicate head is on secondary v5 u T' I: N" e
(3)旋转轴矢量平面设置6 i1 \" c7 H; O
用于设置主动轴及从动旋转轴矢量方向,设置主轴或工作台复合摆动轴矢量方向。根据KR214(KR211)的C、A轴的运动配置,其C轴在XY平面内旋转,A轴在YZ平面内摆动,因而设置如下:
{8 K% I3 h8 F1 b; M #Primary planeXY XZ YZ( S6 n6 n% P) K. e: z
#Secondary or XZ XY XY1 E9 f+ q: m. T% p6 v+ }) D
#Secondary YZ YZ XZ: j9 _5 b8 X+ N, ^3 R
rotaxis1 = vecy #Zero & d- O- J% J/ S
rotdir1 = vecx #Direction ; z+ M; B* I/ Z# h8 j2 d
rotaxis2 = vecz #Zero
& i% a. J W7 L% h rotdir2 = vecy #Direction
% [ k+ t$ V# x! }; O# ?9 X# I p_nut_restore #Postblock, restores original axis settings
# E: n- H9 p* f! n result = updgbl(rotaxis1, vecy) #Zero
% z; d# \' D, H1 n8 \# P/ l& w' o$ L result = updgbl(rotdir1, vecx) #Direction
" C/ u/ H) j @: ]8 l0 X! y3 k8 I: V result = updgbl(rotaxis2, vecz) #Zero
$ `$ D* J* K0 m# U6 y result = updgbl(rotdir2, vecx) #Direction
+ P! ~3 ~! {* H8 N( j u ] nut_ang_pri : -45) X7 b7 @7 h7 c; K2 v% w
对于旋转平面不在坐标平面的特殊主轴复合摆动或工作台复合摆动的五轴机床,且Mtype设置为3~5的特殊类型时,如DMU125P和DMU50P的机床需要正确设置Nut_ang_pri参数。只有当Mtype设置为3~5时,该参数才起作用。( j. t6 r! K) E R& y0 K( Y
(4)旋转轴中心、偏心设置及刀具轴输出设置
4 Y u8 o( ~1 s1 R+ U 根据KR214(或KR211)机床运动轴配置特点,其g7_tilt参数应设为2。) y0 w) O' Y. t6 o
saxisx: 0 #The axis offset direction?
2 D5 Y" S0 p. r2 N. c8 F saxisy: 0 #The axis offset direction?% F8 O$ l: i, w/ L# \ {5 V
saxisz: 0 #The axis offset direction?8 I5 Q+ g C+ [5 C1 C; P" ^
r_intersect : 1 #Rotary axis intersect on their center of ratations; v: h; X+ \" @) t# ]! Y
g7_tilt : 2 #With mill_plus and nutating, select toolplane output
3 p7 w( M0 G! t8 P2 H+ m; F #0 = Post selects G7 rotation axis. @6 }* m& ]- n2 S: \
#1 to 4, user selected G7 rotation axis / N/ z9 T9 ~% y7 W+ k
#1 = Primary C : X zero, Secondary B; b% P% t- @6 \3 d8 F
#2 = Primary C : Y zero, Secondary A9 _. s# [7 D+ p1 P# |2 j
#3 = Primary C : -X zero, Secondary B
( P2 Z1 o- a: [ #4 = Primary C : -Y zero, Secondary A$ l5 }7 n r2 H2 }$ s7 r
shift_90_s : 1 #Shift pos.=1, neg.=-1
. v0 k6 k$ W; u (5)机床行程及转角限位设置
, K$ _- V$ T; W. |; U+ S9 L 坐标运动轴的行程及软件限位设置的正确性,直接影响五轴机床数控程序输出的正确性,下述分别为KR214的各坐标轴的行程及A/C轴的转角行程设置。
) A" }/ H- M) X* ~ 1)X、Y、Z线性轴行程设置) \% P; Z9 `3 s6 S
adj2sec : 1 * v2 x. d# ]& [/ N
use_stck_typ : 2 #0=Off, 1=Stock def., 2=Limits
& q! N6 v- W. t% G5 Z* c up_x_lin_lim : 1350#X axis limit in positive direction
8 }5 _2 v3 `/ |$ s6 E$ w$ ] up_y_lin_lim : 900#Y axis limit in positive direction: {2 H: q, W) s$ H7 N
up_z_lin_lim : 1400#Z axis limit in positive direction) V* r7 ?, a5 F; m' y
lw_x_lin_lim : -1350 #X axis limit in negative direction
' T* ?% q: }, ~( X; ` lw_y_lin_lim : -200 #Y axis limit in negative direction
* [- E, | h9 a: x9 q, y lw_z_lin_lim : 200#Z axis limit in negative direction
, F% q/ k/ y4 E6 O; j% ~$ f 2)主动轴C和从动轴A的转角设置
, i1 }% ~7 [ K: E1 q$ h5 | auto_set_lim : 1 #Set the type from the angle limit settings (ignore these)3 t: W _# o" x) E- T% j( s1 g
pri_limtyp : 1
% N- V' r2 I Z7 G sec_limtyp : 1
# z# o C( A/ z- u+ ]3 M9 p #Set the absolute angles for axis travel on primary$ f5 S- l$ a) Z4 J! _
pri_limlo: -200
) T! x: l2 R& F5 ?( L pri_limhi: +200 2 v6 ~! u5 L: n& K
#Set intermediate angle, in limits, for post to reposition machine, w, e, D* e9 I/ J: @0 _
pri_intlo: -200% o- j% V c u5 l5 W" e7 y
pri_inthi: +200
+ h, I: A3 `& \5 [! v+ j0 e! q4 k #Set the absolute angles for axis travel on secondary9 S' t3 g9 C# ~' m- }, ~
sec_limlo: -115 6 k2 I/ P; N7 d. T' Y4 x
sec_limhi: +90
! S# T& k3 ~) D #Set intermediate angle, in limits,for post to reposition machine* N; g P& F* t
sec_intlo: -200 G- @" W0 p; ^ l
sec_inthi: +200 6 D7 n n% l. l: k Q+ m
五坐标机床后处理程序的验证可通过下面的测试进行。例如,我们根据KR214的需求进行了多种测试,如X/W轴联动、固定A轴、变A轴、旋转C轴、五轴底刃、五轴侧刃等典型的五轴加工程序测试。其测试的刀具轨迹与部分程序代码如图3~图5所示。6 d* h$ {/ R5 l/ \" x
a)五轴底刃刀具轨迹及其模拟 b)五轴侧刃刀具轨迹及其模拟 图3 五轴铣削加工功能测试示意图 |
|