Design and Implementation of Embedded PLC Based on RT-Linux (Figure)

introduction

In CNC machine tools, the machine tool switching signal is usually controlled by a programmable controller (PLC). PLC has high reliability and is easy to use. However, in most CNC machine tools, especially economical CNC machine tools, the number of input and output points required is not much, usually below 60 points. Therefore, in order to reduce the cost of CNC machine tools, it can be used in CNC systems based on industrial PCs. The switch I/O board is connected with an external relay, and the machine software is used to control the machine tool switch. However, if the PC uses a single-tasking operating system (such as DOS), all tasks of the CNC system are placed in an overall message loop, the software is modular and maintainable, the risk of system failure is relatively concentrated, and can not Make full use of PC system resources. When using a non-real-time multi-tasking operating system (such as Windows), the design of Win32API does not take into account the development of real-time environment, the system call efficiency is not high, can not meet the real-time requirements of CNC system control.

To this end, this paper proposes an embedded PLC based on RT-Linux operating system, which utilizes RT-Linux's open, modular and extensible system structure features and multi-threaded/multi-tasking system environment to ensure real-time performance. At the same time, the risk of failure is relatively dispersed.

Hardware structure of CNC embedded PLC

The hardware of the CNC system is built on the open system of the general industrial PC. The embedded PLC hardware of the CNC system includes: industrial computer and its peripheral equipment, switch input and output interface card based on ISA bus, photoelectric isolation module and relay output module. Its structure is shown in Figure 1.

The industrial computer adopts RedHatLinux810+RTLinux311 operating system. The man-machine interface, numerical control code processing, trajectory planning, parameter management and PLC control of the numerical control system are realized by software through the industrial computer. No independent PLC controller is needed, and the numerical control system is reduced. The dependence of hardware helps to improve the openness of the system.

The I/O input and output information is exchanged between the host and the servo interface module and the I/O interface module through the PC I/O interface card. The PC I/O interface card is based on the ISA or PCI bus.

RT-Linux architecture

RT-Linux is a 32-bit hard real-time operating system based on Linux and running on a variety of hardware platforms.

It inherits the design philosophy of the MERT system, which is based on a general-purpose operating system and provides both real-time services in the strict sense and all standard POSIX services in the same operating system. The RT-Linux source code is open, easy to modify, and the system cost is reduced. The disclosure of the source code makes the development of the numerical control system free from the dependence on foreign software companies, and is conducive to improving the localization degree of the numerical control software.

RT-Linux is a multi-tasking real-time operating system based on Linux and running on multiple hardware platforms. By modifying the hardware layer of the Linux kernel, using interrupt simulation technology, a small and efficient real-time kernel is implemented between the kernel and the hardware, and a small real-time system is formed on the basis of the real-time kernel, and the Linux kernel is only used as a real-time system. The lowest priority task runs. For the general X86 hardware architecture, RT-Linux has excellent real-time performance and stability. The maximum interrupt latency is no more than 15μs, and the maximum task switching error is no more than 35μs. These real-time parameters are independent of the system load, and depend on the hardware of the computer. For example, on a normal PC with PII350 and 64M memory, the maximum delay time of the system is less than 1μs. RT-Linux is divided into real-time domain and non-real-time domain according to real-time performance. Its structure is shown in Figure 2.

The real-time domain is designed to follow the design principles of real-time operating systems, that is, the system is transparent, modular, and scalable. The real-time kernel of RT-Linux consists of a core part and multiple optional parts. The core part is only responsible for high-speed interrupt processing, supports SMP operations and is not delayed or reentered by the underlying synchronization or interrupt routines. Other functions are augmented by dynamically loadable modules. RT-Linux leaves operations that do not affect the real-time nature of the system (ie, operations in non-real-time domains) to non-real-time Linux systems. Linux based on multi-tasking environment provides rich system resources for software development, such as multiple inter-process communication mechanisms and flexible memory management mechanisms.

Next page

What is WPC ?

Unique and award winning WPC Deck Plus offers a fresh new look and performance specially designed for warmer climates and hard use. The eco-friendly composite decking requires minimal maintenance and yet looks good over time. Designed and manufactured in Europe, WPC Deck Plus combines material technology and recycling know-how to achieve a high performance product that actually helps the environment.

Material innovations in harmony with nature

WPC Deck Plus is a stylish decking system manufactured from a durable and environmentally innovative wood plastic composite. The main raw material is recycled paper and plastic from self adhesive labels. As there is no other significant re-cycling process for the label surplus material, the manufacture of each 1m2 of WPC Deck Plus locks up 18,4kg of CO2 that would otherwise be released into the atmosphere by the disposal of the label waste. WPC Products can after their long life cycle be recycled into energy or even re-ground and converted into new WPC products. All materials are non-toxic, no PVC is used.


WPC Decking Board


WPC Decking


Long lasting beauty
Unlike wood or other wood plastic composites, WPC is lignin-free resulting in better colour stability. In order to perform well in warmer climates, it has extra UV resistance and features an aluminium railing system that not only looks good, but maintains stiffness throughout the seasons: it also enables closed deck solutions. WPC Deck Plus boasts a unique surface that combines high friction with low moisture absorption. It is hard enough to resist stiletto heels or furniture, and yet splinter free and comfortable for bare feet.
Ingenious structure
The hollow core structure makes the profiles sturdy, yet easy and light to handle. The weight of one meter of WPC Deck Plus is 2.7 kg. The hollow structure also enables the use of hidden fastening and allows electrical cables to be run unexposed inside the profiles.
Low maintenance
WPC Deck Plus keeps its look well over time. Being lignin-free it does not suffer from the usual "wood greying effect". There is no need to sand, varnish or paint the decking, only periodical cleaning with a pressure hose is enough.
Quick and easy to install
WPC Deck Plus installation system has been designed for ease, speed and perfect finish. With no knots or other defects and every piece produced with same accurate dimensional tolerances, waste is reduced and installation speed increased. The cover strips provide a professional finish to the edges of the deck.

WPC Decking Board

Wood Plastic Floor, WPC Floor, WPC Decking Board, Wood Plastic Composite Decking, WPC Decking Floor, Wood Plastic Decking, Wood Plastic Decking Board

Shangyu YongSheng New Material Co., Ltd. , http://www.wpc-deckingboard.com