In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "what is the implementation principle of Linux". Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Next, let the editor take you to learn "what is the implementation principle of Linux"?
1 introduction
Since the 1990s, an important trend in the development of numerical control technology is the openness of numerical control system. At present, the research on open control system Fang Xingmiai, the whole country is paying close attention to the research and formulation of open CNC system platform standards and specifications as well as the development of related products. The open CNC system allows users to freely select and configure standard hardware and software modules according to their needs, to realize the integration of system cost, or to develop specific functional modules on the basis of the open platform to form a special system suitable for their needs. the open CNC system has the basic characteristics:
Interoperability: provides standard data formats, communications, and interaction mechanisms
Portability: the system can run on different hardware and software platforms
Scalability: allows users to expand or reduce the system
Interchangeability: the functional modules of the system can be replaced as needed.
Open CNC system requires that it does not depend on specific software and hardware platform, so choosing a general open system platform is an important prerequisite to realize the openness of CNC system. Industrial PC has been widely used in the control field because of its hot technology and stable performance. The open architecture of PC also provides a good and open hardware platform for CNC system. It has become a consensus to develop CNC system on the basis of industrial PC, but on PC platform. The multi-task characteristics and real-time requirements of CNC system limit the application of general operating systems such as DOS and Windows in CNC system. On the special real-time operating system, although it is convenient to develop CNC system, it is expensive, and it is not conducive to the opening of CNC system. In recent years, with the rapid development of Linux operating system, many of its excellent characteristics have been reflected, which promotes the emergence of RT-Linux Real Time-Linux), so that the CNC system can be built on the basis of real-time Linux and retain most of the good characteristics of Linux, and the stability is quite good, which provides conditions for the networking and openness of modern CNC machine tools.
2 present situation and trend of systematic research at home and abroad
In recent years, developed countries have taken measures to develop and research open numerical control (ONC: Open Numerical Control) systems, and many controller manufacturers in the world have also launched their own open control systems, such as OAC500 of Hewlett-Packard and PMAC-NC of Delat Tau. At present, there are three standard specifications for authoritative open architecture controllers in the world:
(1) OMAC (Open Modular Architecture Controller): jointly proposed by Chrysler, ZTE and General Motors in the United States on the basis of NGC (NextGeneration Controller, 1989). Because the members of OMAC are the users of the controller rather than the developers, it is impossible for it to be commercialized and practical. In fact, American industry thinks that OMAC is a design concept, not a specific standard of controller, and its purpose is "Buy Anywhere, Use Anywhere". The function of "plug & play" can be realized by using the standard API defined by OMAC, as long as the concrete implementation method is designed. From the holistic structure analysis proposed by OMAC, although its eloquence is high, it pays too much attention to the classification of functions rather than the integration of resources, which leads to the decline of system independence and difficulty in maintenance.
(2) OSEC (Open System Environment for Controller): jointly proposed in 1994 by three machine tool manufacturers, Toshiba Machinery, Toyota Machinery and Mazak of Japan, and IBM, Mitsubishi Electronics and SML Information Systems. Its purpose is to develop a new generation of CNC system based on PC platform and open architecture with high performance-to-price ratio, in order to meet the rapidly changing market demand. In terms of hardware, OSEC adopts the structure of PC+ control card, which is conducive to the realization of hierarchical, modular and clever configuration, and can make full use of the existing PC resources, thus effectively shortening the product development cycle and has strong maneuverability. It can be said that OSEC adopts a more realistic and eclectic way, so its system structure is limited to the direct description of CNC system, and its adaptability is not strong enough.
(3) OSACA (Open System Architecture for Conhol withinAutomation): proposed by the European Union in 1992. One of the goals of OSACA is to make itself a general international standard in the field of automation, so it covers the whole field of automation from the beginning. OSACA draws lessons from the OSI reference model of ISO, through the detailed analysis of the control system, puts forward the architecture of hierarchical platform + structural functional unit. This standard is conducive to the realization of the independence of computer hardware and the independence of the operating system, but the solution to the independence of a large number of mechanical and electrical equipment in CNC is not complete. At the same time, the program has been developing slowly because it is too large and requires too much for the participants. So far, the above three standards and norms have not been fully hot products to the market, and the standard itself is still in continuous improvement and improvement, and the three also learn from each other.
Compared with the enterprises in Youfang country, the research on numerical control in Chinese enterprises started relatively late. At present, China already has open control systems Huazhong I, Zhonghua I, Voyager I and floating I, but most of them are based on DOS operating system platform or Windows operating platform, as well as other special real-time operating systems developed by ourselves. From the perspective of the development trend of CNC system, They do not have the essential characteristics of open CNC system. The architecture adopted by each system is not consistent, it is still a system of its own, lack of compatibility and interchangeability, and the software and hardware of each system do not have portability and interoperability.
3 structure and implementation principle of real-time Linux operating system
Like Windows, Linux itself is not a real-time operating system, it is not suitable for real-time industrial control environment. But Linux is free software and its source code is open, which makes the Linux kernel can be modified into a real-time operating system while retaining most of its functions. Up to now, there are mainly two general real-time systems developed under the Linux platform in the world: the driest one is the Linux real-time kernel developed by the New Mexico Institute of Technology in the United States, namely RT-Linux, and the other is the real-time application interface based on the Linux platform developed by DIAPM in Milan, Italy, which is based on RT-Linux, namely RTAI.
The basic working principle of RT-Linux operating system is: to realize the basic functions provided by Linux operating system by retaining the basic kernel of Linux; to avoid large-scale structural transformation and to redesign a real-time kernel only at a small cost to achieve strong real-time performance. Therefore, the rich programming resources in Linux system, such as Chinese graphics environment and TCP/IP network, can be used to realize all the real-time functions needed by CNC equipment, including low-level task creation, low-level task queue management, interrupt task installation, interrupt task operation and so on.
Real-time Linux system interrupts can be divided into two groups: one group is controlled by the conventional Linux kernel, the other is controlled by the real-time kernel, and the interrupt request is first directed to the real-time kernel and filtered; if the interrupt is a real-time kernel interrupt, the real-time interrupt processing routine continues to execute If it is a regular Linux kernel interrupt, the flag bit is set to wait for processing, and only when no real-time interrupt is executed, it turns to the regular Linux interrupt handling routine. Through this method, the real-time kernel can interrupt the conventional Linux operating system at any time to perform critical real-time tasks. At this time, the conventional Linux kernel runs as a * priority of the real-time kernel. When there is any more advanced real-time task request processing, it will deprive the conventional Linux operating system of the running right and transfer to the corresponding real-time task handler. In extreme cases, the system can cut off the connection between the real-time kernel and the conventional Linux operating system and give priority to the strong real-time performance of the system.
RT-Linux provides two communication mechanisms: one is FIFO, and the other is shared memory. Non-real-time applications and processes access data through FIFO and shared memory, and then place the data in another FIFO and shared memory for access by RT-Linux applications. The RT-Linux operating system structure and communication are shown in figure 1.
Figure 1RT-Linux operating system structure diagram
4 Software structure of open CNC system based on Linux
The open numerical control system based on Linux accords with the national standard of "Mechanical equipment-Open CNC system-General principles" GB/T 18759.1-2002). The opening degree of the general rules to the numerical control system is defined at the second level: the control device is allowed to be replaced in a clear and fixed topology, and specific modules in the NC core are added to meet the special requirements of users.
(1) the overall architecture of ONC system software.
According to the general principles, CNC software can be divided into three levels: basic software platform, application platform and application program. The system software will provide real-time multitasking API, file system, general network API, all kinds of device driver API and other interfaces. In addition to the interfaces of discrete point vo control API, sensor API and position controller API, the application platform can also integrate the user-defined functional component interface of API provided by the system software platform. The application layer consists of three parts: process control, man-machine interface and system integration and configuration supporting environment. Process control contains G code even though its DNC component and PLC component. The man-machine interface includes status spring display, text editor, MDI components, self-diagnosis, network communication, data communication operation, general menu and so on. System integration and configuration support environment provides users with a convenient and easy-to-use CNC system configuration and installation environment. The software structure of numerical control system based on RT-Linux is shown in figure 2, and its applications are distributed in real-time and non-real-time areas. Real-time task is a kind of kernel task that can be composed of multiple threads, which works in the real-time zone of the kernel mentality of the operating system, calls the real-time core to provide POSIX Poitahle Operating System Interface} portable operating system interface) real-time standard interface functions and extended interface services to obtain the required real-time functions. Because real-time tasks need to use limited system resources and require fast work, they often carry out a simple real-time processing. The user processes located in the non-real-time area can make use of a large number of resources provided by the conventional Linux operating system, such as network function (Network Function), graphics function (Graphics Function), window system (Windows System), data analysis package (Data Analysis Packages), Linux device driver (Linux Device Divers) and standard POSIX API, etc.
Fig. 2 Software structure diagram of open CNC system based on RT-Linux
(2) Software module division of ONC system
ONC system is a fully modular system structure, and module construction has the characteristics of interchangeability, scalability, interoperability and portability. In this study, based on a comprehensive analysis of the needs of some CNC systems and CNC machine tools at home and abroad, the CNC system software is divided into several basic functional modules on the application layer: servo control module, human-computer interface module, code interpretation module, interpolation module, PLC control module Icano control module), communication module and status monitoring module. Each module is open to the user in the way of interface, and the user can master the start, end and operation process of the module through the prompt of interface parameters and interface information. The interior of different modules is encapsulated in black box, and the external interface is open. On this basis, the construction of the new system is realized, which meets the requirements of the ONC system.
① servo control module: it controls the machine tool actuator to achieve fine interpolation and moves according to the path and speed specified by the NC instruction before the coarse interpolation information obtained by the Ihammer O signal bow and interpolation operation.
② man-machine interface module: this module mainly completes the parameter setting before and during the operation of the system. Such as menu management, program editing, parameter setting and document management and other work.
③ code interpretation module: this module mainly checks the syntax and semantics of the part program written by the user according to the syntax rules of the input NC machining program, and carries on the decoding work, separates and extracts all kinds of machining information given in the NC source code, turns it into various states and data, and then stores the processing results in the buffer, waiting for the call of other modules.
④ interpolation module: responsible for mathematical preprocessing, acceleration and deceleration control, insertion
Make up, end point discrimination and other work, output to the position controller through the trajectory operation of the feed.
⑤ PLC control module: this module mainly completes the auxiliary function and logic control of the machine tool, as well as the handling of unexpected events such as machine tool alarm error, emergency stop and so on.
⑥ communication management module: complete the real-time communication and network communication between systems.
⑦ status monitoring module: monitor spindle speed, pressure, cutting force and so on.
In this paper, according to the hierarchical division of the open control system, the application software module of the CNC system is divided into two parts: the application unit and the control unit, as shown in figure 3. In the application, Yuanyuan provides users with a graphical application software environment and standard system functions, including operation menu of operation interface, human divination spring display, parameter setting, file answering, processing programming, etc.). The control unit is equivalent to an efficient NC-PLC kernel, which completes the basic NC functions, including decoding, mathematical preprocessing, interpolation, Imax O processing, real-time status monitoring and so on. According to the different real-time requirements of tasks, the control unit is divided into real-time tasks and non-real-time tasks, and the tasks with low real-time requirements, such as compilation, preprocessing and status monitoring, are executed in the non-real-time domain, while the tasks with high real-time requirements, such as interpolation and Iramo processing, are executed in the real-time domain. RT-Linux schedules real-time tasks and non-real-time tasks according to priority.
Fig. 3 Software module structure of open CNC system
At this point, I believe you have a deeper understanding of "what is the implementation principle of Linux?" you might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.