The block diagram of a typical programmable controller is shown in Figure 6-17.
Figure 6-17 Typical PLC block diagram
Circuit Configuration
A programmable controller usually consists of an input unit, an output unit, a central processing unit, an input/output (I/O) interface, a peripheral interface, and a power supply.
Input unit
The function of the input unit is to process the input signal into a signal that can be received by the central processing unit. PLC often uses switch quantities as signal elements of the input unit. Input units are divided into DC input type and AC input type. Each PLC has several input units with the same circuit structure, and they have a common terminal COM. The typical circuit of the PLC DC input unit is shown in Figure 6-18 (a).
Figure 6-18
The DC input unit is composed of a control power supply (such as 24V), a level conversion circuit (R1, R2 voltage divider), a filter circuit (R2, C), a switch status indicator LED, a photocoupler PEB, a directional diode VD, and an internal circuit. The power supply of the input unit can be supplied from within the PLC or configured from outside the PLC.
Each DC input unit can be equivalent to an input relay as shown in Figure 6-18 (b). The input relay is a storage unit inside the PLC, with the storage unit states "0" and "1" (representing the "off" and "on" of the relay coil, respectively). This input relay can provide any number of normally open contacts and normally closed contacts for programming the PLC internal control circuit. Since the input relay can only be driven by external signals and cannot be driven by instructions inside the program, in the PLC control schematic diagram compiled using ladder diagrams, the input relay only has contacts but no coils. The on-off state of the input relay contacts is stored in the PLC internal register. When the switch S is closed, the input relay is turned on, its normally open contacts are closed, and its normally closed contacts are disconnected. Since there is no wire connection between the coil of the input relay and the circuit and between the contacts and the circuit, it is called a "soft relay".
Output unit
The function of the output unit is to convert the PLC output signal into the output signal required by the external load. PLC has multiple output modes such as relay output, transistor output and bidirectional thyristor output. The typical circuit of the PLC relay output unit is shown in Figure 6-19 (a).
Figure 6-19
The resistor R and the light-emitting diode LED in the circuit form an output status display circuit. When the internal circuit outputs a signal, the LED is lit, the coil of the output relay is energized, its normally closed contact opens, and its normally open contact closes. The relay, as a switching device, completes the connection between the load and the load power supply; the relay, as an isolation device, isolates the load circuit from the internal circuit of the PLC.
Each output unit can be equivalent to an output relay as shown in Figure 6-19 (b), and the output relay is driven by the internal program of the PLC. There are two types of contacts of the output relay: one is the internal contact constituted by software, namely the soft contact; the other is the external contact constituted by the output module, namely the hard contact. The output relay can provide any number of normally open soft contacts and normally closed soft contacts for programming of the internal control circuit of the PLC. The on-off state of the output relay soft contact is saved in the internal register of the PLC. The external hard contact constituted by the output module has a certain load capacity and can only be used to drive external components.
CPU
The central processing unit includes a microprocessor (CPU) and memory, etc.
The microprocessor is the core component of the PLC, coordinating the work of various parts within the control system. The CPU receives and stores the user program and data input by the programmer according to the functions assigned by the system program, monitors and receives field input signals, reads and executes the user program from the memory one by one, and then implements output control based on the operation results, and diagnoses the power supply status, the internal working status of the PLC, and the programming syntax status.
The memory is the unit where the PLC stores system programs, user programs and operating data. The memory includes read-only memory ROM and random access memory RAM. ROM is used to store system programs, and its content is customized by the PLC manufacturer during the manufacturing process of the device and cannot be changed. RAM is used to store user programs, and its content can be compiled according to the user's requirements for the equipment control process, and can meet the user's requirements through debugging and modification.
Input/Output Interface
The input/output interface is the conversion interface between the input signal and the output control signal when the PLC performs industrial control. The internal signal of the PLC CPU adopts the standard level of the microcomputer, while the electrical signals of the PLC control object vary greatly. Different signal sensing elements (such as buttons, switches, sensors, etc.) and different actuators (such as solenoid valves, relays, contactors, motors, lights, etc.) have different levels and signal quality. Therefore, it is necessary to convert the state signal of the control object into the standard level of the CPU through the input interface, and convert the standard level of the CPU processing result input into the signal form required by the actuator through the output interface.
When the number of input and output points required by the user exceeds the number of input and output points of the PLC, the number of input and output points can be expanded through the I/O expansion port.
power supply
There are four types of PLC power supplies, namely input power supply 1, output power supply 3, PLC internal working power supply 2 and backup power supply (not shown in Figure 6-17). Input power supply 1 is the power supply for PLC field input signals; output power supply 3 is used to drive the load at the PLC output end; power supply 2 is mainly used for the central processing unit; backup power supply (lithium battery) is used to prevent information loss in RAM when the system is shut down or suddenly loses power. The service life of lithium power supply is 3 to 5 years.
Working Principle of Programmable Controller
How PLCs Work
PLC works in scanning mode, and its working process is divided into five stages: local diagnosis stage, communication request detection stage, input sampling stage, program execution stage and output refresh stage, as shown in Figure 6-20.
(1) Local diagnosis stage
The self-diagnosis program is executed first during each scan, and its diagnostic content includes checking the I/O part, CPU processor, and peripheral interface, etc. If an abnormality is found, the machine will stop and display an error.
(2) Communication request detection phase
This stage mainly detects whether the programmer or computer has a communication request. If there is a communication request, it will perform corresponding processing, such as receiving the programmer's program, commands and various data, and sending the status, data, error information, etc. to the programmer or computer for display.
(3) Input sampling stage
Figure 6-20 PLC working mode block diagram
Once the PLC is running, regardless of whether the input terminals are connected or not, it reads the status of all input terminals in sequence in a scanning manner, saves it in the input status register area of the memory, and then enters the program execution stage.
(4) Program execution phase
The PLC executes the program according to the input status and its related parameters, and passes the execution result to the next step, and writes the execution result into the output status table register area of the memory for storage.
(5) Output refresh phase
After the program is executed, all output status signals in the output status table register area are sent to the output latch circuit so that the output unit can convert the digital signal into a field signal and transmit it to the actuator.
The PLC will continue to repeat the above five steps until the system issues a shutdown command.
Ladder diagram working principle
PLC uses virtual relays (soft relays) with logical relationships between input and output signals to achieve circuit control requirements. Soft relays include input relays, output relays, auxiliary relays, temporary storage relays, holding relays, auxiliary memory relays, link relays, timers and counters, etc.
The auxiliary relay is a program relay that cannot read external input signals or directly drive external loads. It only acts as an intermediate relay.
The PLC control relationship diagram composed of the contact symbols, coil symbols and the codes (or operands) on these symbols of the soft relay is called a ladder diagram. The ladder diagram is similar to the electromagnetic relay control circuit. The control between the input and output in the electromagnetic relay control circuit is realized by the actual switch contacts, coils and their connections of various relays. The control between the input and output signals in the PLC is realized by the user program stored in the PLC and some external circuits. The language list that expresses the control relationship in the ladder diagram is called an instruction table. Entering the instructions and data in the instruction table into the PLC is an application program.
Figure 6-21 is a wiring diagram for direct starting of a motor controlled by a PLC, which includes a ladder diagram and an instruction table.
Previous article:What is an R-type step-up transformer and how does it help boost electrical voltage?
Next article:Features and applications of MS8829 brushless DC motor
Recommended ReadingLatest update time:2024-11-16 10:51
- Popular Resources
- Popular amplifiers
- Huawei's Strategic Department Director Gai Gang: The cumulative installed base of open source Euler operating system exceeds 10 million sets
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- Power Inverter - A critical safety system for electric vehicles
- Analysis of the information security mechanism of AUTOSAR, the automotive embedded software framework
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
- IMX6-A9 series: display function test
- Flathead RVB2601 board ultrasonic ranging
- Gifts redeemed
- Let’s talk about creativity with the contestants
- The square wave filters out the third harmonic distortion. What is the cause of the distortion? How to improve it? Please help.
- USB Memory Stick Development Kit for TMDX5535EZDSP Series
- STLINK V3SET cannot emulate STM32H750
- Summary of knowledge points for getting started with STM32 microcontrollers
- 【GD32E503 Review】+ SX1278 Module Transplantation
- Audio preamplifier circuit gain setting problem?