A Programmable Logic Controller is essentially a computer specifically designed for industrial control, with a hardware structure similar to that of a microcomputer, consisting of:
The power supply of the programmable logic controller plays a crucial role in the entire system. Without a good, reliable power supply, normal operation is impossible. Therefore, manufacturers of programmable logic controllers pay great attention to the design and manufacturing of power supplies. Generally, if the AC voltage fluctuation is within +10% (+15%), the PLC can be directly connected to the AC power grid without additional measures.
2. Central Processing Unit (CPU)
The CPU is the control center of the programmable logic controller. It receives and stores user programs and data input from the programmer according to the functions assigned by the PLC system program; checks the status of the power supply, memory, I/O, and watchdog timer, and can diagnose syntax errors in the user program. When the PLC is put into operation, it first scans the status and data of various input devices in the field and stores them in the I/O image area, then reads user programs from the user program memory one by one, interprets commands, and executes logical or arithmetic operations based on the instructions, sending the results to the I/O image area or data registers. After executing all user programs, it finally transfers the output status from the I/O image area or data in the output register to the corresponding output devices, repeating this cycle until stopped.
To further enhance the reliability of programmable logic controllers, redundant systems with dual CPUs or voting systems with three CPUs have been adopted in recent years for large PLCs. Thus, even if one CPU fails, the entire system can continue to operate normally.
The memory that stores system software is called system program memory.
The memory that stores application software is called user program memory.
4. Input/Output Interface Circuit
1. The field input interface circuit consists of optocoupler circuits and the input interface circuit of the microcomputer, serving as the input channel for the programmable logic controller and field control interface.
2. The field output interface circuit integrates output data registers, gating circuits, and interrupt request circuits, allowing the programmable logic controller to output corresponding control signals to field actuators through the field output interface circuit.
Such as counting, positioning, and other function modules.
Working Principle: When the programmable logic controller is put into operation, its working process generally consists of three stages: input sampling, user program execution, and output refresh. Completing these three stages constitutes one scan cycle. Throughout the operation, the CPU of the programmable logic controller repeatedly executes the above three stages at a certain scanning speed.
During the input sampling stage, the programmable logic controller reads all input statuses and data sequentially in a scanning manner and stores them in the corresponding units of the I/O image area. After input sampling is complete, it transitions to the user program execution and output refresh stages. In these two stages, even if the input status and data change, the states and data of the corresponding units in the I/O image area do not change. Therefore, if the input is a pulse signal, the width of that pulse signal must exceed one scan cycle to ensure that the input can be read under any circumstances.
2. User Program Execution Stage
During the user program execution stage, the programmable logic controller always scans the user program (ladder diagram) sequentially from top to bottom. When scanning each ladder diagram, it first scans the control lines composed of various contacts on the left side of the ladder diagram, performing logical operations on the contacts from left to right and top to bottom, then refreshing the status of the corresponding bit in the system RAM storage area or the I/O image area based on the results of the logical operations; or determining whether to execute the special function instructions specified in the ladder diagram.
That is, during the user program execution, only the input points in the I/O image area will not change their status and data, while other output points and soft devices may change their status and data in the I/O image area or system RAM storage area, and the execution results of the ladder diagrams above will affect the ladder diagrams below that use these coils or data; conversely, the refreshed states or data of the logic coils in the ladder diagrams below can only take effect on the ladder diagrams above in the next scan cycle.
During program execution, if immediate I/O instructions are used, they can directly access I/O points. That is, when using I/O instructions, the values in the input process image registers will not be updated, and the program directly retrieves values from the I/O module, while the output process image registers will be immediately updated, which differs from immediate input.
After the user program scan is complete, the programmable logic controller enters the output refresh stage. During this period, the CPU refreshes all output latch circuits according to the corresponding statuses and data in the I/O image area, then drives the corresponding external devices through the output circuits. This is the true output of the programmable logic controller.
Functional Features: Programmable logic controllers have the following distinct features.
1. Flexible system composition, easy expansion, with switching control as its specialty; can also perform continuous process PID loop control; and can form complex control systems with host computers, such as DDC and DCS, achieving comprehensive automation of production processes.
2. Convenient to use, simple programming, utilizing clear ladder diagrams, logic diagrams, or statement lists without requiring computer knowledge, leading to short system development cycles and easy on-site debugging. Additionally, programs can be modified online to change control schemes without dismantling hardware.
3. Capable of adapting to various harsh operating environments, with strong anti-interference capabilities and high reliability, far exceeding other models.
Disclaimer:This article is a network repost, and the copyright belongs to the original author.The reposted articles do not represent the views of this public account or its authenticity.Due to the numerous reposts, it is impossible to confirm the true original author. If there are any copyright issues, please contact us in a timely manner, and we will delete the content to ensure your rights!
If you like it, give it alook