I. System Composition.
II. The function of each part.
1. The CPU, as the computing and control center, acts as the "heart" of the system.
Vertical: When the program input from the programmer is stored in the user program memory, then the CPU...
Based on the functions assigned by the system (the interpreter/compiler of the system program memory), the user program is translated into a user-compiled program recognized by the PLC.
Horizontal: Input status and information are input through the input interface, and the CPU stores them in the working data memory or input image register. Then, the CPU organically combines the data and program, stores the results in the output image register or working data memory, and then outputs them to the output interface to control external drivers.
Composition: The CPU consists of a controller, an arithmetic logic unit (ALU), and registers. These circuits are integrated onto a single chip. The CPU connects to I/O interface circuits via the address bus and data bus.
2. Memory
Semiconductor circuits with memory function.
It is divided into system program memory and user memory.
The system program memory stores system programs, including management programs, monitoring programs, and interpreters/compilers that process user programs. It consists of read-only memory and ROM. It is used by the manufacturer, its contents cannot be altered, and it does not disappear when power is off.
User memory: Divided into user program storage area and working data storage area. It consists of random access memory (RAM). Used by the user. Contents are lost when power is off. High-efficiency lithium batteries are commonly used as backup power, with a lifespan typically of 3-5 years.
3. Input/Output Interfaces
(1) Input interface:
An optocoupler consists of two light-emitting diodes and a phototransistor.
Light-emitting diode (LED): When a changing electrical signal is applied to the input of an optocoupler,
The light-emitting diode produces a light signal that changes in the same pattern as the input signal.
Phototransistor: It conducts when illuminated by a light signal, and the degree of conduction is related to the strength of the light signal.
Within the linear operating region of an optocoupler, the output signal has a linear relationship with the input signal.
Input interface circuit operation: When the switch is closed, the diode emits light, and then the transistor conducts under the illumination of the light.
When the switch is open, the diode does not light up, and the transistor does not conduct. This means that the external switching signal is converted into a digital signal that the PLC can accept through the input interface circuit.
(2) Output interface
PLC relay output interface circuit
Operating process: When the internal circuit outputs a digital signal of 1, current flows through the relay coil, causing the normally open contact to close, providing the load with the necessary current and voltage. When the internal circuit outputs a digital signal of 0, current flows through the relay coil.
There is no current in the relay coil.
Then the normally open contact opens.
Disconnect the current or voltage from the load.
In other words, the output interface circuit converts the internal digital circuitry into a signal to make the load operate or not operate.
Three types:
Relay output: has contacts, short lifespan, low frequency, AC/DC load.
Transistor output: contactless, long lifespan, DC load