|

楼主 |
发表于 2007-4-12 13:23:50
|
显示全部楼层
来自: 中国四川阿坝藏族羌族自治州
基于MasterCAM平台的数控编程后处理程序应用开发2
(1)圆弧输出设置) S& Q" C+ q. g1 T8 a: O" w" `
用于对圆弧插补的输出进行控制,如圆心的表达(R或IJK)、圆弧打断、整圆输出等。
8 m/ N0 Y4 T5 z #Arc output settings
2 u; @- n( C7 ]7 N5 ?* F breakarcs: 0 #Break arcs, 0 = no, 1 = quadrants, 2 = 180 arcs
$ t$ D/ i# o8 {$ u3 q" j arcoutput: 0 #0 = IJK, 1 = R no sign, 2 = R signed neg. over 180+ |% i2 y) V& P
arctype : 2 #Arc center 1=abs, 2=St-Ctr, 3=Ctr-St, 4=unsigned inc.
. Q: G- X6 ]& U5 ^& M" l do_full_arc : 1 #Allow full circle output? 0=no, 1=yes( Y1 S0 G- ~. _5 _, x3 c' s
helix_arc: 1 #Support helix arc output, 0=no, 1=all planes, 2=XY plane only* S5 \4 B3 {9 `8 |/ f
arccheck : 1 #Check for small arcs, convert to linear
# ?6 ?3 l& u) l8 Y6 M. R atol : .01#Angularity tolerance for arccheck = 21 m( \! b' |! n+ n
(2)五轴机床构造及运动设置
* x: R" u0 Z+ U$ J( F 用于对典型的五轴机床运动方式进行配置,可对工作台双摆动、主轴头双摆动、主轴摆动及工作台摆动、工作台复合摆动(回转)、主轴复合摆动(回转)等典型五轴机床进行设置。主轴回转或摆动对应于相应机床,可处于主动轴或从动轴的形式。针对KR214机床的配置Mtype设为2。2 x1 R |$ `, ^+ N/ e2 V! |
#Machine rotary routine settings7 K# r: B/ z5 e- R6 a3 t
mtype : 2 #Machine type (Define base and rotation plane below)
# [5 P1 w5 P3 O H #0 = Table/Table
3 v/ x" T# R' H #1 = Tilt Head/Table
( |/ E0 B& l( N4 X% a/ ` #2 = Head/Head% b# I6 ?* F0 t. R* P$ k6 k4 C
#3 = Nutator Table/Table( W# f8 K4 t, {) c! y: j, \
#4 = Nutator Tilt Head/Table* K5 I/ D9 Z& g
#5 = Nutator Head/Head- j* w, m% J5 b3 p; z5 G5 h
head_is_sec : 2 #Set with mtype 1 and 4 to indicate head is on secondary
_# A5 d/ n2 s/ v% } (3)旋转轴矢量平面设置7 G4 L3 M% P7 }, N
用于设置主动轴及从动旋转轴矢量方向,设置主轴或工作台复合摆动轴矢量方向。根据KR214(KR211)的C、A轴的运动配置,其C轴在XY平面内旋转,A轴在YZ平面内摆动,因而设置如下:7 H+ o2 ^% d1 R+ E6 I4 [! i0 d0 o' F
#Primary planeXY XZ YZ
9 Q& L4 E/ P' E) }* e #Secondary or XZ XY XY
, z/ I% P. e! F7 j; S+ r) j #Secondary YZ YZ XZ% f: f! ~" e3 a L5 l
rotaxis1 = vecy #Zero / d1 b2 z! A G$ ?
rotdir1 = vecx #Direction ) W0 C, g2 r J- n
rotaxis2 = vecz #Zero 7 T9 t8 {2 \: s3 b
rotdir2 = vecy #Direction
, P8 {2 ]6 {( X. E& H- d" L& L O p_nut_restore #Postblock, restores original axis settings
( A' ?/ Z e, B! R, V result = updgbl(rotaxis1, vecy) #Zero
0 h8 g- R# h8 R m result = updgbl(rotdir1, vecx) #Direction. ~( o* _4 ?! f
result = updgbl(rotaxis2, vecz) #Zero. c: \- L, k* i3 r" D$ b. h5 n$ I2 U
result = updgbl(rotdir2, vecx) #Direction & E7 n# ^" G! E6 j( R, k
nut_ang_pri : -45/ d% u3 r" ^) C' Z7 `
对于旋转平面不在坐标平面的特殊主轴复合摆动或工作台复合摆动的五轴机床,且Mtype设置为3~5的特殊类型时,如DMU125P和DMU50P的机床需要正确设置Nut_ang_pri参数。只有当Mtype设置为3~5时,该参数才起作用。
9 H$ I% P5 S* h4 `2 S9 | (4)旋转轴中心、偏心设置及刀具轴输出设置" e# [. n: l8 {. N2 [/ _
根据KR214(或KR211)机床运动轴配置特点,其g7_tilt参数应设为2。
) u* X7 ^% ?; c0 m) c saxisx: 0 #The axis offset direction?1 |7 S. O) e8 | x1 E N
saxisy: 0 #The axis offset direction?* `# {* i# @' q; |" U
saxisz: 0 #The axis offset direction?+ O( ^9 a6 i/ D, t- M. u/ J/ q6 E
r_intersect : 1 #Rotary axis intersect on their center of ratations
, U! Y* C, w( O g7_tilt : 2 #With mill_plus and nutating, select toolplane output
2 R2 G7 S& }' _8 [; C #0 = Post selects G7 rotation axis
. \; T& E6 S/ r+ I: d #1 to 4, user selected G7 rotation axis , N8 [* z- x+ a: f4 g7 o: {
#1 = Primary C : X zero, Secondary B
% n8 p' u! b$ [$ u( i #2 = Primary C : Y zero, Secondary A
, e3 I! W& R8 i( n) G" z #3 = Primary C : -X zero, Secondary B
1 b3 o5 M/ s8 F3 H3 ^+ V #4 = Primary C : -Y zero, Secondary A
8 y* i8 e3 m! N# c" H shift_90_s : 1 #Shift pos.=1, neg.=-1. K# t' d3 K1 i; g
(5)机床行程及转角限位设置
+ ~0 v$ Q$ }. J( n, e! x7 u: b 坐标运动轴的行程及软件限位设置的正确性,直接影响五轴机床数控程序输出的正确性,下述分别为KR214的各坐标轴的行程及A/C轴的转角行程设置。
' T& V) c! k7 b# e! A( r 1)X、Y、Z线性轴行程设置* ~5 Z. O9 C# c( l, `, ~7 S
adj2sec : 1 / M$ K+ F7 e8 F* @0 g) }
use_stck_typ : 2 #0=Off, 1=Stock def., 2=Limits" j3 b" e5 h6 J1 X' b f# ?
up_x_lin_lim : 1350#X axis limit in positive direction2 F7 G$ p. F* x# D+ [% k( }$ U% q
up_y_lin_lim : 900#Y axis limit in positive direction8 {8 e A: F% y- `2 {% r. R) ^; o) s7 }
up_z_lin_lim : 1400#Z axis limit in positive direction
^1 j% ]" i1 B* f- U, @/ R+ o lw_x_lin_lim : -1350 #X axis limit in negative direction4 s" k1 K, P" `) u
lw_y_lin_lim : -200 #Y axis limit in negative direction/ j7 G# I- _6 n# v& L) x9 ?" [
lw_z_lin_lim : 200#Z axis limit in negative direction
* L3 g) i7 u# K1 y. P5 K 2)主动轴C和从动轴A的转角设置
# V, E8 L4 Q- ^/ l Y* [3 \9 j auto_set_lim : 1 #Set the type from the angle limit settings (ignore these)
5 p/ t# g4 ?8 F3 T. h pri_limtyp : 16 }9 m9 }+ t/ X ^# ^. m: a
sec_limtyp : 13 x0 U% p& p3 V: n7 a0 u* H5 G* l9 _
#Set the absolute angles for axis travel on primary
2 H7 g& \2 W: n pri_limlo: -200
) `/ {# h! p+ l pri_limhi: +200
7 H! Z! [$ u- q3 V #Set intermediate angle, in limits, for post to reposition machine
" m& u) t9 f; W8 B7 i; g pri_intlo: -200
, Q% o' F3 }# I# h% s9 c: K pri_inthi: +200
: k0 I7 G" ^& q% L, o- s6 o #Set the absolute angles for axis travel on secondary" ?3 |' l i, Z6 S! v" g# ~6 r+ R
sec_limlo: -115 ; y& L# Y6 A/ s, ^" _( y* A9 A* d1 r4 d. q
sec_limhi: +90
+ g9 s1 i% U# F! q #Set intermediate angle, in limits,for post to reposition machine
: g) A3 @! T/ V9 q# O sec_intlo: -200
' ]7 c7 B# u u( z9 C sec_inthi: +200 9 h# s, J) C& O0 ^
五坐标机床后处理程序的验证可通过下面的测试进行。例如,我们根据KR214的需求进行了多种测试,如X/W轴联动、固定A轴、变A轴、旋转C轴、五轴底刃、五轴侧刃等典型的五轴加工程序测试。其测试的刀具轨迹与部分程序代码如图3~图5所示。5 e9 N0 _! [& l9 Z0 h0 p
a)五轴底刃刀具轨迹及其模拟 b)五轴侧刃刀具轨迹及其模拟 图3 五轴铣削加工功能测试示意图 |
|