|

楼主 |
发表于 2007-4-12 13:23:50
|
显示全部楼层
来自: 中国四川阿坝藏族羌族自治州
基于MasterCAM平台的数控编程后处理程序应用开发2
(1)圆弧输出设置
. q" e4 M. C+ x5 | 用于对圆弧插补的输出进行控制,如圆心的表达(R或IJK)、圆弧打断、整圆输出等。- w; f3 P0 V0 F) |1 ]- o/ Z# B
#Arc output settings
2 m8 W% O; q' K* F+ T3 {, y breakarcs: 0 #Break arcs, 0 = no, 1 = quadrants, 2 = 180 arcs# z3 p) ? m" ^3 p
arcoutput: 0 #0 = IJK, 1 = R no sign, 2 = R signed neg. over 1800 ]/ Y% P9 g2 Z" g
arctype : 2 #Arc center 1=abs, 2=St-Ctr, 3=Ctr-St, 4=unsigned inc.
2 c6 n) I/ j3 \4 g# ^# V6 {) z t i do_full_arc : 1 #Allow full circle output? 0=no, 1=yes, S% W# |$ t. l+ l
helix_arc: 1 #Support helix arc output, 0=no, 1=all planes, 2=XY plane only
( m2 V9 u9 @: E0 f% ^2 M# o arccheck : 1 #Check for small arcs, convert to linear
3 g8 g& |& L( }/ T, j atol : .01#Angularity tolerance for arccheck = 25 M$ d6 Z" e5 @: |6 L2 M
(2)五轴机床构造及运动设置
7 |' Q+ A* X/ z# a, W 用于对典型的五轴机床运动方式进行配置,可对工作台双摆动、主轴头双摆动、主轴摆动及工作台摆动、工作台复合摆动(回转)、主轴复合摆动(回转)等典型五轴机床进行设置。主轴回转或摆动对应于相应机床,可处于主动轴或从动轴的形式。针对KR214机床的配置Mtype设为2。* e! Q$ U: t# F% ~* l
#Machine rotary routine settings
- @- ] ] G$ K+ r5 \8 P" F mtype : 2 #Machine type (Define base and rotation plane below) 0 r: K# `& s- Y' X
#0 = Table/Table
3 \. n: F; H3 @* Y7 @ #1 = Tilt Head/Table
" j4 b% q5 Z1 F" I" L6 J; I #2 = Head/Head. n: B, t( @) Q! k# X
#3 = Nutator Table/Table, |5 ~: k2 `; b9 s! X* J% J
#4 = Nutator Tilt Head/Table& ~. O$ p3 t0 I6 h) }2 I/ S
#5 = Nutator Head/Head+ T+ A6 R0 Q& @7 \# W$ B$ X9 K( k0 Y
head_is_sec : 2 #Set with mtype 1 and 4 to indicate head is on secondary( W. L: M* s4 a* N8 }
(3)旋转轴矢量平面设置5 {' Q; d) |& g5 @' C: S
用于设置主动轴及从动旋转轴矢量方向,设置主轴或工作台复合摆动轴矢量方向。根据KR214(KR211)的C、A轴的运动配置,其C轴在XY平面内旋转,A轴在YZ平面内摆动,因而设置如下:
6 z3 \4 L8 H& B& N( \% t #Primary planeXY XZ YZ: D& ?# z3 k% Q" i0 p
#Secondary or XZ XY XY
) t) F( D0 ], q #Secondary YZ YZ XZ2 G* Y+ m# x" S& @( S4 H, z
rotaxis1 = vecy #Zero 8 ^+ r6 ?3 H0 m; W
rotdir1 = vecx #Direction # \% \5 V& y) r" T7 C5 S4 N2 q
rotaxis2 = vecz #Zero
+ ?: r( P1 G" B! x& G/ o: \ rotdir2 = vecy #Direction
5 [4 Q* Q+ M) ]1 z- l p_nut_restore #Postblock, restores original axis settings + ^9 N! e: E+ P# F
result = updgbl(rotaxis1, vecy) #Zero7 O+ r0 s+ K$ o0 H
result = updgbl(rotdir1, vecx) #Direction8 `2 `- |, G4 o0 t
result = updgbl(rotaxis2, vecz) #Zero6 M2 @0 V4 s7 Z/ ^6 \7 k
result = updgbl(rotdir2, vecx) #Direction
# u# }0 J8 ?1 {2 ? nut_ang_pri : -45) L+ b( N; z- d" Y/ K6 e
对于旋转平面不在坐标平面的特殊主轴复合摆动或工作台复合摆动的五轴机床,且Mtype设置为3~5的特殊类型时,如DMU125P和DMU50P的机床需要正确设置Nut_ang_pri参数。只有当Mtype设置为3~5时,该参数才起作用。9 y( V. I6 j. T$ J# }
(4)旋转轴中心、偏心设置及刀具轴输出设置$ _6 n8 T/ u; _7 V7 A7 u
根据KR214(或KR211)机床运动轴配置特点,其g7_tilt参数应设为2。0 c% ?4 _# N, X& _
saxisx: 0 #The axis offset direction?2 h* `- s, W; W; K6 c
saxisy: 0 #The axis offset direction?
: D2 y. s+ E# O' q$ s/ D$ H+ l saxisz: 0 #The axis offset direction?
7 j5 ^( A; M6 M9 @' k! D r_intersect : 1 #Rotary axis intersect on their center of ratations
8 J3 v( v ~; ~* U6 r5 @ g7_tilt : 2 #With mill_plus and nutating, select toolplane output2 H# m2 r' v; c d4 _
#0 = Post selects G7 rotation axis
# R' x' @8 ?" w2 j8 [) W #1 to 4, user selected G7 rotation axis 8 i o5 O) V, M3 k0 q+ ] ]" P7 b/ V& `
#1 = Primary C : X zero, Secondary B
' p& l7 W" W8 \: E7 Z; ~, R. B #2 = Primary C : Y zero, Secondary A
6 A' p7 Q- D; F# A5 e( L( ^ #3 = Primary C : -X zero, Secondary B) X; ^; S0 L# o' L9 C! F. u. H
#4 = Primary C : -Y zero, Secondary A
8 _# J$ ?3 l5 a! h shift_90_s : 1 #Shift pos.=1, neg.=-1
2 V7 G3 r2 Q' B3 | (5)机床行程及转角限位设置
- W1 O2 m! i' s& I8 d& D$ `" d* X. K 坐标运动轴的行程及软件限位设置的正确性,直接影响五轴机床数控程序输出的正确性,下述分别为KR214的各坐标轴的行程及A/C轴的转角行程设置。
' i x" q; |- Q 1)X、Y、Z线性轴行程设置 T; g0 b. E: l6 [1 a8 u
adj2sec : 1 ) d+ }# n' D7 k+ n2 ~) S
use_stck_typ : 2 #0=Off, 1=Stock def., 2=Limits3 M {2 K0 {1 l' P+ E% `
up_x_lin_lim : 1350#X axis limit in positive direction, _' q1 ~: s Z# `8 v! b
up_y_lin_lim : 900#Y axis limit in positive direction
. h! p' u8 c- Z, s' f' O$ O/ e+ h: X up_z_lin_lim : 1400#Z axis limit in positive direction" e# w5 z) T8 {4 ]& o4 Z
lw_x_lin_lim : -1350 #X axis limit in negative direction9 o9 a, `: z3 z7 N- T
lw_y_lin_lim : -200 #Y axis limit in negative direction% S: b! P6 d4 [( C
lw_z_lin_lim : 200#Z axis limit in negative direction6 z9 Z, v+ U, S' R; P
2)主动轴C和从动轴A的转角设置, Z+ q4 h4 F! i3 M4 a1 Z" i
auto_set_lim : 1 #Set the type from the angle limit settings (ignore these)
; B H0 V& q# w0 x U9 W3 O7 V+ C z pri_limtyp : 15 I: A. M& t: ~3 E' f s1 E. G
sec_limtyp : 1
l1 I C3 p7 z( o #Set the absolute angles for axis travel on primary( M0 R7 F( f, X& Y- H) B% \! o
pri_limlo: -200$ q2 C$ z" k! W) n; D
pri_limhi: +200
. C$ [" `' x* }% x6 E) c #Set intermediate angle, in limits, for post to reposition machine
1 E+ j# X) a; S/ J$ { pri_intlo: -200 \/ b) e/ u( ~
pri_inthi: +200 3 ~0 y% @. ?# z9 G9 E
#Set the absolute angles for axis travel on secondary
! K' ~- F: F8 Y& q2 c sec_limlo: -115
% b0 v7 Y6 v" C( ~1 n! X sec_limhi: +90 5 v5 H) a- X4 q: t( {
#Set intermediate angle, in limits,for post to reposition machine
# h1 h* J; d- L& L4 j sec_intlo: -200 2 |/ `) N' Z9 X7 A9 V y+ [% t
sec_inthi: +200 5 Z0 b) I5 d, N7 ]& s3 }2 }
五坐标机床后处理程序的验证可通过下面的测试进行。例如,我们根据KR214的需求进行了多种测试,如X/W轴联动、固定A轴、变A轴、旋转C轴、五轴底刃、五轴侧刃等典型的五轴加工程序测试。其测试的刀具轨迹与部分程序代码如图3~图5所示。
7 O- A. X. F5 N1 ~' Wa)五轴底刃刀具轨迹及其模拟 b)五轴侧刃刀具轨迹及其模拟 图3 五轴铣削加工功能测试示意图 |
|