|
|

楼主 |
发表于 2007-4-12 13:23:50
|
显示全部楼层
来自: 中国四川阿坝藏族羌族自治州
基于MasterCAM平台的数控编程后处理程序应用开发2
(1)圆弧输出设置, D! ?% s+ p5 I" Q( q; v( Q3 y/ W
用于对圆弧插补的输出进行控制,如圆心的表达(R或IJK)、圆弧打断、整圆输出等。0 W/ k7 B [( J0 Q
#Arc output settings
- V9 }2 K/ K! H8 b1 o2 e breakarcs: 0 #Break arcs, 0 = no, 1 = quadrants, 2 = 180 arcs
. ^: z4 Y% _" x; i arcoutput: 0 #0 = IJK, 1 = R no sign, 2 = R signed neg. over 180; R) e1 b) R i- Y
arctype : 2 #Arc center 1=abs, 2=St-Ctr, 3=Ctr-St, 4=unsigned inc., N. f6 a* E* {/ b* m2 }7 V
do_full_arc : 1 #Allow full circle output? 0=no, 1=yes9 E7 o' E8 d- C! p% T+ N
helix_arc: 1 #Support helix arc output, 0=no, 1=all planes, 2=XY plane only; x* T" u0 S4 d" ~5 |, [; ?6 Q$ I
arccheck : 1 #Check for small arcs, convert to linear2 Q6 O: k) z" B/ B+ x4 ]! x
atol : .01#Angularity tolerance for arccheck = 2
) U2 V. V2 i4 N. ]7 l (2)五轴机床构造及运动设置
3 b% O* X# ?# I- j4 Q; B0 |+ D# R 用于对典型的五轴机床运动方式进行配置,可对工作台双摆动、主轴头双摆动、主轴摆动及工作台摆动、工作台复合摆动(回转)、主轴复合摆动(回转)等典型五轴机床进行设置。主轴回转或摆动对应于相应机床,可处于主动轴或从动轴的形式。针对KR214机床的配置Mtype设为2。: o) l+ s# m9 F e& P& B
#Machine rotary routine settings2 D- \; ^( j1 a$ F& I4 v. a& i
mtype : 2 #Machine type (Define base and rotation plane below) ) `6 g9 n q* A) ?( G7 t& I
#0 = Table/Table
; `9 |/ W8 r3 {. P* H2 \ #1 = Tilt Head/Table
& y; ^ O. S [1 M #2 = Head/Head4 O& f# y; W+ I* @$ i/ S; b
#3 = Nutator Table/Table6 i* [. ]4 l6 p# J+ Q
#4 = Nutator Tilt Head/Table6 l' A3 v) w$ G8 y. k' |& W; G
#5 = Nutator Head/Head5 c2 N% o; O" t+ B
head_is_sec : 2 #Set with mtype 1 and 4 to indicate head is on secondary c, C A* {, G+ ]
(3)旋转轴矢量平面设置
8 m+ G: @, I8 u& h) t 用于设置主动轴及从动旋转轴矢量方向,设置主轴或工作台复合摆动轴矢量方向。根据KR214(KR211)的C、A轴的运动配置,其C轴在XY平面内旋转,A轴在YZ平面内摆动,因而设置如下:+ z" |3 G( _+ s" D+ v5 w! K, E
#Primary planeXY XZ YZ
/ _+ m8 v- e. q# w; @9 M3 t #Secondary or XZ XY XY$ C3 ~: n* o2 y& g5 a; y) ]
#Secondary YZ YZ XZ9 A# x, k6 {; E/ ~5 |2 Q4 u
rotaxis1 = vecy #Zero - o/ p4 n5 k5 n1 n& ]
rotdir1 = vecx #Direction
- R( [3 E/ \6 L$ M rotaxis2 = vecz #Zero
( s0 e# m& n: @# @ rotdir2 = vecy #Direction
8 d3 @' k0 T8 X; b; X1 S/ E p_nut_restore #Postblock, restores original axis settings . S& J3 d) T5 w- U% l+ U0 |
result = updgbl(rotaxis1, vecy) #Zero
$ F3 [8 r, \3 N6 h; h* q8 L# H; ?) b result = updgbl(rotdir1, vecx) #Direction
' g; K1 F0 f7 ^ result = updgbl(rotaxis2, vecz) #Zero
5 m$ \) I" o1 R: h# x( [ result = updgbl(rotdir2, vecx) #Direction $ m M- i( Z5 k
nut_ang_pri : -45
1 ]# l: @$ N5 M 对于旋转平面不在坐标平面的特殊主轴复合摆动或工作台复合摆动的五轴机床,且Mtype设置为3~5的特殊类型时,如DMU125P和DMU50P的机床需要正确设置Nut_ang_pri参数。只有当Mtype设置为3~5时,该参数才起作用。
1 P' [$ O- C! X9 y" z* I (4)旋转轴中心、偏心设置及刀具轴输出设置
4 N' d+ s6 T7 _# ^6 H, | 根据KR214(或KR211)机床运动轴配置特点,其g7_tilt参数应设为2。8 ~& k( W, \+ f
saxisx: 0 #The axis offset direction?
- o x4 l7 K1 p# |+ A saxisy: 0 #The axis offset direction?) I# A3 h0 J1 j) R& \7 Y2 E
saxisz: 0 #The axis offset direction?5 x" C/ v+ F% {- D
r_intersect : 1 #Rotary axis intersect on their center of ratations' r7 d: n( H; A! ?! m0 B3 f( f
g7_tilt : 2 #With mill_plus and nutating, select toolplane output1 Z4 W! ~) s- T' `) Q
#0 = Post selects G7 rotation axis! }8 t: ]$ {+ e1 ]& N8 v
#1 to 4, user selected G7 rotation axis ! s3 [5 q2 L& |
#1 = Primary C : X zero, Secondary B
8 C2 D) t: Z4 `, }: | #2 = Primary C : Y zero, Secondary A8 K* x( x" \+ O' T: b
#3 = Primary C : -X zero, Secondary B- u! `3 N- D+ _6 D; F
#4 = Primary C : -Y zero, Secondary A
4 Y+ W& U0 ^8 o shift_90_s : 1 #Shift pos.=1, neg.=-1
) z+ ]3 g4 n3 P* r/ `1 x (5)机床行程及转角限位设置
& r% Q6 ^% S, X/ \6 X( j" l Y 坐标运动轴的行程及软件限位设置的正确性,直接影响五轴机床数控程序输出的正确性,下述分别为KR214的各坐标轴的行程及A/C轴的转角行程设置。3 p2 ~( [- _1 V! a: A
1)X、Y、Z线性轴行程设置
6 v& n& {8 x( v5 K; K5 _" Z7 ?/ V adj2sec : 1 - ]$ U" |4 _; y% N' A& m! \- Z5 R
use_stck_typ : 2 #0=Off, 1=Stock def., 2=Limits/ p; b& E- V9 u$ J( l1 R
up_x_lin_lim : 1350#X axis limit in positive direction
) @0 r2 @. f$ R# l up_y_lin_lim : 900#Y axis limit in positive direction! w6 Y1 D4 b# V
up_z_lin_lim : 1400#Z axis limit in positive direction" H8 y# r- v9 I1 `
lw_x_lin_lim : -1350 #X axis limit in negative direction2 J4 N$ R8 ?: p) k9 {8 Y4 d8 u
lw_y_lin_lim : -200 #Y axis limit in negative direction
" ^, q( D, |! q. c lw_z_lin_lim : 200#Z axis limit in negative direction
! J8 G# v/ z: i. `) A3 ] 2)主动轴C和从动轴A的转角设置
, ~* J9 @" M2 k! H+ m auto_set_lim : 1 #Set the type from the angle limit settings (ignore these)2 B' s) _1 Q, X( e
pri_limtyp : 1
% Z) ?. R" q! _$ u sec_limtyp : 18 m3 l7 w) h2 J- n8 h# t9 Q% H
#Set the absolute angles for axis travel on primary
8 T" Q6 w' o9 d7 A3 A/ F2 v pri_limlo: -200
% Q, v5 u+ Y7 g( b1 }, f2 d( L( d pri_limhi: +200
0 F& N' m3 w2 s/ { #Set intermediate angle, in limits, for post to reposition machine4 T! H( i8 U, o9 u
pri_intlo: -200% b% e0 P& N8 ?1 f" n
pri_inthi: +200
; v; S9 D* m4 v+ r# r/ H. M #Set the absolute angles for axis travel on secondary
3 {. C$ W V$ v: `4 Z1 ?$ J sec_limlo: -115
2 P5 A2 U1 N2 V& s# n' Q/ L7 A sec_limhi: +90
L# N& j1 G: w: @ #Set intermediate angle, in limits,for post to reposition machine
$ I! ~9 D" o4 A& N8 [" O sec_intlo: -200 3 D3 Q( P/ Z$ ?
sec_inthi: +200
' I. z, N. U2 |/ J 五坐标机床后处理程序的验证可通过下面的测试进行。例如,我们根据KR214的需求进行了多种测试,如X/W轴联动、固定A轴、变A轴、旋转C轴、五轴底刃、五轴侧刃等典型的五轴加工程序测试。其测试的刀具轨迹与部分程序代码如图3~图5所示。, ]: q4 [8 |( X1 ~0 A9 q
a)五轴底刃刀具轨迹及其模拟 b)五轴侧刃刀具轨迹及其模拟 图3 五轴铣削加工功能测试示意图 |
|