Plc is essentially a computer dedicated to industrial control, and its hardware structure is basically the same as that of a microcomputer. a. Central Processing Unit (CPU) The central processing unit (CPU) is the control center of the PLC. It receives and stores user programs and data typed from the programmer in accordance with the functions assigned by the PLC system program; checks the status of the power, memory, I/O, and watchdog timers, and can diagnose syntax errors in the user program. When the PLC is put into operation, it firstly receives the status and data of each input device in the scanning mode, and stores them in the I/O image area respectively, then reads the user program one by one from the user program memory, and then presses the command after interpretation. The result of the instruction execution logic or arithmetic operation is sent to the I/O map area or data register. After all the user programs have been executed, the output status of the I/O image area or the data in the output register is finally transferred to the corresponding output device, and the operation is cycled until the operation is stopped. In order to further improve the usability of the PLC, in recent years, large-scale PLCs have also adopted a dual CPU to form a redundant system, or a three-CPU voting system. This way, even if a CPU fails, the entire system will still operate normally. b, memory The memory that holds the system software is called the system program memory. The memory that holds the application software is called the user program memory. C, power supply The power of the PLC plays an important role in the entire system. If there is not a good, reliable power system that does not work properly, PLC manufacturers also attach great importance to the design and manufacture of power supplies. Generally, the AC voltage fluctuation is in the range of +10% (+15%), and the PLC can be directly connected to the AC grid without taking other measures.