节点文献

一种应用于数控系统的USB主从机系统的设计与实现

Design and Implementation of USB Host/Slave System Applied in Computer Numerical Control System

【作者】 朱庆双

【导师】 史健芳;

【作者基本信息】 太原理工大学 , 电路与系统, 2008, 硕士

【摘要】 随着总线和接口技术的发展,在数控加工车间如何更加可靠、快速、便捷地进行数据传输成为数控制造领域通信技术的研究重点之一。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接口积累了技术经验。

【Abstract】 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.

【关键词】 USB接口STC89C516RD+单片机数控系统CH375ADNC
【Key words】 USB interfaceMCU STC89C516RD+CNC systemCH375ADNC
  • 【分类号】TP273.5
  • 【被引频次】5
  • 【下载频次】226
节点文献中: