Font Size: a A A

Research On GUI And Communication Of CNC On Linux

Posted on:2009-02-21Degree:MasterType:Thesis
Country:ChinaCandidate:F L ZhangFull Text:PDF
GTID:2178360245494658Subject:Mechanical Manufacturing and Automation
Abstract/Summary:PDF Full Text Request
Because of drastic market competition confronted by manufacturing corporations, CNC system is developing to high-precision, high-speed, high-efficiency, intellectualized and distributed network ability in 21st Century. However, traditional NC system have a lot of disadvantages, for example, the close structure, simplex functions, a long research period and high costs etc. which have confined manufacturing developments. With the fast development of software technologies, many research organizations brought forward one open architecture CNC system and did lots of research on this field in succession.Based on detail analysis of research actualities at home and abroad, taking advantages of European OSACA and OCEAN projects, American OMAC and EMC2 projects, and Japanese OSEC project, especially the EMC2 system which has excellent and rich functions and is an open source project, has become the basis of our research.EMC2 is a control system based on Linux OS and its real-time extension RTAI. It consists of four modules, one HAL and one software PLC (ClassicLadder). The four modules include GUI (Graphical User Interface), Task Executor EMCTASK, Motion Controller EMCMOT and Discrete I/O Controller EMCIO. NML based on RCS is used to communicate among the four modules, which improves the transplantable ability of the EMC2. Besides, EMC2 is a configurable control system and all we need to do is editing a few human readable text files named configuration files. So EMC2 answers for open CNC completely and has been used successfully in many fields all over the world.The task of this paper involves part-redevelopment of EMC2 system, the advantages of which are kept and the disadvantages are modified. The task consists of two parts: the first part is the development of EMC2 GUI based on Qt and the second is the design of real-time Ethernet communication programs. Then the first part is also divided into two layers: the upper layer involves the design of EMC2 GUI and the under one the developing of the interface with EMCTASK module.During the development of CNC GUI based on Qt, the internal structure and communication of EMC2 system are researched in detail firstly. Then by comparing some prevalent software and Qt, this paper chooses Qt for programming, which has lots of excellent characteristics, especially the advanced signal and slot mechanism. Finally, the EMC2 GUI is designed based on Qt and the n is testified successfully with the PC parallel port.As for the design of real-time Ethernet communication program, it focuses on packet capturing and sending from link layer on Linux box. After analyzing of Libpcap and Libnet library for Linux in detail, we design a packet-capturing program with Libpcap library from link layer. Then according to the real-time Ethernet communication protocol, we build Ethernet frames and develop a packet-sending program with Libnet API from link layer. Finally a test module is designed with Qt and the programs mentioned above are testified successfully.
Keywords/Search Tags:EMC2, Qt, NML, Libpcap, Libnet, open CNC
PDF Full Text Request
Related items