How PLC works
PLC works in a "sequential scanning, continuous loop" mode. That is, when the PLC is running, the CPU performs periodic loop scanning according to the instruction step number (or address number) according to the program compiled by the user according to the control requirements and stored in the user memory. If there is no jump instruction, the user program will be executed sequentially from the first instruction until the program ends. Then it returns to the first instruction and starts the next round of scanning. In each scanning process, the sampling of input signals and the refreshing of output status must be completed.
A PLC scan cycle must go through three stages: input sampling, program execution and output refresh.
In the input sampling stage of PLC: firstly, the on/off status or input data of all input terminals temporarily stored in the input latch are read in sequence by scanning mode, and written into the corresponding input status register, i.e., the input is refreshed. Then the input port is closed and the program execution stage is entered.
During the program execution phase, the PLC scans and executes each instruction in the order in which the user program instructions are stored. After the corresponding calculations and processing, the results are written into the output status register. All contents in the output status register change as the program is executed.
Output refresh phase: When all instructions are executed, the on/off status of the output status register is sent to the output latch in the output refresh phase, and is output in a certain way (relay, transistor or thyristor) to drive the corresponding output device to work.
How PLC works
PLC working process PLC adopts
The working mode is "sequential scanning and continuous looping". This process can be divided into three stages: input sampling, program execution, and output refresh. The time required to scan and execute the entire process once is called a scanning cycle.
(1) In the input sampling phase, the PLC sequentially reads the on/off status or input data of all input terminals in a scanning manner and stores this status in the input image register, i.e., input refresh, and then enters the program execution phase. During program execution, the input status changes, but the content of the input image register does not change. It can only be read in the input processing phase of the next scan cycle.
(2) During the program execution phase, the PLC executes program instructions in the order of left first, right second, top first, bottom first. The process is as follows: the on/off status of the relevant components is read from the input image register and other component image registers, and logical operations are performed according to the user program, and the operation results are stored in the relevant image registers.
(3) After all instructions are executed, the on/off status of the output image register corresponding to each physical relay is transferred to the output register during the output refresh phase to control the on/off of each physical circuit breaker. This is the actual output of the PLC.
It can be seen from the working process of PLC that during the program execution phase of PLC, even if the input changes, the content of the input status register will not change immediately, and will have to wait until the next cycle input processing phase to change. The output signal temporarily stored in the output status register will be output to the output latch when a cycle ends, and then it becomes the actual CPU output. Therefore, the change of all input and output states requires a scan cycle. In other words, the input and output states are maintained for one scan cycle.
Previous article:Range of variable frequency motors
Next article:How big are two-phase motors? How to connect capacitors for two-phase motors?
Recommended ReadingLatest update time:2024-11-17 03:55
- 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!
- Rambus Launches Industry's First HBM 4 Controller IP: What Are the Technical Details Behind It?
- 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
- [RISC-V MCU CH32V103 Review] + ADC analog watchdog
- I2C Range Extension Reference Design: I2C to CAN
- Application of Aigtek power amplifier in performance study of electrokinetic migration-capture-release of Pb-contaminated municipal sludge
- Recently, the project department has taken on a new project, which requires the performance indicators of IC to meet industrial requirements. Can someone recommend...
- I would like to ask for advice from all the experts. How can a fully enclosed metal shell increase the signal strength of NB?
- About the problem of small current driving large current load
- The power supply cannot be completely turned off. There is a leakage of 4~5MA. I hope an expert can give me some advice.
- The working principle and function of oscilloscope triggering
- Gigabit Network Contactless Connector-SK202 Evaluation Report 2: Research on ST-60
- EEWORLD University Hall----Live Replay: When intelligence meets industry, how can technology be implemented?