|
|

楼主 |
发表于 2007-4-12 13:23:50
|
显示全部楼层
来自: 中国四川阿坝藏族羌族自治州
基于MasterCAM平台的数控编程后处理程序应用开发2
(1)圆弧输出设置
' \$ G; ?" J# }) _ 用于对圆弧插补的输出进行控制,如圆心的表达(R或IJK)、圆弧打断、整圆输出等。5 o8 I+ \$ T6 I1 `( S0 E( y
#Arc output settings
$ V8 D" r# h" C$ @) |# _ breakarcs: 0 #Break arcs, 0 = no, 1 = quadrants, 2 = 180 arcs1 r/ Q( l i8 @$ Z3 P6 [
arcoutput: 0 #0 = IJK, 1 = R no sign, 2 = R signed neg. over 180
; u8 J. ~, v1 Z0 N! w% H+ I arctype : 2 #Arc center 1=abs, 2=St-Ctr, 3=Ctr-St, 4=unsigned inc.
# U4 O% H0 U& g+ M do_full_arc : 1 #Allow full circle output? 0=no, 1=yes- y" C" f4 d% S; K
helix_arc: 1 #Support helix arc output, 0=no, 1=all planes, 2=XY plane only( n p" W/ t& Q: g/ {6 R! R
arccheck : 1 #Check for small arcs, convert to linear
& O# A3 L" U9 R w) E9 K atol : .01#Angularity tolerance for arccheck = 2
6 d$ [+ j5 a0 `% x: w0 X, w& d (2)五轴机床构造及运动设置4 O' q! u* |; h
用于对典型的五轴机床运动方式进行配置,可对工作台双摆动、主轴头双摆动、主轴摆动及工作台摆动、工作台复合摆动(回转)、主轴复合摆动(回转)等典型五轴机床进行设置。主轴回转或摆动对应于相应机床,可处于主动轴或从动轴的形式。针对KR214机床的配置Mtype设为2。
d, O( \- s$ @" G #Machine rotary routine settings- A$ w+ P6 i) c+ [- P6 w% U
mtype : 2 #Machine type (Define base and rotation plane below) 5 N7 x8 M1 c z/ j4 L1 a
#0 = Table/Table
: B, q* t) s6 o4 Q2 u* j6 p' k #1 = Tilt Head/Table
) @; W0 n9 P8 c \. }" [2 _ #2 = Head/Head- s# `& W- A& }0 h3 ^$ ]
#3 = Nutator Table/Table
/ Y$ Y R+ T' Y* O3 ?1 c4 ?% I #4 = Nutator Tilt Head/Table
" v3 N( U6 N+ F# Y! h$ C #5 = Nutator Head/Head! i" r2 @1 u* I V+ x* y+ b% v
head_is_sec : 2 #Set with mtype 1 and 4 to indicate head is on secondary
6 q8 H }6 r! t; |8 _ J (3)旋转轴矢量平面设置
) J5 S+ d% F3 h& r0 S- F2 d. _ 用于设置主动轴及从动旋转轴矢量方向,设置主轴或工作台复合摆动轴矢量方向。根据KR214(KR211)的C、A轴的运动配置,其C轴在XY平面内旋转,A轴在YZ平面内摆动,因而设置如下:: g+ b# T- t6 B! U, W s, @+ _) H
#Primary planeXY XZ YZ
( x8 j+ N) |6 e+ O/ N% x9 F* S #Secondary or XZ XY XY
; S$ y! \1 b. _5 M; q" {1 ?0 S5 i& Z #Secondary YZ YZ XZ5 V1 y5 i4 Q' z( k, b- r4 K* J
rotaxis1 = vecy #Zero
9 ~& u: t6 S x: R- j* s, W/ S rotdir1 = vecx #Direction
3 v9 K8 ~+ r# G( R7 V% z rotaxis2 = vecz #Zero
8 V {; G+ H6 R rotdir2 = vecy #Direction
, K- O! ]( r8 `* U5 o" o2 u& t p_nut_restore #Postblock, restores original axis settings
% X; T* O' t0 J7 C8 V2 e result = updgbl(rotaxis1, vecy) #Zero
% v( h1 i* U5 v: B) I# G+ o result = updgbl(rotdir1, vecx) #Direction
8 B* n) Q& B3 Z. a& K* a result = updgbl(rotaxis2, vecz) #Zero
( N9 w9 s) [6 v4 \. K; V result = updgbl(rotdir2, vecx) #Direction $ y2 y- w# t5 Z5 V' K! Y
nut_ang_pri : -45
! V" p, r$ d3 K# W. c- h. D J+ Y 对于旋转平面不在坐标平面的特殊主轴复合摆动或工作台复合摆动的五轴机床,且Mtype设置为3~5的特殊类型时,如DMU125P和DMU50P的机床需要正确设置Nut_ang_pri参数。只有当Mtype设置为3~5时,该参数才起作用。" D! Y8 B# r4 Z
(4)旋转轴中心、偏心设置及刀具轴输出设置5 L! A. d) Z( X' T5 l' A
根据KR214(或KR211)机床运动轴配置特点,其g7_tilt参数应设为2。
R2 m! ] d4 ~, h C: O- Y8 ? saxisx: 0 #The axis offset direction?1 ^0 ?, V9 X t8 x4 v* h
saxisy: 0 #The axis offset direction?
0 }% H& R& w9 `$ f4 t; A8 ] saxisz: 0 #The axis offset direction?0 A2 a% J, y6 z# D
r_intersect : 1 #Rotary axis intersect on their center of ratations
# ~: y7 N/ z4 Z- F9 q7 d" T3 x. K g7_tilt : 2 #With mill_plus and nutating, select toolplane output
6 m8 w7 Q$ i# {. D: ~ #0 = Post selects G7 rotation axis1 m4 b7 j0 ?/ T+ B# G) {
#1 to 4, user selected G7 rotation axis 6 u9 t* i5 W1 U3 z) _ C3 |
#1 = Primary C : X zero, Secondary B! p" ~+ S9 y2 f
#2 = Primary C : Y zero, Secondary A7 p" W% Q# Z8 Q" Y8 Q( N8 s( [
#3 = Primary C : -X zero, Secondary B
; ~) D! L/ m& i #4 = Primary C : -Y zero, Secondary A' l# {7 v( c0 B3 J
shift_90_s : 1 #Shift pos.=1, neg.=-1
. \, W2 G# A1 G& ~/ @! f3 Q5 I (5)机床行程及转角限位设置
# G( j" |- L5 r 坐标运动轴的行程及软件限位设置的正确性,直接影响五轴机床数控程序输出的正确性,下述分别为KR214的各坐标轴的行程及A/C轴的转角行程设置。* g; ? @. s l4 h" t
1)X、Y、Z线性轴行程设置
& L( @1 j, u: _2 ^0 e4 O5 O adj2sec : 1 + c/ B# y5 s8 _; p. _
use_stck_typ : 2 #0=Off, 1=Stock def., 2=Limits. j+ `' D- \: N7 s+ y! w
up_x_lin_lim : 1350#X axis limit in positive direction
% N* j! I+ E8 S6 K up_y_lin_lim : 900#Y axis limit in positive direction$ p: J( c. ^- S2 E6 w
up_z_lin_lim : 1400#Z axis limit in positive direction
- Q- Z( D2 M3 F, F% k& l lw_x_lin_lim : -1350 #X axis limit in negative direction
: @% }8 N ^/ o0 V5 ^ lw_y_lin_lim : -200 #Y axis limit in negative direction
$ ~4 h& Y2 b( w6 f! ] lw_z_lin_lim : 200#Z axis limit in negative direction
' d6 R& Y. w) u- T 2)主动轴C和从动轴A的转角设置
; ]! ^& U4 z) I- n B auto_set_lim : 1 #Set the type from the angle limit settings (ignore these)
3 ?- D1 R# n& ~! x \ pri_limtyp : 1% O! T0 q7 A0 t3 k- }5 \1 L
sec_limtyp : 10 F( R4 F8 Y/ J
#Set the absolute angles for axis travel on primary
: y4 a4 [2 i" X: j' t% s pri_limlo: -2009 i6 N( ]. z6 i& P! e5 P, Z/ \6 |- }
pri_limhi: +200
; P2 J2 [0 z, }5 B- x- S #Set intermediate angle, in limits, for post to reposition machine7 j* m( j, N: A# @& T6 X- C
pri_intlo: -200. D1 q( U7 `' A: {
pri_inthi: +200 1 R; Q3 q" }7 g
#Set the absolute angles for axis travel on secondary
1 n8 |6 ?2 L3 Q2 C5 X sec_limlo: -115 : s9 U! ?, O% Z7 s! ` B" c
sec_limhi: +90
( @+ Y5 L. Z5 u* L* r J #Set intermediate angle, in limits,for post to reposition machine1 K7 y3 @% G! m- R2 ], }
sec_intlo: -200
8 b! x) G' M' s: y1 W8 Q# y sec_inthi: +200
' g# j* k. Q: ~, a 五坐标机床后处理程序的验证可通过下面的测试进行。例如,我们根据KR214的需求进行了多种测试,如X/W轴联动、固定A轴、变A轴、旋转C轴、五轴底刃、五轴侧刃等典型的五轴加工程序测试。其测试的刀具轨迹与部分程序代码如图3~图5所示。0 n( ?* X- S9 t* N$ ~, Z1 v# j6 }
a)五轴底刃刀具轨迹及其模拟 b)五轴侧刃刀具轨迹及其模拟 图3 五轴铣削加工功能测试示意图 |
|