一种应用于数控系统的USB主从机系统的设计与实现
详细信息    本馆镜像全文|  推荐本文 |  |   获取CNKI官网全文
摘要
随着总线和接口技术的发展,在数控加工车间如何更加可靠、快速、便捷地进行数据传输成为数控制造领域通信技术的研究重点之一。USB技术以其高速、可靠、通用性强等特点在过去的十多年时间里发展迅猛,而USB主从接口芯片的出现,使得USB总线通信在没有PC参与的情况下成为可能。
     课题针对普遍使用的经济型数控系统只能通过传统RS232串行口与PC机交换数据的现状,设计了USB主从机系统。通过对USB主机和从机接口技术的深入研究,根据实现功能和设计要求,选用CH375A作为USB主从接口芯片,采用STC89C516RD+作为核心处理器搭建了系统硬件平台。系统的软件体系包括系统工作在主机模式下的单片机固件程序和工作在从机模式下的固件程序以及相应的PC端软件。系统工作在主机模式下时能以FAT文件格式访问USB存储设备,并通过RS232总线与数控系统进行串口通信,经济型数控系统在不改变原有结构的情况下,通过该系统可以读写USB存储设备。工作在从机模式下时,经济型数控系统通过RS232接口连接主从机系统,利用主从机的USB接口作为USB设备连接至PC的USB接口,此时系统作为DNC接口模块,在PC机上安装上主从机的USB驱动程序后,通过PC端的USB总线通讯软件,实现PC与经济型数控系统的基于USB总线的DNC通讯。系统具有液晶显示功能,其工作模式、数据处理方式等可通过按键以级联菜单方式进行选择操作,提供了良好的人机界面。
     由51单片机STC89C516RD+和USB接口芯片CH375A组成的USB主从机系统,将计算机的USB总线管理机制和传输机制引入到数控加工领域,通过对RS232接口的功能扩充,经济型数控系统不仅可以读写USB存储设备,而且可以通过由USB总线构成的小规模集中控制网络来实现分散的数控系统集中控制,实现低端数控系统的功能升级。单片机固件程序具有很好的结构可以很容易的移植到中高档数控系统的32位处理器中,同时,数控系统的USB接口取代RS232串行口成为趋势,课题通过主从机扩展了经济型数控系统的RS232接口功能,实现计算机与数控系统间的USB总线通讯,为后续开发USB接口积累了技术经验。
With the development of bus and interface technology, how to transfer data in a more reliable, faster and more convenient way in the manufacturing workshop has become one of the key research topics in numerical control manufacturing field. The USB technology, with its outstanding features such as high speed, reliability and universality has enjoyed a rapid development in the last decade. The birth of USB host/slave interface chip made it possible for USB communication when the PC is not available.
     Considering the actuality that economic computer numerical control (CNC) system is widespread used, but can only use tradition RS232 serial port to swap data with PC, this paper designs a USB host/slave system applied in CNC system. Accord to realizing function and design requirementbased on researching in USB host/slave interface technology deeply, CH375A is selected to act as USB host/slave interface chip and STC89C516RD+ is adopted to act as kernel processor, and they are composed of system's hardware platform. System software includes host soft which working in host mode and slave soft which working in slave mode. When working in host mode, the system can access USB memory devices with FAT file format and can communicate with CNC system by serial communication, so USB memory devices can be accessed with its host interface by economic CNC system without changing inhere structure. When working in slave mode, economic CNC connects the system with RS232 serial port, and connects the PC's USB host interface by system's USB slave interface regarded as USB device, then, the system should be configured with USB driver and PC's communication soft to realize DNC communication between PC and CNC system by USB bus. The system's acting mode, data processing mode etc. can be selected by the cascade menu shown on liquid display module, so favorable human-computer interface is supplied.
     Mainly composed of MCU STC89C516RD+ and USB interface chip CH375A, the USB host/slave system introduces computer's USB bus manage mechanism and transfer mechanism to numerical control manufacturing field. Economic CNC system not only could read and write USB memory devices, furthermore could compose of centrally controlled network in miniature to control distributed CNC system by USB bus. The system's MCU firmware holds worthwhile structure and can be grafted easily to intermediate and high grade CNC system. At the same time, it is the trend that USB interface supersedes RS232 interface in CNC system sooner or later. This system realizes USB communication between computer and economic CNC system by extending CNC system's RS232 port, and technology experience can be summarizes for following research in USB interface.
