|
|

楼主 |
发表于 2007-4-12 13:23:50
|
显示全部楼层
来自: 中国四川阿坝藏族羌族自治州
基于MasterCAM平台的数控编程后处理程序应用开发2
(1)圆弧输出设置
+ t/ C; D) ~/ G! X' U 用于对圆弧插补的输出进行控制,如圆心的表达(R或IJK)、圆弧打断、整圆输出等。6 }7 [+ W7 o( S$ \3 T. a0 }
#Arc output settings
/ }( ]/ o0 Q; M1 Y7 u5 ^% g0 P6 A- a. C breakarcs: 0 #Break arcs, 0 = no, 1 = quadrants, 2 = 180 arcs
* \ W) R# I* t' |9 d/ A5 g: U arcoutput: 0 #0 = IJK, 1 = R no sign, 2 = R signed neg. over 180
- n% x# v+ d8 q* I0 X# N, @ arctype : 2 #Arc center 1=abs, 2=St-Ctr, 3=Ctr-St, 4=unsigned inc.( D9 \& {- m/ V0 V9 ^% O
do_full_arc : 1 #Allow full circle output? 0=no, 1=yes8 z& z& r; i: o0 Z# B" _0 g* j# n5 W
helix_arc: 1 #Support helix arc output, 0=no, 1=all planes, 2=XY plane only
% `7 @, o3 Y& \9 R' C) A$ r) A4 q; L) B arccheck : 1 #Check for small arcs, convert to linear t2 r, n5 e* J* r
atol : .01#Angularity tolerance for arccheck = 2
+ {1 Q" T; u7 ]7 w; B (2)五轴机床构造及运动设置0 P- Z7 W3 J% l* w; k& X( x
用于对典型的五轴机床运动方式进行配置,可对工作台双摆动、主轴头双摆动、主轴摆动及工作台摆动、工作台复合摆动(回转)、主轴复合摆动(回转)等典型五轴机床进行设置。主轴回转或摆动对应于相应机床,可处于主动轴或从动轴的形式。针对KR214机床的配置Mtype设为2。8 O* {& i4 k* S; ^/ l7 a$ M$ O0 N
#Machine rotary routine settings
0 a, y* u. o' a1 u7 w) E mtype : 2 #Machine type (Define base and rotation plane below)
0 s# B, i% U* e6 D5 P3 R3 I9 n #0 = Table/Table% L( X4 r( A, G ~7 d
#1 = Tilt Head/Table
9 ? @; ? [& y, _5 P/ V #2 = Head/Head
: f) R6 e6 V6 s7 R4 d: ~: k! M _5 h #3 = Nutator Table/Table% h% L8 \$ D7 A# E
#4 = Nutator Tilt Head/Table
0 T& X3 ?; U0 m2 x4 k #5 = Nutator Head/Head" _# t$ l: G) [: z8 o( P. I
head_is_sec : 2 #Set with mtype 1 and 4 to indicate head is on secondary. m0 M! Q) Z: i3 }- |+ d* M$ i
(3)旋转轴矢量平面设置) |, g9 O0 T, a9 T: h& h5 C
用于设置主动轴及从动旋转轴矢量方向,设置主轴或工作台复合摆动轴矢量方向。根据KR214(KR211)的C、A轴的运动配置,其C轴在XY平面内旋转,A轴在YZ平面内摆动,因而设置如下:
( |) e3 l1 T$ |# Q, c' e #Primary planeXY XZ YZ
1 ^) n5 x* V6 z #Secondary or XZ XY XY E6 p/ E7 i9 ~5 @% u" {
#Secondary YZ YZ XZ
8 D3 V9 }1 G4 T6 g; Q% o5 U& M& ? rotaxis1 = vecy #Zero h' y4 ]# N. E7 q5 S9 c
rotdir1 = vecx #Direction
8 ~7 j2 a/ s/ w: n9 ? rotaxis2 = vecz #Zero
; }. y3 a* a! G0 | rotdir2 = vecy #Direction
# C4 ~7 d: B8 l3 y, g! e* N% P p_nut_restore #Postblock, restores original axis settings ( N& k" V' ^2 ^ l, X
result = updgbl(rotaxis1, vecy) #Zero
7 X" `7 m& j6 S5 v result = updgbl(rotdir1, vecx) #Direction
3 ]5 z9 t+ p; K$ B! n5 b8 i0 s# \ result = updgbl(rotaxis2, vecz) #Zero
- Y8 O8 b$ |8 l! q* X! e/ K result = updgbl(rotdir2, vecx) #Direction : l) G/ J% ^8 I" u) s, y: ~
nut_ang_pri : -45
+ l! Z- A6 s- x D3 r7 B 对于旋转平面不在坐标平面的特殊主轴复合摆动或工作台复合摆动的五轴机床,且Mtype设置为3~5的特殊类型时,如DMU125P和DMU50P的机床需要正确设置Nut_ang_pri参数。只有当Mtype设置为3~5时,该参数才起作用。; [7 J% T/ x3 i6 q
(4)旋转轴中心、偏心设置及刀具轴输出设置
3 A) F0 n* h- K- Y8 B 根据KR214(或KR211)机床运动轴配置特点,其g7_tilt参数应设为2。" \- K; n: h2 n5 |. d# }% O. p
saxisx: 0 #The axis offset direction?
1 f1 e/ g) M) x saxisy: 0 #The axis offset direction?( A' H! f( E" ?, t" |! ~: ?' M! n3 I
saxisz: 0 #The axis offset direction?" g2 F; c3 a6 o( L
r_intersect : 1 #Rotary axis intersect on their center of ratations; M1 d' s4 E9 e% l' [
g7_tilt : 2 #With mill_plus and nutating, select toolplane output
( M E& i8 b2 ~7 H #0 = Post selects G7 rotation axis
* g( Q. D9 J- _0 Y5 T #1 to 4, user selected G7 rotation axis 8 I* _: Z/ Z( ^ [
#1 = Primary C : X zero, Secondary B
P4 T4 W' }* y8 A" v# s3 n #2 = Primary C : Y zero, Secondary A1 O+ }: c; h0 m0 F" r# w
#3 = Primary C : -X zero, Secondary B
* e! l3 d7 f; w% _ #4 = Primary C : -Y zero, Secondary A3 _8 u. S, V) s! s0 i, H
shift_90_s : 1 #Shift pos.=1, neg.=-1
! L; f' i9 `7 T. ]+ ]+ F, ] (5)机床行程及转角限位设置
; R: X2 X/ z- z/ q* `5 ] 坐标运动轴的行程及软件限位设置的正确性,直接影响五轴机床数控程序输出的正确性,下述分别为KR214的各坐标轴的行程及A/C轴的转角行程设置。
6 J {6 I1 j; k( \ 1)X、Y、Z线性轴行程设置+ s1 Y' s! g- |' E
adj2sec : 1
! \1 I3 l" F7 i% G. f% M/ y use_stck_typ : 2 #0=Off, 1=Stock def., 2=Limits9 d* m) @$ P3 G' A. l2 ], [
up_x_lin_lim : 1350#X axis limit in positive direction
3 e7 R( C# _; |6 V" y up_y_lin_lim : 900#Y axis limit in positive direction
4 |# I6 r: U8 Y( @1 e6 O6 n up_z_lin_lim : 1400#Z axis limit in positive direction
6 v. a: U" e3 J lw_x_lin_lim : -1350 #X axis limit in negative direction0 d/ c! X4 N9 F3 q2 y, i# Y" G6 P. D/ A
lw_y_lin_lim : -200 #Y axis limit in negative direction3 E/ `7 Q) S4 U% A
lw_z_lin_lim : 200#Z axis limit in negative direction7 q+ e; |2 u8 |+ P' s! Z
2)主动轴C和从动轴A的转角设置
* p. G7 a4 x# R# d auto_set_lim : 1 #Set the type from the angle limit settings (ignore these)
% Z) Y+ ?* N) W pri_limtyp : 1# `! T u5 S5 }+ T
sec_limtyp : 1' k) b# Q+ O8 `
#Set the absolute angles for axis travel on primary1 P0 e M; ~; |' A8 a
pri_limlo: -2002 Z8 n x( O* Z4 v9 I
pri_limhi: +200 8 a ?5 L' i# C( Z3 }, N+ K' Z
#Set intermediate angle, in limits, for post to reposition machine
2 s6 }. l4 f' f. t8 } pri_intlo: -200
' d! ]5 n) a5 M8 k: {2 r pri_inthi: +200 ) {. \$ s- L- F+ e
#Set the absolute angles for axis travel on secondary
: a. d; v7 A8 R6 g# V sec_limlo: -115
1 [$ v+ v, E4 ]" `' A/ K1 H4 N sec_limhi: +90 * I) W. Z* I7 Y! _ `# a0 z
#Set intermediate angle, in limits,for post to reposition machine4 k* K# j. g% x7 C) n I( B
sec_intlo: -200 3 S5 ~% G) {& _# _' [( L
sec_inthi: +200 w& O" `/ \# j: r0 J
五坐标机床后处理程序的验证可通过下面的测试进行。例如,我们根据KR214的需求进行了多种测试,如X/W轴联动、固定A轴、变A轴、旋转C轴、五轴底刃、五轴侧刃等典型的五轴加工程序测试。其测试的刀具轨迹与部分程序代码如图3~图5所示。# l$ k& x! H% G# D$ X
a)五轴底刃刀具轨迹及其模拟 b)五轴侧刃刀具轨迹及其模拟 图3 五轴铣削加工功能测试示意图 |
|