PLC Structure and Functions of Each Component
PLCs come in many types, with varying functions and instruction sets, but their structure and working principles are largely similar. They typically consist of several main parts, including the main unit, input/output interfaces, power supply expansion interfaces, and external device interfaces. The hardware system structure of a PLC is shown in the following diagram:
How much do you know about the six common applications of PLC?
1. Host
The main unit includes a central processing unit (CPU), system program memory, and user program and data memory. The CPU is the core of the PLC ; it runs user programs, monitors the status of input/output interfaces, makes logical judgments, and processes data. This includes reading input variables, completing various operations specified by user instructions, sending results to the output, responding to requests from external devices (such as computers and printers), and performing various internal judgments. The PLC's internal memory has two types: system program memory, which mainly stores system management and monitoring programs and programs that compile user programs (the system program is fixed by the manufacturer and cannot be changed by the user); and user program and data memory, which mainly stores user-written application programs, various temporary data, and intermediate results.
2. Input/Output (I/O) Interface
The I/O interface is the component that connects the PLC to input/output devices. The input interface accepts control signals from input devices (such as buttons, sensors, contacts, limit switches, etc.). The output interface transmits the processed results from the main unit to output devices (such as contactors, solenoid valves, indicator lights, etc.) via power amplifier circuits. I/O interfaces generally use optocoupler circuits to reduce electromagnetic interference, thereby improving reliability. The number of I/O points, or input/output terminals, is a key technical specification of a PLC. Small PLCs typically have dozens of points, medium-sized PLCs have hundreds, and large PLCs can exceed a thousand.
3. Power supply
The power supply in the diagram refers to the DC switching regulated power supply configured to operate the internal electronic circuits such as the CPU, memory, and I/O interfaces. It also typically provides DC power to input devices.
4. Programming
Programming is the process by which users input, check, modify, debug, or monitor the PLC's operation using external devices. The PLC is connected to a computer via a dedicated PC/PPI cable, and specialized software is used for computer programming and monitoring.
5. Input/Output Expansion Unit
I/O expansion interfaces are used to connect expansion units that increase the number of external input/output terminals to the basic unit (i.e., the host).
6. External device interface
This interface allows external devices such as printers, barcode scanners, and frequency converters to be connected to the host computer to perform corresponding operations.
The experimental setup provides two main unit models: Siemens S7-200 series CPU224 (AC/DC/RELAY), with 14 input points and 10 output points; and CPU226 (AC/DC/RELAY), with 26 input points and 14 output points.
Basic characteristics of PLC
1. Feature-rich
PLCs have a wide range of functions. This is mainly due to their rich instruction set for processing information and their internal devices for storing information.
It has dozens or even hundreds of instructions, capable of handling all sorts of logical problems and performing calculations on various types of data. It can do everything that a regular computer can do.
Its internal components, namely the data storage area in memory, are diverse and have a large capacity. I/O relays can store input and output information ranging from tens or hundreds to thousands, tens of thousands, or even hundreds of thousands. This means that it can perform input and output information transformations for so many I/O points and perform such large-scale control.
2. Easy to use
Using a PLC to control a system is very convenient. This is because: firstly, the PLC control logic is established through a program, replacing hardware wiring. Writing a program is much easier than wiring, and modifying the program is much easier than modifying the wiring!
Secondly, PLC hardware is highly integrated, consisting of various miniaturized modules. Furthermore, these modules are配套 (matching/complementary), and have achieved serialization and standardization. PLC manufacturers generally have readily available stock of the modules required for various control systems, making them readily available on the market. Therefore, hardware system configuration and construction are also very convenient.
That's why programmable logic controllers (PLCs) have the word "programmable." In terms of software, their programs are programmable and not difficult to program. In terms of hardware, their configurations are variable and easy to change.
3. Reliable operation
Using a PLC to control a system is highly reliable. This is because PLCs employ numerous measures in both hardware and software to ensure reliable operation. In fact, if a PLC were unreliable, it could not be used in industrial environments and would cease to be a PLC.
4. Economical
The application of advanced technologies will inevitably bring enormous social and economic benefits. This is a manifestation of science and technology as the primary productive force and the source of the vitality of advanced technologies. The same applies to PLCs.
Although the initial investment in using a PLC is larger, it is still economical in the long run. This is because:
Although the initial investment in PLCs is large, their small size and space requirements, coupled with minimal investment in auxiliary facilities, make them cost-effective. They are also reliable, minimizing downtime losses, easy to maintain, and inexpensive to repair. Furthermore, they can be reused and generate added value, leading to a greater return on investment. Therefore, in most cases, their benefits are considerable.
PLC working environment
1. Temperature
PLCs require an ambient temperature of 0~55℃. During installation, they should not be placed under components that generate a lot of heat. The space around them for ventilation and heat dissipation should be large enough, and there should be a gap of more than 30mm between the basic unit and the expansion unit. The top and bottom of the switch cabinet should have ventilation louvers to prevent direct sunlight. If the ambient temperature exceeds 55℃, an electric fan should be installed for forced ventilation.
2. Humidity
To ensure the insulation performance of the PLC, the relative humidity of the air should be less than 85% (no condensation).
3. Vibration
The PLC should be kept away from strong vibration sources to prevent frequent or continuous vibrations with a frequency of 10-55Hz. When vibration is unavoidable in the operating environment, vibration damping measures must be taken, such as using damping adhesive.
4. Air
Avoid environments with corrosive and flammable gases, such as hydrogen chloride and hydrogen sulfide. In environments with high levels of dust or corrosive gases, the PLC can be installed in a well-sealed control room or cabinet with an air purification system. 5. Power Supply: The PLC is powered by 50Hz, 220 (1±10%)V AC. The PLC itself has sufficient immunity to interference from power lines. For applications with high reliability requirements or environments with severe power interference, a shielded isolation transformer with a 1:1 turns ratio can be installed to reduce interference between the equipment and ground. An LC filter circuit can also be connected in series at the power input. The FX series PLC has a 24V DC output terminal, which can provide 24V DC power to input sensors (such as photoelectric switches or proximity switches). When using an external DC power supply at the input, a DC regulated power supply should be selected. Ordinary rectified and filtered power supplies, due to ripple, can easily cause the PLC to receive incorrect information.
Six common applications of PLC
1. Used for on/off control
PLCs have a very strong ability to control switching signals. The number of input/output points they can control can range from a dozen or so to hundreds, thousands, or even tens of thousands. Because they can be networked, the number of points is virtually unlimited. They can control any number of points, and the logic problems they can control can be very diverse: combinational, sequential, real-time, delayed, non-counting, counting-required, fixed-sequence, random, and so on.
The hardware structure of a PLC is variable, and its software is programmable, making it highly flexible for control applications. Multiple sets or groups of programs can be written and called upon as needed. It is well-suited to the needs of industrial environments with multiple operating conditions and state changes.
There are numerous examples of using PLCs for on/off control, spanning industries such as metallurgy, machinery, light industry, chemical engineering, and textiles—almost all industrial sectors require them. Currently, the primary advantage of PLCs, unmatched by other controllers, is their ability to be conveniently and reliably used for on/off control.
2. Used for analog quantity control
Analog quantities, such as current, voltage, temperature, and pressure, change continuously. Industrial production, especially continuous production processes, often requires the control of these physical quantities.
As an industrial control electronic device, a PLC's inability to control these quantities would be a major shortcoming, hence the extensive development efforts by PLC manufacturers in this area. Currently, not only large and medium-sized PLCs can perform analog signal control, but even small PLCs can. For a PLC to perform analog signal control, it needs to be equipped with A/D and D/A units for analog-to-digital conversion. These are also I/O units, but special ones.
The A/D unit converts analog signals from the external circuit into digital signals and then sends them to the PLC; the D/A unit converts digital signals from the PLC into analog signals and then sends them to the external circuit. As a special type of I/O unit, it still retains the characteristics of I/O circuit anti-interference, internal and external circuit isolation, and the ability to exchange information with input/output relays (or internal relays, which are also a section of the PLC's working memory, readable and writable), etc.
In A/D conversion, the "A" usually represents current, voltage, or temperature. In D/A conversion, the "A" usually represents voltage or current. Voltage and current ranges are typically 0-5V, 0-10V, and 4-20mA, with some models capable of handling both positive and negative values. The "D" in small PLCs is usually an 8-bit binary number, while medium and large PLCs are typically 12-bit. A/D and D/A converters can be single-channel or multi-channel. Multi-channel converters require more input/output relays. With A/D and D/A units, the remaining processing is all digital, which is not difficult for PLCs with information processing capabilities. Medium and large PLCs have even stronger processing capabilities; they can perform not only addition, subtraction, multiplication, and division, but also square root extraction, interpolation, and floating-point operations. Some even have PID instructions, allowing them to perform proportional, derivative, and integral operations on deviations to generate corresponding outputs. They can calculate almost anything a computer can. Therefore, implementing analog control using a PLC is entirely possible.
PLCs can be used for analog signal control, and there are also units that combine A/D and D/A converters. They can also be implemented using PID or fuzzy control algorithms, resulting in high control quality. The advantage of using PLCs for analog signal control is that they can simultaneously control analog and digital signals. This advantage is not available in other controllers, or their implementation is less convenient than with PLCs. Of course, for purely analog systems, PLCs may not offer the same performance-to-price ratio as controllers.
3. Used for motion control
In addition to switching and analog quantities, actual physical quantities also include motion control. For example, the displacement of machine tool components is often represented by digital quantities. An effective method for motion control is NC, or Numerical Control technology. This is a computer-based control technology that originated in the United States in the 1950s. It is now widespread and highly sophisticated. Currently, in advanced countries, the CNC rate of metal cutting machine tools exceeds 40% to 80%, and in some cases even higher. PLC is also based on computer technology and is becoming increasingly sophisticated. PLCs can receive counting pulses with frequencies ranging from several kHz to tens of kHz, and can receive these pulses in various ways, including multiple channels. Some PLCs also have pulse output functions, with pulse frequencies reaching tens of kHz. With these two functions, plus the PLC's data processing and computing capabilities, and if equipped with appropriate sensors (such as rotary encoders) or pulse servo devices, various controls can be achieved based on the principles of NC. High-end and mid-range PLCs also have NC units or motion units that can achieve point-to-point control. Motion units can also perform curve interpolation and control curvilinear motion. Therefore, if a PLC is equipped with such a unit, it can be fully controlled digitally using NC methods. The newly developed motion unit even includes a programming language for NC technology, facilitating better digital control using PLCs.
4. Used for data acquisition
With the development of PLC technology, its data storage area is becoming increasingly larger. For example, the data storage area (DM area) of a Dvison PLC can reach 9999 words. Such a large data storage area can store a large amount of data. Data acquisition can use a counter to accumulate and record the number of pulses acquired and periodically transfer them to the DM area. Data acquisition can also use an A/D unit to convert analog signals into digital signals and then periodically transfer them to the DM area. A PLC can also be configured with a small printer to periodically print out the data from the DM area.
The PLC can also communicate with a computer, allowing the computer to read data from the DM area and then process that data. In this case, the PLC becomes a data terminal for the computer.
Electricity users used PLCs to record their electricity consumption in real time, so as to implement different billing methods for different electricity consumption times, and to encourage users to use more electricity during off-peak hours, so as to achieve the goal of rational and economical electricity use.
5. Used for signal monitoring
PLCs have many self-test signals and numerous internal components, yet most users do not fully utilize their capabilities. In fact, they can be used to monitor the PLC's own operation or the controlled object. For a complex control system, especially an automatic control system, monitoring, and even self-diagnosis, is essential. It can reduce system failures, facilitate fault location when they occur, increase the mean time between failures (MTBF), reduce fault repair time, and improve system reliability.
6. Used for networking and communication
PLCs have strong networking and communication capabilities, and new networking structures are constantly being introduced. PLCs can be connected to personal computers for communication, allowing computers to participate in programming and control management of the PLC, making PLCs more convenient to use.
To fully utilize the capabilities of computers, one computer can control and manage multiple PLCs, up to 32 in total. Alternatively, one PLC can communicate with two or more computers to exchange information, enabling multi-computer monitoring of the PLC control system. PLCs can also communicate with each other, either one-to-one or with multiple PLCs, ranging from dozens to hundreds.
PLCs can also network with intelligent instruments and intelligent actuators (such as frequency converters) to exchange data and operate interoperably. They can be connected to form remote control systems with a coverage area of up to 10 kilometers or more. Local area networks can be formed, connecting not only PLCs but also high-end computers and various intelligent devices. Bus networks and ring networks can be used. Networks can also be nested. Networks can be bridged. Networking can organize thousands of PLCs, computers, and intelligent devices into a single network. Nodes in the networks can communicate and exchange information directly or indirectly.
Networking and communication are perfectly suited to the needs of today's Computer Integrated Manufacturing Systems (CIMS) and intelligent factories. They enable industrial control to evolve from point to line to aero, connecting equipment-level control, production line control, and factory management-level control into a unified whole, thereby creating greater efficiency. This infinitely promising future is becoming increasingly clear to our generation.
The above applications focus on quality. In terms of quantity, PLCs come in large and small sizes. Therefore, their control range can also be large or small. Small PLCs control only a single device, or even a single component or station; large PLCs can control multiple devices, a production line, or even an entire factory. It can be said that PLCs are indispensable in industrial control applications of all sizes.