|

楼主 |
发表于 2007-4-12 13:23:50
|
显示全部楼层
来自: 中国四川阿坝藏族羌族自治州
基于MasterCAM平台的数控编程后处理程序应用开发2
(1)圆弧输出设置
1 `5 J! e7 {# A4 v0 @ 用于对圆弧插补的输出进行控制,如圆心的表达(R或IJK)、圆弧打断、整圆输出等。
5 z- u I0 C/ \ #Arc output settings4 M$ m/ q: {: p" i0 ?
breakarcs: 0 #Break arcs, 0 = no, 1 = quadrants, 2 = 180 arcs
5 R/ m- q- O! m: s+ h: @ arcoutput: 0 #0 = IJK, 1 = R no sign, 2 = R signed neg. over 1800 P6 L! R- A/ R' }( N
arctype : 2 #Arc center 1=abs, 2=St-Ctr, 3=Ctr-St, 4=unsigned inc. h# B, ~. V2 r: v6 F5 W2 X
do_full_arc : 1 #Allow full circle output? 0=no, 1=yes% f+ l4 Z$ `1 _" t4 `! X
helix_arc: 1 #Support helix arc output, 0=no, 1=all planes, 2=XY plane only
& n8 s7 [/ _( ~3 j5 U, r arccheck : 1 #Check for small arcs, convert to linear
: h, @- I9 e# E4 O( P5 f; o0 i atol : .01#Angularity tolerance for arccheck = 2
: |/ z u' P! n2 U& f6 X1 p (2)五轴机床构造及运动设置6 e& |! z) y, f
用于对典型的五轴机床运动方式进行配置,可对工作台双摆动、主轴头双摆动、主轴摆动及工作台摆动、工作台复合摆动(回转)、主轴复合摆动(回转)等典型五轴机床进行设置。主轴回转或摆动对应于相应机床,可处于主动轴或从动轴的形式。针对KR214机床的配置Mtype设为2。
, o m5 G a, H #Machine rotary routine settings
( x( u1 J U$ G5 y: V4 v mtype : 2 #Machine type (Define base and rotation plane below) % X$ l \3 V+ a: D: u9 v1 W5 W
#0 = Table/Table' q, i# j0 W3 O3 h. c+ k
#1 = Tilt Head/Table
: _7 f' X& i: R9 i3 o8 ?& [ #2 = Head/Head
7 x! ?& b* Z9 B; i% C #3 = Nutator Table/Table
: a8 c3 i; s* C' U6 {- R; |1 ] #4 = Nutator Tilt Head/Table# H! J) j* w$ a3 Z1 C0 E
#5 = Nutator Head/Head
* q. d/ h; g& n0 H head_is_sec : 2 #Set with mtype 1 and 4 to indicate head is on secondary
) c+ h* B) K; b( [$ X2 y( Y7 d4 x' p (3)旋转轴矢量平面设置; V, y+ P# f; W
用于设置主动轴及从动旋转轴矢量方向,设置主轴或工作台复合摆动轴矢量方向。根据KR214(KR211)的C、A轴的运动配置,其C轴在XY平面内旋转,A轴在YZ平面内摆动,因而设置如下:( }* q E$ `/ B- c
#Primary planeXY XZ YZ& B9 U4 e; z% F+ h
#Secondary or XZ XY XY
4 f3 M' w4 [9 X/ P! M #Secondary YZ YZ XZ
5 c7 f, N1 I1 L rotaxis1 = vecy #Zero
0 p" O+ X3 f7 R- ]( x rotdir1 = vecx #Direction
j6 j) E+ ^ [' e! P- z rotaxis2 = vecz #Zero
6 C/ b* r' D/ ] rotdir2 = vecy #Direction2 U* p0 P* [) E0 k8 M
p_nut_restore #Postblock, restores original axis settings
0 U0 E" V- e+ m5 P" N1 j. \ result = updgbl(rotaxis1, vecy) #Zero
1 e2 p" g R2 m2 ]4 h' s result = updgbl(rotdir1, vecx) #Direction( Z( l9 s' O; o7 a3 `4 P
result = updgbl(rotaxis2, vecz) #Zero
1 L8 b. ^0 t7 M5 y9 a result = updgbl(rotdir2, vecx) #Direction ! Y& `( m2 D% t( W' p
nut_ang_pri : -45& o h7 g, y* ]+ L6 K; T& w( J
对于旋转平面不在坐标平面的特殊主轴复合摆动或工作台复合摆动的五轴机床,且Mtype设置为3~5的特殊类型时,如DMU125P和DMU50P的机床需要正确设置Nut_ang_pri参数。只有当Mtype设置为3~5时,该参数才起作用。6 @5 W5 U2 x9 n4 c
(4)旋转轴中心、偏心设置及刀具轴输出设置8 u, h5 A3 {0 N y5 D; Y& h7 [- N0 J
根据KR214(或KR211)机床运动轴配置特点,其g7_tilt参数应设为2。
& X s2 M3 D; `! D' G+ _ saxisx: 0 #The axis offset direction?
) f2 P" E6 a0 b6 T' x7 {. [ saxisy: 0 #The axis offset direction?0 i0 m/ P4 c- w' g) d3 v
saxisz: 0 #The axis offset direction?
8 V7 i$ r" X& Z0 p5 p! B6 R r_intersect : 1 #Rotary axis intersect on their center of ratations& O$ r# U0 L0 J! s+ C9 V+ p6 [
g7_tilt : 2 #With mill_plus and nutating, select toolplane output
" X, B4 z2 m2 M9 B0 _; J #0 = Post selects G7 rotation axis; D$ d: X, w5 l r7 c
#1 to 4, user selected G7 rotation axis
7 K, ^: C' {; i L #1 = Primary C : X zero, Secondary B" u: s1 P) z8 n2 z- C
#2 = Primary C : Y zero, Secondary A# ~, n; V( o! C5 k9 h
#3 = Primary C : -X zero, Secondary B
/ U. p( E/ g" k+ p6 i% b5 W7 E; k: e #4 = Primary C : -Y zero, Secondary A
( \6 L6 W8 U' {* N6 Y2 N# V shift_90_s : 1 #Shift pos.=1, neg.=-1& _: Y; L& i- b1 Y5 P7 f$ ]4 R
(5)机床行程及转角限位设置
8 E( S9 i/ S+ g- F2 R 坐标运动轴的行程及软件限位设置的正确性,直接影响五轴机床数控程序输出的正确性,下述分别为KR214的各坐标轴的行程及A/C轴的转角行程设置。
w. d, g, i# T; n e0 U Z4 ` 1)X、Y、Z线性轴行程设置
% o7 \0 Q* x: b* w- R adj2sec : 1 5 o: s+ ~( [! y, u/ D) {& Q" B
use_stck_typ : 2 #0=Off, 1=Stock def., 2=Limits$ ?5 r, j2 S# I$ ]& V( H# ?' }2 y
up_x_lin_lim : 1350#X axis limit in positive direction/ q8 n5 e' i% i( W- s
up_y_lin_lim : 900#Y axis limit in positive direction7 D; v; t" |5 z5 n, D& T% ?6 ^5 \
up_z_lin_lim : 1400#Z axis limit in positive direction3 o$ w; X& b: N. X" h. s
lw_x_lin_lim : -1350 #X axis limit in negative direction
, d; e' W& G4 K lw_y_lin_lim : -200 #Y axis limit in negative direction
3 ], X! i+ @: a/ y. i. Q3 r# ` D lw_z_lin_lim : 200#Z axis limit in negative direction; U. c, C. S" C6 I0 A; h
2)主动轴C和从动轴A的转角设置
3 [- C2 ?* B+ r- m auto_set_lim : 1 #Set the type from the angle limit settings (ignore these)
, ^: P; s; ~6 n) M7 p& p* f pri_limtyp : 1
) B @7 M1 ^( J0 }; c- {! r; J1 R sec_limtyp : 1
5 n, I. v! h: D/ O* S5 U #Set the absolute angles for axis travel on primary% B% _) {* e2 j: P$ ]4 G2 v+ v
pri_limlo: -200( \4 N; y( D! i- D4 c6 u
pri_limhi: +200 7 Z4 g0 C# S6 y* z4 I
#Set intermediate angle, in limits, for post to reposition machine
8 d3 R$ R& \2 V9 J6 {" d, M pri_intlo: -200+ |3 \% ]. f; i, e$ G
pri_inthi: +200
% J- _# V6 l- n1 G* r& i! o #Set the absolute angles for axis travel on secondary
$ f; O6 C: L6 V6 G& z9 ] sec_limlo: -115 1 H; @9 R$ H x/ T9 K$ f7 V
sec_limhi: +90 % i9 [. J5 J8 e( I$ ^$ H
#Set intermediate angle, in limits,for post to reposition machine
9 P6 m; |8 Z% X sec_intlo: -200 , ~/ s4 i/ Z/ p F9 J8 M. O( h3 E5 F
sec_inthi: +200 + I$ e: l9 m* t& V4 f
五坐标机床后处理程序的验证可通过下面的测试进行。例如,我们根据KR214的需求进行了多种测试,如X/W轴联动、固定A轴、变A轴、旋转C轴、五轴底刃、五轴侧刃等典型的五轴加工程序测试。其测试的刀具轨迹与部分程序代码如图3~图5所示。
& ^& u' Z3 L6 Y( u& @a)五轴底刃刀具轨迹及其模拟 b)五轴侧刃刀具轨迹及其模拟 图3 五轴铣削加工功能测试示意图 |
|