|
|

楼主 |
发表于 2007-4-12 13:23:50
|
显示全部楼层
来自: 中国四川阿坝藏族羌族自治州
基于MasterCAM平台的数控编程后处理程序应用开发2
(1)圆弧输出设置
" G6 Q; J) J: T* _) F, Z$ z7 u5 b 用于对圆弧插补的输出进行控制,如圆心的表达(R或IJK)、圆弧打断、整圆输出等。
7 C& a% w0 }: v7 m, X #Arc output settings
: C8 q$ x* f2 x3 x% M/ ]8 x1 s w breakarcs: 0 #Break arcs, 0 = no, 1 = quadrants, 2 = 180 arcs7 h$ I; {) \0 x/ |: U5 k
arcoutput: 0 #0 = IJK, 1 = R no sign, 2 = R signed neg. over 180
+ m# D" G, N7 Z3 c5 \: Z. | arctype : 2 #Arc center 1=abs, 2=St-Ctr, 3=Ctr-St, 4=unsigned inc.9 K1 E- Y8 L* i& E6 Y
do_full_arc : 1 #Allow full circle output? 0=no, 1=yes6 [7 @9 n" s T9 i) C; V' b; o
helix_arc: 1 #Support helix arc output, 0=no, 1=all planes, 2=XY plane only
1 y& x+ g2 a; U0 e2 {& w0 u arccheck : 1 #Check for small arcs, convert to linear
, P# a$ o u. c3 s0 q8 D$ L8 E1 T atol : .01#Angularity tolerance for arccheck = 2
* d( \: c, G9 x, L1 e (2)五轴机床构造及运动设置
0 q5 j% E) r5 a- `+ L7 d 用于对典型的五轴机床运动方式进行配置,可对工作台双摆动、主轴头双摆动、主轴摆动及工作台摆动、工作台复合摆动(回转)、主轴复合摆动(回转)等典型五轴机床进行设置。主轴回转或摆动对应于相应机床,可处于主动轴或从动轴的形式。针对KR214机床的配置Mtype设为2。
( m0 u' N% q+ f #Machine rotary routine settings" c, c, o- N8 m- @4 x1 r0 m* q4 i) v
mtype : 2 #Machine type (Define base and rotation plane below) 0 {& b) K$ P: U' y1 l
#0 = Table/Table, Y# |5 V' |( @6 J1 y& s; B) d
#1 = Tilt Head/Table) k1 q* A1 V9 k9 Y& D% H, u# Y; K( c
#2 = Head/Head, D1 @( J6 V9 z/ i j. {
#3 = Nutator Table/Table M0 B9 X) s( A( S
#4 = Nutator Tilt Head/Table
3 ^ J1 m" B# N #5 = Nutator Head/Head
/ @ t" b3 U5 X" O' [ head_is_sec : 2 #Set with mtype 1 and 4 to indicate head is on secondary
2 |8 `5 u4 f; ~8 v/ j (3)旋转轴矢量平面设置9 s" m& Q2 X' `* I2 T8 @6 i7 S7 |$ A
用于设置主动轴及从动旋转轴矢量方向,设置主轴或工作台复合摆动轴矢量方向。根据KR214(KR211)的C、A轴的运动配置,其C轴在XY平面内旋转,A轴在YZ平面内摆动,因而设置如下:/ T" w8 |6 z6 ^3 ~
#Primary planeXY XZ YZ
* t. D4 i1 ?8 h& c- j #Secondary or XZ XY XY1 J3 v) J2 I( t" r4 V
#Secondary YZ YZ XZ
% E+ Y+ \) S w rotaxis1 = vecy #Zero
6 Y( b1 G- b2 i( v- w9 P% S4 [5 [0 W+ S rotdir1 = vecx #Direction " v. h1 {7 J) f: o: V
rotaxis2 = vecz #Zero ; b- r# g R4 {0 D! r
rotdir2 = vecy #Direction4 C2 _0 E/ p3 ^/ K
p_nut_restore #Postblock, restores original axis settings
3 |7 ^, Z+ D* u result = updgbl(rotaxis1, vecy) #Zero1 \5 ^9 n! L, J* X' w
result = updgbl(rotdir1, vecx) #Direction. X$ `1 g( K4 ~6 A& w2 `
result = updgbl(rotaxis2, vecz) #Zero
* ?& Q2 ^( a9 F result = updgbl(rotdir2, vecx) #Direction
; Z! X8 K$ q, ^+ v' [/ b, O nut_ang_pri : -45
' D! A' v7 T5 C2 q5 T 对于旋转平面不在坐标平面的特殊主轴复合摆动或工作台复合摆动的五轴机床,且Mtype设置为3~5的特殊类型时,如DMU125P和DMU50P的机床需要正确设置Nut_ang_pri参数。只有当Mtype设置为3~5时,该参数才起作用。
* o5 h7 a3 A- j: V2 k (4)旋转轴中心、偏心设置及刀具轴输出设置
$ O- w6 d9 g; N: s 根据KR214(或KR211)机床运动轴配置特点,其g7_tilt参数应设为2。/ p! \& c( E) N# y4 \8 J& k
saxisx: 0 #The axis offset direction?, ~, ~: r" w, N( [
saxisy: 0 #The axis offset direction?5 m, ?9 B6 x- Z+ ?
saxisz: 0 #The axis offset direction?
8 Z2 O y8 e9 v# I7 \3 J) I. x. x r_intersect : 1 #Rotary axis intersect on their center of ratations. l# [: {5 x- E( E/ ], ]
g7_tilt : 2 #With mill_plus and nutating, select toolplane output
6 P' E4 L5 ]% h9 S) H #0 = Post selects G7 rotation axis
0 h1 g$ ]8 V5 t. l5 Y! C# X #1 to 4, user selected G7 rotation axis 8 q- `; S# V, P0 j
#1 = Primary C : X zero, Secondary B8 N( T4 N* V0 @# o7 c( v* J& g8 c( g7 L
#2 = Primary C : Y zero, Secondary A
! S& ^1 \2 H- U: m9 o #3 = Primary C : -X zero, Secondary B
- F- l( ^; r! g% d #4 = Primary C : -Y zero, Secondary A
T. {/ t6 A' Y) n" T% I0 b) ?$ v shift_90_s : 1 #Shift pos.=1, neg.=-1
, e, E9 b" J/ N2 `7 [ (5)机床行程及转角限位设置
! q$ L. t9 H& z8 \: E: Z 坐标运动轴的行程及软件限位设置的正确性,直接影响五轴机床数控程序输出的正确性,下述分别为KR214的各坐标轴的行程及A/C轴的转角行程设置。
2 P/ E% ]3 [0 U3 s( f1 P 1)X、Y、Z线性轴行程设置
: @: W* }1 Z% l5 D adj2sec : 1
" L5 Y4 ?' \5 |/ J, j6 c6 J use_stck_typ : 2 #0=Off, 1=Stock def., 2=Limits
% v1 I( g9 f, R up_x_lin_lim : 1350#X axis limit in positive direction
2 `; X7 a8 o: V9 ? up_y_lin_lim : 900#Y axis limit in positive direction
; I. I! M$ l$ s5 \/ z \# W+ |% ?" f up_z_lin_lim : 1400#Z axis limit in positive direction1 z, K* Z+ y) m7 S6 n# b
lw_x_lin_lim : -1350 #X axis limit in negative direction
& ^" x4 @' I+ ?2 Q% n8 j! a$ Q lw_y_lin_lim : -200 #Y axis limit in negative direction
& V9 G* D* e: ?4 |& h8 N4 e lw_z_lin_lim : 200#Z axis limit in negative direction
. h9 L8 `: ?% h1 n4 J 2)主动轴C和从动轴A的转角设置
6 | P2 k, d2 L; i2 e2 V auto_set_lim : 1 #Set the type from the angle limit settings (ignore these)& Y/ Y9 F) X% J# I* z0 t* w
pri_limtyp : 12 ?7 D8 ~6 F' H5 G3 _* t$ S
sec_limtyp : 1+ |$ X7 ]8 G+ R+ X- `
#Set the absolute angles for axis travel on primary
- z+ W) x$ _$ A0 ?# e9 m5 E pri_limlo: -200
' h! E) J) M) K) w/ ?! D4 k/ ~ pri_limhi: +200
- q& n" Z+ n' S1 k #Set intermediate angle, in limits, for post to reposition machine( ]- ~: }( f+ w6 h4 _$ X% K
pri_intlo: -200( A I4 W' E- T* F
pri_inthi: +200
& K& z( _7 R% f0 T: X5 w #Set the absolute angles for axis travel on secondary
2 X8 n! H: g# d sec_limlo: -115
+ g6 J: ~( C! x4 z) F' v8 [! | sec_limhi: +90 ' R. [1 \2 }# G" B9 J$ q
#Set intermediate angle, in limits,for post to reposition machine/ R; Z' B# n f6 a! y3 D* O+ s2 Y
sec_intlo: -200 ; g1 C' A/ H1 `) N. v1 {
sec_inthi: +200
" } N. \1 i9 o1 |( V }9 G$ r; ? 五坐标机床后处理程序的验证可通过下面的测试进行。例如,我们根据KR214的需求进行了多种测试,如X/W轴联动、固定A轴、变A轴、旋转C轴、五轴底刃、五轴侧刃等典型的五轴加工程序测试。其测试的刀具轨迹与部分程序代码如图3~图5所示。( ]* x- Y4 ]% G* Q' B( q
a)五轴底刃刀具轨迹及其模拟 b)五轴侧刃刀具轨迹及其模拟 图3 五轴铣削加工功能测试示意图 |
|