文档库 最新最全的文档下载
当前位置:文档库 › 数控铣床图象编程与仿真系统的研究

数控铣床图象编程与仿真系统的研究

数控铣床图象编程与仿真系统的研究
数控铣床图象编程与仿真系统的研究

工艺与检测

数控铣床图象编程与仿真系统的研究

东北大学 葛研军 王启义

摘要 利用计算机图形学技术提出一种对数控铣床进行图象编程的方法,并针对所生成的NC 程序进行加工模拟仿真,最后采用RS —232串行通信方法,方便地实现了微机与数控机床之间的数据传送,使CAD /CAM 集成成为可能。

关键词 数控铣床 图象编程 仿真 通信 在现代机械制造中,数控机床作为一种高效自动化加工设备,越来越广泛地受到人们的关注,但国内外数控机床使用情况并不理想,究其原因主要有以下几点:(1)编程方法落后,缺少必要的图形工具的支持,程序不够直观,容易出错[2]。(2)缺乏必要的程序检验手段。无论是手工编程还是自动编程都可能出现错误,这样就会在加工过程中引起设备、刀具或工件的损坏。(3)数控代码不便传输与保存。传统的数控代码只能靠手动在操作面板上或通过光电阅读口输入,对于用户更换加工品种及保存资料等甚为不便。针对上述问题,我们开发了一个数控铣床基于图形的自动编程与仿真系统。

1 图象编程方法基本原理

利用计算机图形学技术,在计算机屏幕上绘制出所要加工零件的几何图形,然后将所生成的几何图形

关键点坐标转化为刀位文件所需的形式,并将其存储在一个动态链表中,此动态链表可以根据用户的加工要求进行加工排序,最后生成用户加工要求的刀位文件。图1a 所示为用户在微机上绘制出的加工零件几何图形,图1b 中P 1点为加工起点,P 2点为确定的加工方向,图1c

为数控加工各程序段的加工方向示意图。

图1 加工零件外观图

2 数控代码自动生成

刀位文件成后,可根据零件几何外观图形及数据,将其自动地转换为具体数控机床所需要的数控代码(本系统的数控代码格式适用于FANUC 0M 系统及

FAN UC 6M 系统)。另外,在此过程中还要解决坐标制的设定、刀具补偿及加工参数的设定等问题。图2是将排好序的刀位支件直接转换成FANUC 0M 系统和FAN UC 6M 系统的数控代码程序框图。

图2 数控铣床程序框图

3 数控系统加工过程计算机仿真

3.1 加工过程计算机仿真原理

在数控加工过程中,由于各种错误加工因素,往往

?

20?《制造技术与机床》

辽宁省科委攻关项目资助。

会使数控系统自动报警,造成停机、废活等现象,因此有必要对其进行加工过程仿真。

本系统加工过程计算机仿真原理是:首先在刀具补偿为零的情况下,用C语言将数控代码解释成图形,并检查该图形是否为用户所绘制的原始图形,然后根据刀具补偿值,计算出各个关键点的刀位数据,并按加工要求将其解释成为动

态图形,即可直观显示出

是否与工件发生干涉等加

工故障。图3中粗线轮廓

为无刀偏时数控代码还原

的原始图形,箭头方向线

为刀偏是G41时仿真加

工过程的刀心轨迹。图3 铣削加工计算机过程仿真 3.2 数控铣削刀位文件生成方法

3.2.1 加工方向性

为使刀位数据易于获得,避免传统数值积分法(DDA)精度较差与运算繁琐等缺点[4],本系统在加工仿真过程中引入加工方向性概念,使刀心轨迹在算法上简洁明了,程序可读性强。

3.2.2 刀具偏置位置确定

如图4若加工方向确定为P→Q→R,则可根据刀具偏置号G41(左刀偏)或G42(右刀偏),利用矢量代数唯一地确定出P1点或者是P2点。

PQ×PP1=t1k(1)

PQ×PP2=t2k(2)则 当刀具偏置号为G41时,t1>0,此时取P1点。

当刀具偏置号为G42时,t2<0,此时取P2点。

图4 刀具偏置位置

上述计算适用于加工起点是直线的情况。若加工起点是圆弧,则应确定圆弧的方向数 ,然后再利用式(1)或式(2)进行计算。 可由微分几何理论进行确定

=d r

d s =

(-R sin i+R cos j)d

±R d

=±(-sin i+cos j)

式中r为圆弧矢点的矢径,s为圆弧的弧长, 为圆弧始点的圆心矢径与X轴的交角。上式中,当圆弧为逆

圆时取“+”号,反之取“-”号。3.2.3 加工内、外轮廓确定

切削零件时,首先要进行内、外轮廓测量,以便形成不同的刀心轨迹,内、外轮廓可由轮廓角 确定。如图5,将PQ矢量取反并单位化,即 =