引文
[1]毕承恩,丁乃建,现代数控机床,北京,机械工业出版社,1991
    [2]王星宝,基于自动应答式服务器的组建化DNC系统研究,南京,南京航空航天大学硕士学位论文,2004
    [3]张旭梅,刘飞,基于集成DNC技术的车间运行模式研究,中国机械工程,1999,10(3),1354-1357
    [4]Compaq,Intel,Microsoft,Universal Serial Bus Specification Revisionl.1www.usb.org,1998
    [5]Compaq,Hewlett-Packard,Intel,Lucent,Microsoft,NEC,PhilipsInc.Universal Serial Bus Specif- ication Revision 2.0,
    [6]马伟著,计算机USB系统原理及其主/从机设计,北京,北京航空航天大学出版社,2004
    [7]Tucker,Jonathan,Benefits and the hazards of USB,Electronic Product Design,2006,27(1),p30-32
    [8]陈明智,李锋,尚淮,USB通信协议分析和系统设计,自动化与仪器仪表,2006(6),43-46
    [9]陈志宇,嵌入式USB-HOST的研究与实现,上海,华东师范大学硕士学位论文,2004
    [10]Brain,Adrian,Denne etc.,Catching the USB wave,Electronics World,111(1830),p42-45
    [11]马伟,嵌入式USB主机系统的研究与设计,计算机测量与控制,2003(5),1-8
    [12]Universal Serial Bus Mass Storage Class Specification Overview,Revision 1.2,2003
    [13]Universal Serial Bus Mass Storage Class Bulk-Only Transport Revision 1.0,September 31,1999
    [14]Stout P,Leonard R,The introduction of DNC technology as a partial approach to achieving the objectives of CIM,Computer Aided Engineering,v50,2005,p16-p20
    [15]孙兵,董书芳,柔性制造系统DNC控制过程分析,组合机床与自动化加工技术,1998(2),20-26
    [16]彭和平,支持远程调用及在线加工的DNC研究,[硕士学位论文],南京,南京航空航天大学硕士学位论文,2005
    [17]宏晶公司,STC89C516RD+Data Sheet
    [18]南京沁恒电子,USB总线接口芯片CH375中文手册
    [19]赵亮,侯国锐,单片机C语言编程与实例,北京,人民邮电出版社,2003
    [20]王峰博,崔慧娟,WDM设备驱动程序的研究及实现,计算机应用,2003,23(6),98-100
    [21]Chris Cant著,孙义等译,Windows WDM设备驱动程序开发指南,北京,机械工业出版社,2000
    [22]王程民,季春明,对经济型数控机床实行USB接口改造的实践探索,CAD/CAM与制造业信息化,2005(8),63-66
    [23]朱友芹主编,新编Windows API参考大全,北京,电子工业出版社,2000
    [24]童洪洁,李宝华,USB上位机程序开发与设计,仪器仪表用户,2005(1),52-53
    [25]On-the-Go Supplement to the USB2.0 Specification Revision 1.2
    [26]Jan Axelson著,陈逸等译,USB大全,北京,中国电力出版社,2001
    [27]陈启美,吴永辉,丁传锁等,USB主机.硬件及软件,电力自动化设备,2001,21(6),55-58
    [28]Ritson,Carl G,A process oriented approach to USB driver development,Concurrent Systems Engineering Series,v65,2007,p323-338
    [29]武安河,邰铭,于洪涛著,Windows 2000/XP WDM设备驱动程序开发,北京,电子工业出版社,2003
    [30]王晖,嵌入式系统中USB传输模块的WDM驱动程序设计,电子设计应用,2005(4),109-110
    [31]张慧娟,一种具有USB功能的农田数据采集系统,[硕士学位论文],北京, 中国农业大学硕士学位论文,2007
    [32]龚家华,数字机顶盒USB主机接口研究,[硕士学位论文],华中科技大学硕士研究生学位论文,2005
    [33]许永和著,USB外围设备设计与应用,北京,中国电力出版社,2001
    [34]杨全玖,张大伟,吕宗芳等,基于CH375多通道USB接口与PC机通信的实现,微计算机信息,2006,22(11),72-74
    [35]E.V.Vetvitskii,A.V.Plotnikov,D.A.Prilutskii and S.V Selishchev,Use of the USB Universal Serial Bus in computer medical systems,Biomedical Engineering,2000,34(3),p134-136
    [36]杨应平,石城,李振华等,基于CH372接口芯片的USB高速数据采集系统,武汉理工大学学报(信息与管理工程版),2006(8),9-11
    [37]闫伟国,王敏杰,DNC中数控程序传输速度与机床进给速度匹配关系的研究,制造技术与机床,2003(3),25-26
    [38]Peter.W.Gofton著,王仲文等译,精通串行通信,北京,电子出版社,1995
    [39]Firm D.L,Broad scope of DNC,Manufacturing Engineering,1987,99(2),49-51
    [40]王时龙,刘飞,基于软插件技术的DNC通信系统研究,机械工程学报,1999,35(3),51-54
    [41]Anon,Universal does not equal simple,Evaluation Engineering,2006,45(7),p40-46
    [42]毛海岑,李孝文,何晓民,液晶显示多级汉字菜单的方法,国外电子元器件,1999(9),42-44
    [43]Khalil,M.I,A USB-based data acquisition system for neutron TOF measurements,Measurement Science and Technology,2006,17(1),p N1-N7
    [44]辛华峰,于枫,谭健等,嵌入式USB主/从机应用模块,吉林大学学报(工学版),2005,35(2),166-169
    [45]王成儒,李英伟编著,USB2.0原理与工程开发,北京,国防工业出版社,2004
    [46]阳宪惠,现场总线技术及其应用,北京,清华大学出版社,1999

© 2004-2018 中国地质图书馆版权所有 京ICP备05064691号 京公网安备11010802017129号

地址:北京市海淀区学院路29号 邮编:100083

电话:办公室:(+86 10)66554848;文献借阅、咨询服务、科技查新:66554700