New Use of Single Chip Microcomputer as PLC

Publisher:幸福的家园Latest update time:2012-02-07 Source: 自动化技术与应用 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

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.

Reference address:New Use of Single Chip Microcomputer as PLC

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

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号