|
|

楼主 |
发表于 2007-4-12 13:23:50
|
显示全部楼层
来自: 中国四川阿坝藏族羌族自治州
基于MasterCAM平台的数控编程后处理程序应用开发2
(1)圆弧输出设置
8 v9 \9 I, E% R8 O' f 用于对圆弧插补的输出进行控制,如圆心的表达(R或IJK)、圆弧打断、整圆输出等。
x. d4 m) i. l( W/ x #Arc output settings
$ X2 d$ o0 l! m' ^' I5 ? breakarcs: 0 #Break arcs, 0 = no, 1 = quadrants, 2 = 180 arcs
' F+ y5 _6 l/ G8 E) j# X arcoutput: 0 #0 = IJK, 1 = R no sign, 2 = R signed neg. over 180" C+ k7 a6 N" _; U
arctype : 2 #Arc center 1=abs, 2=St-Ctr, 3=Ctr-St, 4=unsigned inc.
* ?: Z2 \: g) [5 F/ I& r do_full_arc : 1 #Allow full circle output? 0=no, 1=yes- e" k/ t1 g$ |/ v6 H
helix_arc: 1 #Support helix arc output, 0=no, 1=all planes, 2=XY plane only
" ?/ x) o. Q+ S) q; Q( n, F arccheck : 1 #Check for small arcs, convert to linear
6 b# ^4 ^7 I! A6 ~6 L+ B atol : .01#Angularity tolerance for arccheck = 2+ u/ {* v" b9 K
(2)五轴机床构造及运动设置
0 I1 f5 e9 d# k. `; } 用于对典型的五轴机床运动方式进行配置,可对工作台双摆动、主轴头双摆动、主轴摆动及工作台摆动、工作台复合摆动(回转)、主轴复合摆动(回转)等典型五轴机床进行设置。主轴回转或摆动对应于相应机床,可处于主动轴或从动轴的形式。针对KR214机床的配置Mtype设为2。
% t9 k/ p4 A# J' y# `+ | #Machine rotary routine settings2 d! R: U3 q8 F$ k' {( K1 Y+ t( ]
mtype : 2 #Machine type (Define base and rotation plane below) ' m: u4 t4 c3 n# P: x' u* ~
#0 = Table/Table F, R7 [8 ^4 p# @1 k5 Q
#1 = Tilt Head/Table
2 k) i; f, l+ k3 x z #2 = Head/Head/ r6 W' \* a! v0 D
#3 = Nutator Table/Table. ?; z; s, ^6 Z3 p; ~
#4 = Nutator Tilt Head/Table, @3 G) M% R! u, u0 G, @2 M9 L; b* x
#5 = Nutator Head/Head p l6 i( B; f* p+ D8 d
head_is_sec : 2 #Set with mtype 1 and 4 to indicate head is on secondary5 J& |. X1 O7 M7 H3 |
(3)旋转轴矢量平面设置/ m5 l8 D& `' J: ?4 Z
用于设置主动轴及从动旋转轴矢量方向,设置主轴或工作台复合摆动轴矢量方向。根据KR214(KR211)的C、A轴的运动配置,其C轴在XY平面内旋转,A轴在YZ平面内摆动,因而设置如下:
$ Q% [5 P* w; t% t #Primary planeXY XZ YZ
# B$ o r* Z* d& ~! E #Secondary or XZ XY XY; ]/ R. Z" e* N, _- P9 C
#Secondary YZ YZ XZ4 r$ ], S1 ~9 X1 y9 x, ]
rotaxis1 = vecy #Zero - _. O2 l$ f) I0 Z1 N
rotdir1 = vecx #Direction 0 |. k3 B$ k2 R, m% P
rotaxis2 = vecz #Zero
* v4 ^- Y" n; H7 f rotdir2 = vecy #Direction+ n* u$ ^, x9 T" n0 r
p_nut_restore #Postblock, restores original axis settings
# [+ n1 B5 {" u7 Q, ~- r# ` result = updgbl(rotaxis1, vecy) #Zero
7 x* z' s" `; e ^, _ N: j result = updgbl(rotdir1, vecx) #Direction1 f3 e% \! {$ B( e7 X$ f1 R# w' p. O
result = updgbl(rotaxis2, vecz) #Zero: L# B8 v) j" g; y3 e* C C
result = updgbl(rotdir2, vecx) #Direction & j3 D1 z. b+ b1 b9 F4 ]* h
nut_ang_pri : -45
, Y( u, S& Z2 u8 A! E 对于旋转平面不在坐标平面的特殊主轴复合摆动或工作台复合摆动的五轴机床,且Mtype设置为3~5的特殊类型时,如DMU125P和DMU50P的机床需要正确设置Nut_ang_pri参数。只有当Mtype设置为3~5时,该参数才起作用。
& }6 c( L' S8 k2 a: ? (4)旋转轴中心、偏心设置及刀具轴输出设置; Z, d3 O- \2 V6 I5 X4 _8 I
根据KR214(或KR211)机床运动轴配置特点,其g7_tilt参数应设为2。
3 a( n* p4 ~$ d! P( \3 Q+ ~ saxisx: 0 #The axis offset direction?: _' D$ | |* e
saxisy: 0 #The axis offset direction?
, v0 E/ _+ E1 ? saxisz: 0 #The axis offset direction?
" @" c6 n, B& u* L# m; s/ t r_intersect : 1 #Rotary axis intersect on their center of ratations5 _ F' r+ D' i+ u5 T1 m
g7_tilt : 2 #With mill_plus and nutating, select toolplane output1 {! K# J" I$ Z2 S9 T
#0 = Post selects G7 rotation axis
4 O. K: z) z- e0 `; b #1 to 4, user selected G7 rotation axis . Z2 f8 c) l8 n6 h0 N! t3 P
#1 = Primary C : X zero, Secondary B0 r3 v' Z* q! W9 y& z. h
#2 = Primary C : Y zero, Secondary A& p- F) d' u7 w5 \! A
#3 = Primary C : -X zero, Secondary B
8 `: O: | z# q9 o #4 = Primary C : -Y zero, Secondary A
0 y9 @* C. t8 |7 a* v% n+ X6 i shift_90_s : 1 #Shift pos.=1, neg.=-1
( ~1 ` C% \: ^8 w* q: R (5)机床行程及转角限位设置
& {' V4 [" F" m5 e$ j/ f1 T 坐标运动轴的行程及软件限位设置的正确性,直接影响五轴机床数控程序输出的正确性,下述分别为KR214的各坐标轴的行程及A/C轴的转角行程设置。
3 R* F+ Q9 ^6 ^2 r+ N 1)X、Y、Z线性轴行程设置6 p) q5 T' ]: x1 G3 V
adj2sec : 1
' Z- ?# F! [3 o) q" p# | use_stck_typ : 2 #0=Off, 1=Stock def., 2=Limits& `$ H: c1 e$ a6 J H
up_x_lin_lim : 1350#X axis limit in positive direction0 g; M# X# b# k; r- }
up_y_lin_lim : 900#Y axis limit in positive direction
& o4 ]3 E! W) ?- q# X" S up_z_lin_lim : 1400#Z axis limit in positive direction$ i) k. o& D0 `6 c3 B4 `% Q
lw_x_lin_lim : -1350 #X axis limit in negative direction
: F, S/ }- `6 A- Z e: p lw_y_lin_lim : -200 #Y axis limit in negative direction- s" L3 V6 A, p# E: y/ }3 \3 A
lw_z_lin_lim : 200#Z axis limit in negative direction2 P7 |( q/ A3 _& _7 _8 C+ m1 ?
2)主动轴C和从动轴A的转角设置% @8 G( X5 x/ ^! p
auto_set_lim : 1 #Set the type from the angle limit settings (ignore these)
- r% A* k- W6 d& D# V. M2 o pri_limtyp : 1' z; }* X- R4 p, q
sec_limtyp : 1
; @% F( n6 D3 G3 ?5 U% G8 Y #Set the absolute angles for axis travel on primary% a6 k7 N( j0 e a) Z
pri_limlo: -200
( d* {5 O4 X6 G9 I! \ pri_limhi: +200
9 V2 V8 A2 P( D! y #Set intermediate angle, in limits, for post to reposition machine
" ]1 ~: D) n; ^% m& i pri_intlo: -200
9 j/ X) p+ w% S# V, J* O pri_inthi: +200
% ^% {" {: M, z) Y8 m6 ~. f8 N9 w #Set the absolute angles for axis travel on secondary
: G5 V& Z# m8 E0 ] n2 a sec_limlo: -115
1 i% l+ ?" L" [3 N/ E4 q% J, C& z, i sec_limhi: +90
U: N( f: M" r1 h& s# v' }5 a #Set intermediate angle, in limits,for post to reposition machine
' o/ W# u2 I8 W6 Y; ? sec_intlo: -200 ; [1 z+ s" `/ U: {% g; r4 \$ v
sec_inthi: +200
4 F$ [0 b1 K- ~, h, l 五坐标机床后处理程序的验证可通过下面的测试进行。例如,我们根据KR214的需求进行了多种测试,如X/W轴联动、固定A轴、变A轴、旋转C轴、五轴底刃、五轴侧刃等典型的五轴加工程序测试。其测试的刀具轨迹与部分程序代码如图3~图5所示。
, W5 K8 S s0 C$ ~8 b) }3 za)五轴底刃刀具轨迹及其模拟 b)五轴侧刃刀具轨迹及其模拟 图3 五轴铣削加工功能测试示意图 |
|