At present, computer technology has made rapid development and made great contributions to social progress. The reasonable combination of computer technology and relay control technology directly promotes the emergence of programmable logic controller (PLC). PLC plays an important role in modern industry and has a very broad application prospect. However, due to the drawbacks of the operation system of PLC and the development system itself, the demand of some high-end applications can not be met.
Through the research and analysis of the programmable automation controller based on ARM-Linux, this paper hopes to solve the above problems effectively. Compared with PLC, programmable automatic controller (PAC) has more advantages. It can meet the needs of high-end applications in network communication, openness, and control algorithm.
At the same time, the performance of PAC is more reliable and stable, which plays a vital role in the future development of industrial control automation. In this paper, through the understanding of the working principles and characteristics of the PAC operation system, combined with the software structure and hardware structure, a general development platform of programmable automation controller with open performance is designed under the framework of ARM Linux hardware and software. The emergence and development of programmable automation controller (PAC) plays an important role in the traditional industrial automation control system. As a new type of controller, it has the performance of replacing and expanding the programmable controller. With the support of modern computer technology and network technology, the data form, control function, communication mode and hardware structure of programmable automation controller are more complete and advanced. By separating the development system from the operation system, it is conducive to the development, upgrade and maintenance of software in the future, and it is also convenient to transplant the operation system to different hardware platforms. As the core component of PAC, the operation system completes the control and management by completing the communication work, input processing, execution processing, output processing and database, etc. the development system is mainly in the computer system, and executable code is generated on the basis of programming. The development system can fully improve the development efficiency of PC under the broad development environment. The development system mainly includes database module, thermostatic element interface module and PLC simulator. From the execution point of view of the running system, PAC can be divided into two parts: interpretative and compiled. Compiled user program compiles instructions into codes in advance while keeping the code executable, which is helpful to avoid the process of scattering and searching instructions; while interpreted PAC mainly receives instructions, interprets and executes instructions by the PLC virtual machine, and then executes them step by step, which has the characteristics of low execution efficiency and weak portability. Usually, PAC hardware structure is mainly composed of relay output circuit, peripheral circuit, ARM development board, AD conversion circuit, PWM circuit, and optocoupler input devices. Under the influence of photoelectric isolation, the amount of external input is connected with the input port of ARM, then processed by CPU, and finally output by transistor circuit or relay. The software structure of PAC running system is generally composed of application program and system program.
The system program is also composed of PAC system program and Linux operation system. The PAC system program can support the function sub functions and the running environment. The Linux operation system can accomplish all tasks of the system, such as clock management, storage allocation, interrupt management, task scheduling, and provide users with functions such as database, network, interface exchange, and driver. User program instructions are passed to the operating system based on the running environment, and then the operation system is implemented with the help of the driver.
The running system of compiled PAC consists of system initialization, loading user program, communication program, scanning input, scanning output, downloading program and system self-checking program. The main process of system operation is as follows: firstly, the initialization of Linux and Uboot programs; secondly, the application of data areas such as C, M, T, X, Y, or program areas; secondly, the establishment of running environment, including clock threads, management threads, interface threads, task execution threads and so on. Finally, according to the PAC working mode, the debugging stage, the running stage and the stopping stage are carried out in turn. Soft PLC mainly includes C counter register, M auxiliary register, X input port register, Y output port register, T timer register and so on. The instructions of this system are mainly composed of the following parts: basic instructions, data type conversion, data comparison instructions, data shift instructions, data selection instructions, mathematical operations, as well as string processing, communication, counter, analog-to-digital conversion and other algorithm modules. The compiled running system in PAC has the functions of system initialization, signal communication, input, program download, loader, output and system self-checking. The flow chart of the system operation is shown in Figure 1. In PAC system, initialization program is needed. First of all, initialization of Linux and Uboot are needed.
After initialization, the system applies for data interval and program interval, such as output register, input register, time register, count register and auxiliary register. After completing the application of program and data space, the system will create threads, including clock threads, task threads and interface threads. After establishing threads, the system will complete the establishment of soft PLC running environment. Like traditional PLC, PAC also has three operation modes, namely debugging mode, operation mode and stop mode. For PAC, in debugging mode, after initialization, the system scans the input, network ports and serial ports, and stores the program BIN downloaded by PC communication module into a user sequence area, leaving it to load commands and execute commands. In the running mode, after the system is initialized, the input is scanned, but the program in the user sequence area is loaded and used directly instead of scanning the network and serial ports. Like PLC, the working process of the system can be divided into three parts, i.e. input part, execution processing part and output part. The combination of these three parts is a scanning cycle. When the system is finished, the end process command will be executed, and the shutdown information will be sent. When the program receives the end instruction, it will stop running immediately, and cancel all the threads established, releasing more resources to ensure the smooth operation of the PAC system. PAC is developed on the basis of PLC and has the characteristics of PLC program execution.
It needs to execute loading program step by step.
Therefore, the logic of program is very important, and usually it is implemented step by step from front to back, so as to get the final result, which belongs to the serial mode of work. The lag time caused by this mode usually does not exceed two scanning cycles. In the control system without special requirements, the influence of lag time is insignificant, while a few control systems require high precision. The control process needs to achieve the effect of “keep the line stationary”, so we need to improve the sensitivity of the PAC system, reduce the lag time and achieve better precision control. Generally speaking, the programmable automatic controller (PAC) fully draws on the advantages of PLC and PC, and its technical performance is further optimized. With the development and perfection of technology, it will directly affect the development of industrial automation and will become the key factor of control system. PAC not only promotes the automation technology, but also has trans-era significance in the design and integration of controllers. Therefore, the relevant researchers must do a good job of further research on PAC, in order to promote the step-by-step development of automation technology in China.