Introduction to PLC programming

Early programmable logic controller referred to as programmable logic controllers (Programmable Logic Controller,PLC), it is mainly used to replace relay logic control. With the development of technology, which uses microcomputer technology of industrial control equipment is already far exceeds the scope of logic control, therefore, such devices are called programmable controller, referred to as PC. But in order to avoid personal computer (Personal Computer) referred to as mixed, programmable logic controller is referred to as PLC,plc since the 1966 United States DEC (DEC) development occurs, the current United States, Japan, Germany quality of programmable controllers, powerful. 2, PLC basic structures

PLC is in essence a designed for industrial control computer, the hardware structure is basically the same as microcomputers, constitute:

A, power supply

PLC power supply plays an important role in the whole system. If you do not have a good, reliable power supply system is not working properly, so the PLC manufacturer attaches great importance to design and manufacture of power supplies. AC voltage fluctuations in +10% (+15%) range, you can take other steps while the PLC is connected directly to the AC power

B. central processing unit (CPU)

The central processing unit (CPU) is the Centre of PLC control. Procedural functions conferred by it according to the PLC system receives and stores from the programmer typed user programs and data, check power supply, memory, I/O, and the alert status of the timer, and the diagnosis of user program for syntax errors. When PLC inputs at run time, it first receives the input device to scan the status and data, and into the I/O mapping, and then one by one to read the user program from the user program memory, after a command interpreter, as provided for in Directive performs a logical or arithmetic operation result into images of I/O or data register. After the completion of all user programs, such as, finally, I/O mapping of the output or output registers of data sent to the output device, and so to run until it stops running.

In order to further improve the reliability of PLC, in recent years, large PLC also uses dual redundant system CPU, or three CPUvote system is adopted. This way, even if one CPU fails, the whole system is still working.

C, storage

Storage system software memory known as the system of program memory.

Memory storage application software known as user program memory.

D, input/output interface circuit

1, live input interface circuit consists of the optical coupling circuits and computer input interface circuit functions are controlled by PLC with field interface input channel.

2, output interface circuit of the output data registers, gated and interrupt request circuit integration and PLC through component output interface circuit to the scene output of control signals.

E, function module

Counting, positioning modules

F, communication module

Such as Ethernet, RS485, PROFIBUS-DP communication module