|
|

楼主 |
发表于 2007-4-12 13:23:50
|
显示全部楼层
来自: 中国四川阿坝藏族羌族自治州
基于MasterCAM平台的数控编程后处理程序应用开发2
(1)圆弧输出设置+ B- C$ ?$ V4 p q
用于对圆弧插补的输出进行控制,如圆心的表达(R或IJK)、圆弧打断、整圆输出等。( k% ]0 q# i: `( M/ o' R% A
#Arc output settings ?1 j" e5 ~ Y7 v" Y
breakarcs: 0 #Break arcs, 0 = no, 1 = quadrants, 2 = 180 arcs
! q* b- J Q% O/ z arcoutput: 0 #0 = IJK, 1 = R no sign, 2 = R signed neg. over 180
( O& ^* b+ I' F# A8 s arctype : 2 #Arc center 1=abs, 2=St-Ctr, 3=Ctr-St, 4=unsigned inc.
1 L- V% m9 _' n) I do_full_arc : 1 #Allow full circle output? 0=no, 1=yes- F5 Q% M4 I0 G0 M# @2 ?
helix_arc: 1 #Support helix arc output, 0=no, 1=all planes, 2=XY plane only
- l1 C$ k4 G' _7 c! Z2 N0 y arccheck : 1 #Check for small arcs, convert to linear
# Y* o% Q' w. C8 Q# Q( W atol : .01#Angularity tolerance for arccheck = 2" }" S* g7 B3 V
(2)五轴机床构造及运动设置
5 y8 e' E, i" o2 B 用于对典型的五轴机床运动方式进行配置,可对工作台双摆动、主轴头双摆动、主轴摆动及工作台摆动、工作台复合摆动(回转)、主轴复合摆动(回转)等典型五轴机床进行设置。主轴回转或摆动对应于相应机床,可处于主动轴或从动轴的形式。针对KR214机床的配置Mtype设为2。
& M0 K. d$ J- a9 T" I I #Machine rotary routine settings; U5 `+ D z) E' T7 _4 U+ V% t# P
mtype : 2 #Machine type (Define base and rotation plane below)
0 j# f: Y+ d5 V- r #0 = Table/Table
) j5 G1 m4 g1 ]/ ]/ P' d8 s$ N( u: e #1 = Tilt Head/Table; G* i% {1 E) i5 F
#2 = Head/Head
" f5 H& S8 i5 \: u2 H #3 = Nutator Table/Table6 O2 a# z R' o- ^; [, t9 A
#4 = Nutator Tilt Head/Table
, ` p6 {: M( { #5 = Nutator Head/Head
0 i0 P$ u m9 l+ \( ^5 k head_is_sec : 2 #Set with mtype 1 and 4 to indicate head is on secondary" j; g% h8 v! E- P' R
(3)旋转轴矢量平面设置
G/ m$ I! m. r5 R% r: |( c# |/ K 用于设置主动轴及从动旋转轴矢量方向,设置主轴或工作台复合摆动轴矢量方向。根据KR214(KR211)的C、A轴的运动配置,其C轴在XY平面内旋转,A轴在YZ平面内摆动,因而设置如下:
$ t: T9 e4 d1 U9 h* J1 z #Primary planeXY XZ YZ
) I- ]" w6 D% }( r3 F f #Secondary or XZ XY XY
- F! J% f4 H6 t& j; I0 d #Secondary YZ YZ XZ a* l$ F2 O- z( `- c
rotaxis1 = vecy #Zero 0 m8 c& ~4 Z1 ~9 a, O! E
rotdir1 = vecx #Direction . s) {- T* G7 T- R* |1 J
rotaxis2 = vecz #Zero * P: c% L& N- ~" M# P! f2 [
rotdir2 = vecy #Direction
h$ [) K, W0 h! [. J4 e' }$ t* c p_nut_restore #Postblock, restores original axis settings
& n/ _& \: X- u/ V; ?8 K: G4 l result = updgbl(rotaxis1, vecy) #Zero
$ V& ^* ^! C$ G. s result = updgbl(rotdir1, vecx) #Direction
+ O0 _4 [4 A. | result = updgbl(rotaxis2, vecz) #Zero
# |, k( w' G6 d7 T1 f result = updgbl(rotdir2, vecx) #Direction
7 h9 m' U+ z8 n* p nut_ang_pri : -45. ^( \8 f2 ^2 n
对于旋转平面不在坐标平面的特殊主轴复合摆动或工作台复合摆动的五轴机床,且Mtype设置为3~5的特殊类型时,如DMU125P和DMU50P的机床需要正确设置Nut_ang_pri参数。只有当Mtype设置为3~5时,该参数才起作用。' B* X3 s5 R% V$ c( ^+ u
(4)旋转轴中心、偏心设置及刀具轴输出设置
! a; b$ j8 a0 H, M' V+ C3 X3 P4 A 根据KR214(或KR211)机床运动轴配置特点,其g7_tilt参数应设为2。
" |8 [. l' ~1 w- h, v5 \ saxisx: 0 #The axis offset direction?
6 ^ v- a- ]6 x saxisy: 0 #The axis offset direction?/ S( G) _. H$ N! u9 a. g
saxisz: 0 #The axis offset direction?
- Y6 O! r6 `; Q# X r_intersect : 1 #Rotary axis intersect on their center of ratations( n5 E) |. _) @) j+ i
g7_tilt : 2 #With mill_plus and nutating, select toolplane output
2 B# d! y0 T3 P& C; R1 ` #0 = Post selects G7 rotation axis
+ d4 A% y% P1 D3 @+ u/ ] #1 to 4, user selected G7 rotation axis ' V9 j5 v& c4 [8 l/ m
#1 = Primary C : X zero, Secondary B. Z9 R9 `+ ^# k5 k4 a
#2 = Primary C : Y zero, Secondary A' O9 J4 s" A W3 k( N& e% n
#3 = Primary C : -X zero, Secondary B4 E. K( B: B( R* {
#4 = Primary C : -Y zero, Secondary A" h$ Y5 O A# L7 ]0 P3 L
shift_90_s : 1 #Shift pos.=1, neg.=-10 u& p1 k$ w& t
(5)机床行程及转角限位设置- _9 ?% B1 G- M: _$ u) q I
坐标运动轴的行程及软件限位设置的正确性,直接影响五轴机床数控程序输出的正确性,下述分别为KR214的各坐标轴的行程及A/C轴的转角行程设置。! b5 {; q# E6 J
1)X、Y、Z线性轴行程设置/ b) Q! b4 b2 Q6 ?8 g! a6 ?- I
adj2sec : 1
' o& l; z6 C& v0 [1 k" { use_stck_typ : 2 #0=Off, 1=Stock def., 2=Limits
" {$ t! t0 G& U1 k* }2 z% v up_x_lin_lim : 1350#X axis limit in positive direction
4 c2 w. J) |. r1 m up_y_lin_lim : 900#Y axis limit in positive direction
% r) d6 j4 W* l( G; Z; G: f4 V up_z_lin_lim : 1400#Z axis limit in positive direction
# k: N- m/ T: J* n5 t6 Y lw_x_lin_lim : -1350 #X axis limit in negative direction
0 `' |9 [% y0 U7 { lw_y_lin_lim : -200 #Y axis limit in negative direction* q) e D4 I* D0 i7 E
lw_z_lin_lim : 200#Z axis limit in negative direction3 ]( D+ Y3 |8 t+ J6 x! N G" L' w! [
2)主动轴C和从动轴A的转角设置
/ x9 w, j! w$ n) ~) s2 B auto_set_lim : 1 #Set the type from the angle limit settings (ignore these)& B- Q7 A a! }7 I% {
pri_limtyp : 1/ a6 O8 M l5 W/ X @
sec_limtyp : 1% d( t) Q7 h- a7 E
#Set the absolute angles for axis travel on primary
# R9 A3 N# N+ C& n pri_limlo: -200
4 v! O2 i( P( l5 _ m7 A pri_limhi: +200
/ Z$ k" P% L, Z #Set intermediate angle, in limits, for post to reposition machine( Z+ N/ X8 _2 ~ g' o
pri_intlo: -200
. v8 \4 i8 K5 a+ R; n pri_inthi: +200 # W! Y% E1 P& l9 e4 l
#Set the absolute angles for axis travel on secondary3 M* f4 ^" q, J X8 w1 |2 R3 l! G
sec_limlo: -115 / }' F' E) z L5 e- L
sec_limhi: +90
% j; X3 M% r4 ?- l/ u #Set intermediate angle, in limits,for post to reposition machine
* d3 C% O5 |1 m8 a sec_intlo: -200
' a5 v8 [% b) C7 E) p sec_inthi: +200 % s A, U; E" M9 H" y5 y
五坐标机床后处理程序的验证可通过下面的测试进行。例如,我们根据KR214的需求进行了多种测试,如X/W轴联动、固定A轴、变A轴、旋转C轴、五轴底刃、五轴侧刃等典型的五轴加工程序测试。其测试的刀具轨迹与部分程序代码如图3~图5所示。
8 v' l. M3 g* t1 s9 Za)五轴底刃刀具轨迹及其模拟 b)五轴侧刃刀具轨迹及其模拟 图3 五轴铣削加工功能测试示意图 |
|