|
|

楼主 |
发表于 2007-4-12 13:23:50
|
显示全部楼层
来自: 中国四川阿坝藏族羌族自治州
基于MasterCAM平台的数控编程后处理程序应用开发2
(1)圆弧输出设置
4 p8 U$ J3 b+ I/ w0 [ 用于对圆弧插补的输出进行控制,如圆心的表达(R或IJK)、圆弧打断、整圆输出等。
4 P5 i1 b- R' c) c$ D. G' d #Arc output settings' k( A" W/ A, r
breakarcs: 0 #Break arcs, 0 = no, 1 = quadrants, 2 = 180 arcs6 K& _, H. g; Q( b3 f7 d5 P
arcoutput: 0 #0 = IJK, 1 = R no sign, 2 = R signed neg. over 180. w1 B+ ^7 i5 G% `5 D$ S m
arctype : 2 #Arc center 1=abs, 2=St-Ctr, 3=Ctr-St, 4=unsigned inc.
0 i& x6 q% [1 l9 y do_full_arc : 1 #Allow full circle output? 0=no, 1=yes
6 W, |2 s4 N' o) A' I" j helix_arc: 1 #Support helix arc output, 0=no, 1=all planes, 2=XY plane only
6 S& O$ ~ [' _4 Q arccheck : 1 #Check for small arcs, convert to linear
1 _* ~4 [ a' P" Z/ t! u2 A( ~ atol : .01#Angularity tolerance for arccheck = 2) L9 I0 a* e% Y5 _" R9 A" Q9 [
(2)五轴机床构造及运动设置
* _1 F8 X* j4 C! Q( c3 R3 m 用于对典型的五轴机床运动方式进行配置,可对工作台双摆动、主轴头双摆动、主轴摆动及工作台摆动、工作台复合摆动(回转)、主轴复合摆动(回转)等典型五轴机床进行设置。主轴回转或摆动对应于相应机床,可处于主动轴或从动轴的形式。针对KR214机床的配置Mtype设为2。
! ~! J3 u3 i2 W0 u. Z$ p% [ #Machine rotary routine settings
O, P* Y, N( ? _+ F9 `) ^! x mtype : 2 #Machine type (Define base and rotation plane below) + m- }, w, r% w* Z2 {8 ~9 q
#0 = Table/Table
) G5 k w$ K X" G4 B9 l2 F B. p #1 = Tilt Head/Table
/ p$ a3 N) y# N' ?1 m; n- c& I #2 = Head/Head
/ M% ?( f* n# B) H# m2 H7 n #3 = Nutator Table/Table/ h3 x5 S' L- h* }% C B
#4 = Nutator Tilt Head/Table3 N+ [' G# H. a8 T" Y) S* B8 p2 I
#5 = Nutator Head/Head- @2 z6 {- e$ n; \; F+ G
head_is_sec : 2 #Set with mtype 1 and 4 to indicate head is on secondary
- t% H2 p& l. k' b4 q (3)旋转轴矢量平面设置# g8 v! v+ k5 W8 t4 ?
用于设置主动轴及从动旋转轴矢量方向,设置主轴或工作台复合摆动轴矢量方向。根据KR214(KR211)的C、A轴的运动配置,其C轴在XY平面内旋转,A轴在YZ平面内摆动,因而设置如下:4 w) q& _4 w) h2 n" v
#Primary planeXY XZ YZ# ]4 v0 a% L: Z0 D
#Secondary or XZ XY XY+ |* D: `! L* Z$ J& c
#Secondary YZ YZ XZ
: D( s$ N+ ~& S rotaxis1 = vecy #Zero * r) p; e" b- v( u6 v
rotdir1 = vecx #Direction
+ g8 Y9 \9 c; Q0 o9 s rotaxis2 = vecz #Zero
2 D6 w! ~# f/ u1 B3 x# U rotdir2 = vecy #Direction& H- S6 e9 y* {) [7 l X: u4 E3 _
p_nut_restore #Postblock, restores original axis settings
1 ~, Z# i [( o* Y2 @4 a4 @ result = updgbl(rotaxis1, vecy) #Zero! X* N2 t, E; m, h1 N, l4 u
result = updgbl(rotdir1, vecx) #Direction' ?9 l. h J8 r8 E( l+ z
result = updgbl(rotaxis2, vecz) #Zero6 f& ?- w+ f7 E* q6 y5 P3 d
result = updgbl(rotdir2, vecx) #Direction
8 Q* T; ~2 G, d$ j" X nut_ang_pri : -45
9 b% l2 l" q& D1 U$ c- s 对于旋转平面不在坐标平面的特殊主轴复合摆动或工作台复合摆动的五轴机床,且Mtype设置为3~5的特殊类型时,如DMU125P和DMU50P的机床需要正确设置Nut_ang_pri参数。只有当Mtype设置为3~5时,该参数才起作用。
. ~% X9 B* c! | o' v+ a6 p0 p/ B3 C# j (4)旋转轴中心、偏心设置及刀具轴输出设置
) o" R4 t6 V8 K) R+ L$ M6 P) W 根据KR214(或KR211)机床运动轴配置特点,其g7_tilt参数应设为2。# Z z5 z! v6 I* a: m F
saxisx: 0 #The axis offset direction?& O3 u. s; L" m. h+ k) x
saxisy: 0 #The axis offset direction?
) T2 i* X) E8 W saxisz: 0 #The axis offset direction?3 X0 K$ @- p+ v B/ P+ T7 x
r_intersect : 1 #Rotary axis intersect on their center of ratations
; b% A% h5 g4 ~# O! U g7_tilt : 2 #With mill_plus and nutating, select toolplane output
# F6 g: z2 L2 f1 G8 l #0 = Post selects G7 rotation axis
7 b) D! N7 o/ }) K5 ~ #1 to 4, user selected G7 rotation axis
9 a$ {8 M6 O% q( v7 e/ z #1 = Primary C : X zero, Secondary B9 v3 ]4 t& u. q- M# |. ^6 J/ m
#2 = Primary C : Y zero, Secondary A0 s# I) H- v/ j/ W
#3 = Primary C : -X zero, Secondary B
: A5 z0 J1 }+ _, p& Y #4 = Primary C : -Y zero, Secondary A1 y/ R( c/ c- _$ z
shift_90_s : 1 #Shift pos.=1, neg.=-1: Z6 N( o( ^5 m1 h
(5)机床行程及转角限位设置. [; Y9 x9 B$ e) r# S( z# @
坐标运动轴的行程及软件限位设置的正确性,直接影响五轴机床数控程序输出的正确性,下述分别为KR214的各坐标轴的行程及A/C轴的转角行程设置。
( `4 q/ L8 a7 x6 j' {5 v2 H5 d 1)X、Y、Z线性轴行程设置) l& e! L. B& @0 D8 d3 b
adj2sec : 1
- f: ~% V, G; W) B" z use_stck_typ : 2 #0=Off, 1=Stock def., 2=Limits
, E9 o$ k2 C l. D9 Y3 |8 ? up_x_lin_lim : 1350#X axis limit in positive direction
% Z; B5 `6 D5 r0 u+ k) u up_y_lin_lim : 900#Y axis limit in positive direction( Q6 H" Y \+ r4 B
up_z_lin_lim : 1400#Z axis limit in positive direction) v* h! A! P4 O- ?( {
lw_x_lin_lim : -1350 #X axis limit in negative direction
$ M' H7 Q% T! ]( q lw_y_lin_lim : -200 #Y axis limit in negative direction% i+ y; C9 T' t8 i. ~
lw_z_lin_lim : 200#Z axis limit in negative direction; k" S9 u5 y }2 P, u
2)主动轴C和从动轴A的转角设置 V2 G$ u5 ^+ V1 X; F; u
auto_set_lim : 1 #Set the type from the angle limit settings (ignore these)
* o9 ?* T4 h* K5 z pri_limtyp : 18 Z( ]( {5 d1 E6 V y
sec_limtyp : 1: @ C. t8 B: O# E5 j
#Set the absolute angles for axis travel on primary
- F) b' j6 D6 U& J9 n! }+ s pri_limlo: -200
* M7 E$ T" [5 \ pri_limhi: +200
1 A8 ]- f' y% Q3 i! t( o3 i #Set intermediate angle, in limits, for post to reposition machine
4 H2 i( U% D& D5 [8 |5 X; i3 S. E pri_intlo: -200
( C- P1 `# i; x' h$ C; s' c, Z/ p- n. ^ pri_inthi: +200 5 s+ O" r. s! @ I+ i4 ~
#Set the absolute angles for axis travel on secondary
: m/ Q% Z. X/ `: i sec_limlo: -115
8 ~) M. G" z. r6 L5 h/ b sec_limhi: +90
3 P& G2 H) V# J #Set intermediate angle, in limits,for post to reposition machine* q$ c2 V+ I! J( `
sec_intlo: -200 8 W: j% `" q. V' l0 [
sec_inthi: +200 4 v/ y" | w, j+ H8 B& @- b9 I
五坐标机床后处理程序的验证可通过下面的测试进行。例如,我们根据KR214的需求进行了多种测试,如X/W轴联动、固定A轴、变A轴、旋转C轴、五轴底刃、五轴侧刃等典型的五轴加工程序测试。其测试的刀具轨迹与部分程序代码如图3~图5所示。
( z, i' H$ t9 m3 S. g9 qa)五轴底刃刀具轨迹及其模拟 b)五轴侧刃刀具轨迹及其模拟 图3 五轴铣削加工功能测试示意图 |
|