PQ

PQ ,b表示Q 点圆弧方向数,由欧拉公式得:

 a=e i 1 b=e i 2

a

b

=

e i 1

e i 2

=e i( 1- 2)=e i =cos +i sin (3)由式(3)知,根据复变函数的虚、实部可唯一地确定出 的大小,其变化范围为0°~360°,根据FANUC0M 系统和FANUC6M系统定义可知:当0≤ ≤ 时为内轮廓, < ≤2 时为外轮廓。

3.2.4 内轮廓交点的取舍

内、外轮廓确定后,还要对内轮廓进行求交运算,除直线与直线加工情况为单交点外,其余各种情况出现的交点均为双交点,因此需要对其进行交点的取舍。但这种情况与上述加工状态相比就显得较为简单了,可用解析几何理论直接获得。由上述得出各种状态下刀位数据关键点之后,刀位文件即可生成。该方法也可类推到数控线切割加工。将刀位文件动态地解释成图形,并显示在计算机屏幕上,便构成了数控加工过程计算机仿真。

图5 轮廓角确定

4 微机与数控机床异步通信

数控代码自动生成后,经仿真验证无问题之后,即可向数控机床传送数控代码。传统的数控程序是用穿

图6 微机发送数控文件程序框图

?

21

?

1998年第4期

极径渐开线插补原理

青海大学 郭崇善

摘要 在分析圆的渐开线形成原理的基础上,建立了极径渐开线插补原理。即先建立圆的渐开线极坐标方程,选择极径为控制核心,以极径增量确定渐开线位置,而后进行插补。

关键词 渐开线 极径 渐开线插补

从目前国内外现有数控机床来看,大多数数控机床只有直线插补和圆弧插补,而不具备渐开线插补功能。长沙国防科技大学王启民在渐开线插补方面做了有益的探索,提出了先进行基圆的圆弧插补,由插补点确定发生线的位置,而后进行渐开线插补的数字积分法渐开线插补原理。本文在对该插补原理和圆的渐开线深入研究的基础上,另辟蹊径,提出了极径渐开线插补原理。

1 圆的渐开线极坐标方程

以基圆的圆心为坐标原点,使X轴经过圆上的P0点,y轴垂直于X轴,P0为渐开线在圆上的起始点,P (x,y)为渐开线上的任一点,设基圆半径OB=R,∠B OD= ,如图1所示。

根据渐开线的性质,可推出渐开线上P(x,y)点轨迹参数方程为:

x=

R cos +R sin

y=R sin -R cos

(1)

图1

渐开线除了在直角坐标系中可建立参数方程外,也可在极坐标系中建立参数方程。同样,还是以基圆的圆心为极坐标系的极点,ox轴为极轴,P0为渐开线上的起始点,P( , )为渐开线上任一点,设基圆半径为

孔纸带,通过光电阅读机输入到数控机床,这样不仅加工成本高,而且传送环节多,速度慢,容易出错。本系统通过一般数控机床和微机都具有RS—232异步串行口,自行开发了一个专用通信软件,将微机的数控代码直接发送给数控机床,从而省去了纸带自动穿孔机及光电阅读机等环节,降低了成本,提高了加工信息的传送速度。其程序框图见图6。

5 结论

(1)利用C语言丰富的图形功能,在微机上非常直观地实现了数控代码的自动生成,其编程方法更为简洁、形象,代码生成效率也更高。

(2)提出了一种适合于连续铣削加工排序算法,适用于2~2.5轴的数控铣削加工。

(3)引入加工方向性,可方便地确定出数控加工的刀心轨迹。

(4)利用RS—232接口,使微机与数控机床直接进行异步通信,建立了微机系统与数控系统之间相互沟通的桥梁。

本系统已通过验收,并经实验表明:其具有运行准确、直观,能显著提高数控机床加工效率等特点,可满足实际加工需要。

参考文献

1 CAD/CAM原理.北京:清华大学出版社,1991.

2 PAU LA M.NOAKER,CAD/CAM,Control S ystems,and S oft-w are.M aufacturing Eng ineering.1996(8)

3Paul Giaconia.T ren ds in NC S imulation.T ooling&Prod uction,1996 (6)

4 KW ANGS OOKIM巨JOHNE BIDEGEL,APATH GENERATION M ETHOD FOR S CULPT UPED SURFACEM ANU DACT URE.

Comp uters ind.Engn g,1988,14(2)

第一作者:葛研军,沈阳市文化路东北大学413信箱,邮编:110006

(编辑 刘茹贵)

(收稿日期:1997—10—13)

?

22

?《制造技术与机床》

ABSTRACTS&KEY WORDS M ANU FA CTU RING TECHN OLOGY&M ACHINE TOOL

N o.4,1998,T otal Issue N o.429

