|
|

楼主 |
发表于 2007-4-12 13:23:50
|
显示全部楼层
来自: 中国四川阿坝藏族羌族自治州
基于MasterCAM平台的数控编程后处理程序应用开发2
(1)圆弧输出设置
/ A7 v! k! ~1 k% s5 W1 p: n 用于对圆弧插补的输出进行控制,如圆心的表达(R或IJK)、圆弧打断、整圆输出等。
3 F, g3 ~7 |& J #Arc output settings; |6 u% o$ x. z
breakarcs: 0 #Break arcs, 0 = no, 1 = quadrants, 2 = 180 arcs7 F* u! u1 _; n
arcoutput: 0 #0 = IJK, 1 = R no sign, 2 = R signed neg. over 180$ E6 U# E* i+ a( s
arctype : 2 #Arc center 1=abs, 2=St-Ctr, 3=Ctr-St, 4=unsigned inc./ b$ P, G- Z8 F: }
do_full_arc : 1 #Allow full circle output? 0=no, 1=yes
" k. f7 _$ x4 {3 {+ d0 B& t- X$ f9 \ helix_arc: 1 #Support helix arc output, 0=no, 1=all planes, 2=XY plane only7 ]' k0 v" q! K% h& \8 Y
arccheck : 1 #Check for small arcs, convert to linear0 j- f: p4 V1 C) O- Q
atol : .01#Angularity tolerance for arccheck = 2
' v$ ?! d5 S& o (2)五轴机床构造及运动设置
/ z# O# X) Q T2 Q* I 用于对典型的五轴机床运动方式进行配置,可对工作台双摆动、主轴头双摆动、主轴摆动及工作台摆动、工作台复合摆动(回转)、主轴复合摆动(回转)等典型五轴机床进行设置。主轴回转或摆动对应于相应机床,可处于主动轴或从动轴的形式。针对KR214机床的配置Mtype设为2。
& I0 N) ]$ l v w: _% j7 _) A1 }" h #Machine rotary routine settings
2 `! O- O6 P3 W( j- u mtype : 2 #Machine type (Define base and rotation plane below)
7 R8 [# P* I& E6 w3 Q4 c; Q+ q% A #0 = Table/Table8 ]9 r! V! w! K6 D8 h6 s
#1 = Tilt Head/Table6 P" T4 o* o, A4 Z2 k- N" Y
#2 = Head/Head
. |6 _( m( W$ q/ k" _ #3 = Nutator Table/Table
5 I0 l8 K: X* J! ~1 ? #4 = Nutator Tilt Head/Table
A" T' L4 P/ E9 V #5 = Nutator Head/Head5 I7 Y8 n$ ^% t7 v# J+ A- k
head_is_sec : 2 #Set with mtype 1 and 4 to indicate head is on secondary: x9 F- Z3 Z; f: O
(3)旋转轴矢量平面设置
8 W+ G7 g& f3 p7 L1 K" |) v% w5 w 用于设置主动轴及从动旋转轴矢量方向,设置主轴或工作台复合摆动轴矢量方向。根据KR214(KR211)的C、A轴的运动配置,其C轴在XY平面内旋转,A轴在YZ平面内摆动,因而设置如下:7 R. l2 C: e2 S# j
#Primary planeXY XZ YZ7 `' c) U$ e9 J I+ L
#Secondary or XZ XY XY
" J# f3 I! B+ F: ^' F #Secondary YZ YZ XZ
2 X" E e6 C4 y2 Y/ R rotaxis1 = vecy #Zero 9 ^3 \) x ?4 m
rotdir1 = vecx #Direction # p% I% s K$ s* H
rotaxis2 = vecz #Zero / Z8 M8 |" x" ^7 ]/ q
rotdir2 = vecy #Direction7 T1 W( b, n6 U4 q
p_nut_restore #Postblock, restores original axis settings
6 O, I% |( k# U5 t5 ? result = updgbl(rotaxis1, vecy) #Zero/ u- h2 Y) [1 K5 D
result = updgbl(rotdir1, vecx) #Direction
Q, S+ B! M- V result = updgbl(rotaxis2, vecz) #Zero
' S Z* {( i1 L result = updgbl(rotdir2, vecx) #Direction
. t" N& l- M* ^2 s& C1 w nut_ang_pri : -45
! I1 _0 d* M1 [ 对于旋转平面不在坐标平面的特殊主轴复合摆动或工作台复合摆动的五轴机床,且Mtype设置为3~5的特殊类型时,如DMU125P和DMU50P的机床需要正确设置Nut_ang_pri参数。只有当Mtype设置为3~5时,该参数才起作用。
' }# k! V& r; o9 j3 E Y (4)旋转轴中心、偏心设置及刀具轴输出设置
[ o8 _; K( j6 Q' D: r/ P 根据KR214(或KR211)机床运动轴配置特点,其g7_tilt参数应设为2。# r0 e9 O t% K' P$ p# A
saxisx: 0 #The axis offset direction?3 P J, B" M! r! ]5 y5 y a" U/ c
saxisy: 0 #The axis offset direction?
- @# ]* N, ~0 ?( b6 ^( H, u saxisz: 0 #The axis offset direction?
" A a4 I7 {, b) ]: ^ r_intersect : 1 #Rotary axis intersect on their center of ratations' w6 P/ h' a( Y' l% F6 T
g7_tilt : 2 #With mill_plus and nutating, select toolplane output
t2 N+ r8 J5 ?% g #0 = Post selects G7 rotation axis) o( L/ H( G/ h5 E5 V! _
#1 to 4, user selected G7 rotation axis ' u" S& h' b. b2 Z7 L( p
#1 = Primary C : X zero, Secondary B
1 ?5 X: V: B$ f! C; I$ j2 [ #2 = Primary C : Y zero, Secondary A0 k1 H' [" q7 G+ T" |9 D
#3 = Primary C : -X zero, Secondary B1 U. L6 ?; o: D- l
#4 = Primary C : -Y zero, Secondary A
6 s7 Z. j* S, z3 c. l0 E8 ~ shift_90_s : 1 #Shift pos.=1, neg.=-1& d5 r, ^7 N! ?
(5)机床行程及转角限位设置
' g3 o$ f- f/ s* X0 G 坐标运动轴的行程及软件限位设置的正确性,直接影响五轴机床数控程序输出的正确性,下述分别为KR214的各坐标轴的行程及A/C轴的转角行程设置。$ s, N7 }( }6 H* ^: f8 R0 r
1)X、Y、Z线性轴行程设置
, k# Q5 x; c# O6 E adj2sec : 1
, ] v3 \( B/ D7 w# q8 H9 Z use_stck_typ : 2 #0=Off, 1=Stock def., 2=Limits
9 b& U& y) [" l up_x_lin_lim : 1350#X axis limit in positive direction# B& }+ e3 m2 A- N
up_y_lin_lim : 900#Y axis limit in positive direction
% C7 o, E5 Q, e up_z_lin_lim : 1400#Z axis limit in positive direction
9 I- F- }+ H9 V# @ lw_x_lin_lim : -1350 #X axis limit in negative direction
$ p8 M; I/ Q0 K# r2 ? lw_y_lin_lim : -200 #Y axis limit in negative direction
4 j/ g# d: L7 B& s lw_z_lin_lim : 200#Z axis limit in negative direction8 e' x) q, M& O! F7 \/ D
2)主动轴C和从动轴A的转角设置8 s2 x: S7 B' B5 `" n5 Q1 D; T" R
auto_set_lim : 1 #Set the type from the angle limit settings (ignore these)
: j: i# z. l; X1 }) _; m% S: ^ I pri_limtyp : 1
/ x6 w, ~2 |# k- n2 w sec_limtyp : 1& j! Q! A' M/ j; [# ^& C
#Set the absolute angles for axis travel on primary7 n+ H/ ?4 \8 n" a6 e; n
pri_limlo: -200- n8 _% q0 Q3 E7 Y
pri_limhi: +200 8 n1 x" o4 Y+ _
#Set intermediate angle, in limits, for post to reposition machine
+ j. [ {& J. _- V* S: @ B pri_intlo: -200- T9 y( Z/ w' W1 P
pri_inthi: +200
: w" _6 e6 R$ \4 S. u #Set the absolute angles for axis travel on secondary
; p" \2 B, z3 A; [: t% ^; g sec_limlo: -115 & w/ P( T- S7 F; {, |
sec_limhi: +90 5 r4 n! }1 k9 @2 o' y: c# u( A$ T
#Set intermediate angle, in limits,for post to reposition machine
# |/ c/ T+ Q2 H, s& Z6 E sec_intlo: -200 3 X1 d: w: X% U3 C+ K, x! v7 C, Q
sec_inthi: +200 . s1 [" s" R4 u9 I* S
五坐标机床后处理程序的验证可通过下面的测试进行。例如,我们根据KR214的需求进行了多种测试,如X/W轴联动、固定A轴、变A轴、旋转C轴、五轴底刃、五轴侧刃等典型的五轴加工程序测试。其测试的刀具轨迹与部分程序代码如图3~图5所示。0 W" {! M8 L* Q" x5 z5 g! W
a)五轴底刃刀具轨迹及其模拟 b)五轴侧刃刀具轨迹及其模拟 图3 五轴铣削加工功能测试示意图 |
|