1 Introduction
Programmable Logic Controller (PLC) is the product of the combination of microcomputer technology and conventional relay control technology. It is a new type of controller developed on the basis of sequential controller and microcomputer controller. Its high reliability, simple and intuitive programming method that is easy to master, and increasingly perfect functions have made it widely used in the field of industrial control, especially in specific occasions and large-scale control systems. However, it also has some shortcomings: limited memory, difficult programming optimization and debugging; high price; poor targeting. When the environmental conditions are good, the control volume is not large, the control logic is not complicated, and the control requirements are not high, its advantages cannot be fully utilized, and the cost of the control system will increase.
In view of this, it is obviously practical to design targeted small-scale economic control systems according to different control purposes, the working mode and control concept of PLC.
The single-chip microcomputer has strong switching logic memory, judgment, data calculation and processing capabilities, and has the characteristics of small size, diversified functions, high reliability and low price. Therefore, the single-chip microcomputer can be used to add some input circuits to form a microcomputer PLC to complete various automatic controls. The advantages of microcomputer PLC are: compact system structure, low cost, strong pertinence, and expansion of I/O interface according to needs during design, selection of input and output circuits and device types and memory capacity, which can more conveniently and flexibly construct a control system suitable for oneself without unnecessary waste, and still maintain the advantages of PLC in terms of control performance.
2. Microcomputer PLC system structure
Switching logic and sequential control are the most basic application scopes of PLC. PLC can replace traditional relay control, sequential control, etc. For example, the automatic control of the machining process of modular machine tools can generally be completed by PLC. Here we give an example of a control system for a modular machine tool. The modular machine tool has the function of multiple tools working simultaneously and automatically cycling. It is controlled by a microcomputer PLC composed of a single-chip microcomputer plus input and output circuits. This system can not only fully realize the switching logic and sequential control of the machine tool, but also has the characteristics of the PLC system for various switching logic and sequential control. The hardware structure schematic diagram is shown in Figure 1, and the software flow chart is shown in Figure 2.
According to the number of input and output signal points, several I/O interfaces are expanded, and the interface uses 8255A. According to the actual application needs, the input circuit should have photoelectric coupler isolation, RC filter to eliminate jitter and noise, level conversion, etc. In this example, it inputs the status signals of multiple travel switches and pressure relays. The output circuit can have transistor output type, relay output type, thyristor output type, etc. In this example, DC solid-state relays and AC solid-state relays are used to control the on and off of the electromagnet and the start and stop of the motor.
The system software design adopts the PLC's cyclic scanning working mode. This serial working mode avoids the problems of contact competition and timing distribution in the relay control system. In order to cooperate with this working mode, the system has an I/O image area in the memory to store field data and operation processing results. Each scanning cycle is divided into three stages: input sampling, logical relationship processing and data refresh, and output control. In the input sampling stage, all machine tool switch input signals (the main command signals of each step of the system) are read in sequence, and the read data is stored in the corresponding input image register in the memory. Then, the input and output image register data and status are logically operated and processed, and the content of the output image register is refreshed according to the results. In the output control stage, the status in the output image register is sent to the output interface circuit in the form of a control signal to control the external load.
3 Conclusion
The new method of using a single-chip microcomputer to realize PLC functions has certain reference value and broad application prospects for the automation transformation and utilization of old equipment, machine tool automatic control and small automatic control systems.
Previous article:Design and implementation of automatic variable step length of frequency selection table based on single chip microcomputer
Next article:Hardware Design of Serial Communication between PC and Single Chip Microcomputer
- Popular Resources
- Popular amplifiers
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- The voltage of the TPS73033 buck chip drops to 0.7V after the load is connected
- Wi-Fi 6 is here to provide network coverage for the entire home. Will you adopt it?
- Common APDU instruction error codes for CPU cards
- [GigaDevice GD32F310 Review] +ADC Data Collection
- [Mill Edge AI Computing Box FZ5 Review] Development Board Target Classification Demo
- [Domestic RISC-V Linux Board Fang·Starlight VisionFive Trial Report] GPIO Development Basics: From Principle to Practice
- Please ask senior programmers to help look at this problem
- How to use MSP430 to implement PWM signal
- Internal circuits of CH551, CH552, CH554, CH559
- [Zero-knowledge ESP8266 tutorial] Quick start 29 How to use the nine-axis sensor module