Hysteresis Eff ect of Piezoelectric Ceramics on Displacement Accuracy Zhang Y ua nliang,et al(7) Abstract:Hyster esis is one o f t he serious defects of piezoelect ric ceramics w hich restr tr icts the precisio n of an open loo p co ntro l system.A pr e-feed contr olling model is ado pted making com-pensate contr o l fo r t he po sitio n of piezo electr ic ceramic cut ting to ol.T he r esult is satisfact or y.

Key Words:N on-ax is-sy mmetr ical O ptic Surface,P iezoelect ric Ceramic Cutt ing T oo l,Pr e-feed Co ntro l M odel Automatic Pre-processing Algorithm for Number Image of Speed-change Housing Box at Production Environment

L e N ing,et al(9) Abstract:T he pr e-pro cessing for number r ecog nizat ion of speed-change housing bo x o f auto mot ive is discussed.It sug-gests pr e-pr ocessing flow w hich is suitable for the sho p floo r and the evaluating basis for the alg o rit hm in each pro cess. M o re pr act ical alg or ithm is deter mined for each pre-pr ocessing step.

Key Words:G rey Imag e,Pr e-pr ocessing A lgo rithm,Speed-change Housing Bo x N umber

Semi-C lose Loop Compensation Control of Economical NC Ma-chine Tool L iu Xueping,et al(11) Abstract:T he effect ive facto rs on w o rking accuracy o f econo mi-ca l N C machine to ol hav e been summar ized in this paper.T he pho to electr ic encoder is used for m easur ing the a ng ular po sitio n of r otat ing ballscrew.Semi-clo sed lo op co mpensation co ntro l is rea lized and system a ccura cy is impr oved.

Key Words:Semi-Clo sed L o op,Compensatio n Co ntro l Optoelectronic Aiming System of Tool Setting Gauge f or NC Machine Tool Ya ng Shimin,et al(14) Abstract:A t oo l setting gaug e is essential for NC machine too l and m achining center w hich dir ectly a ffects the accuracy and ef-ficiency o f the machines.M o st of t he too l sett ing g auge in our country ar e optic-mechanical st ructure.T he to ol is aim ed by the ey e,thus the accur acy is low.In this pa per,an opto elec-tr onic aiming system is developed.In this sy st em,a CCD is used as sensitiv e element.T he aim ing accur acy and efficiency ar e gr eatly impr ov ed.It is easy t o be miniat ur ized and can aim on ma chine too ls o r CM M s.T he accur acy is better than0.

5 m.Key Words:T o ol Setting Gaug e,CCD,A im

Research on Image Programing and Simulating System for NC Milling Machine Ge Y anjun,et al(20) Abstract:By using computer g r aphic t echno lo gy,A n imag e pr og raming metho d is sug gested for N C milling machine,by using the g ener ated N C pr og r am,a simulat ing is pro cessed. T hen,the RS-232serial co mmunicat ion is used a nd the data t ransfering betw een com puter and N C machine to ol is r ealized easily.T he int egr atio n of CA D/CA M becomes possible.

Key Words:N C M illing M achine,Ima ge Pr og r aming,Simula-tio n,Communication

Involute Interpolating Principle of Polar Radius

G uo Chong shan(22) Abstract:A po lar r adius int erpolating pr inciple is built on the basis o f analysis made on cir cular involute for ming pr inciple. T he principle is made,a t fir st,the po la r equatio n of cir cle in-v olute is built and the po sitio ns of invo lut e ar e decided by incr e-ments o f po lar r adius to cho ose polar r adius as contr olling cen-ter,t hen the inv olute inter po la tio n is m ade.

Key Words:Invo lute,po la r Ra dius,I nv olute Inter po lat ion Dynamic Errors C ompensation of HP5528A Double-f requency Laser Interf erometer So ng K aichen,et al(27) Abstract:T he dynamic err or model o f HP5528A do uble-fr e-quency L aser Inter fero meter is established in this paper.T he er r or ca n be compensated using the model.T he inter fer ometer can be used to measur e the displa cement o f an object in high speed mo tio n.

Key Words:Double-frequency L aser Interfer om eter,Dy namic Err or,Com pensatio n

Computer Aided Evaluation of Position Accuracy of Rectangu-larly Arranged Holes Wa ng Junze,et al(28) Abstract:Inspecting the position accur acy of ho les distributed o ver a r ectangle,the evaluating metho d used in pr oduct ion is inco nvenient and the accur acy is lo w.I n or der to o ver co me t hese difficulties,a co mputer aided evaluating metho d is given in t his paper.By using the method,the posit ion accuracy o f ho les,the pro bability of cor rection of unqua lified holes and t heir co rr ectiv e value can be det ermined automa tically.

Key Words:P osit ion A ccur acy,Co mputer A ided Evaluatio n, R ect ang ular ly Dist ributed Holes

-Ⅲ-

相关文档