A Simple (But Complete) Guide: What is PLCs |PLC Basics| PLC Application|Advantage

What Is PLCs

Programmable Controller (Programmable Controller) is abbreviated as PLC. It is a new type of industrial automatic control device developed on the basis of microprocessor, integrating computer technology, automatic control technology and communication technology. With the development of computer technology, programmable controllers, as general industrial control computers, have become increasingly powerful and cost-effective, and have become mainstream equipment in the industrial field.

PLCs History

Here our complete article about :

Must Read: PLCs History: Things You Didn’t Know

PLC Basics

PLC is essentially an industrial control computer. The composition of PLC and computer is very similar. It is only that it has a stronger interface with industrial processes than a general computer, and a programming language that is more directly adapted to control requirements. From the perspective of hardware structure, it consists of CPU, memory, input / output interface, power supply, etc.

The basic block diagram of PLC is shown in Figure The main hardware parts of the PLC control system are introduced below

PLC Architecture

PLC Central processing unit (CPU)

PLC Basics

The central processing unit (CPU) is generally composed of a controller, an arithmetic unit, and a register. These circuits are integrated in a chip. The CPU is connected to the storage unit and the input / output interface circuit through the data bus, address bus, and control bus.

Like the general computer, the CPU is the control center of the entire PLC. It directs the PLC to work in an orderly manner according to the functions given by the system program in the PLC. The CPU mainly completes the following work:

  1. Receive and store programs and data input by users through input devices such as programmers.
  2. Receive the status or data of the field signal through the I / O component by scanning, and store it in the input image register or data memory.
  3. Diagnose the working failure of PLC internal circuit and syntax error in programming, etc.
  4. After the PLC enters the running state, it executes the user program to complete the processing, transmission, and storage of various internal control signals to complete various operations specified by the user instructions.
  5. Respond to requests from various peripheral devices (such as programmers, printers, etc.).

The CPUs used by PLCs vary with the random type. At present, small PLCs are single CPU systems, while medium and large ones use dual CPU or even multiple CPU systems.

At present, there are three types of microprocessors commonly used in PLCs:

general-purpose microprocessors

single-chip microprocessors (ie single-chip microcomputers), and bit-chip microprocessors.

PLC Memory Structure

PLC Memory
PLC Memory

The memory in the PLC system is mainly used to store system programs, user programs and working status data. PLC memory includes system memory and user memory.

System memory

The system memory is used to store the system program written by the PLC manufacturer, and is solidified in the ROM, and cannot be changed by the user. It enables the PLC to have basic functions and to be able to complete various tasks specified by the PLC designer. The quality of the system program largely determines the performance of the PLC.

User memory

User memory includes user program memory (program area) and data memory (data area).

The user program memory is used to store various user programs written by the PLC programming language for specific control tasks .

The user program memory can be modified or added or deleted by the user according to the type of memory unit selected (it can be RAM, EPROM or EEPROM memory).

User data memory can be used to store (remember) the ON / OFF status and data of devices used in user programs.

The size of the user memory is related to the size of the user program capacity, and is one of the important indexes reflecting the performance of the PLC.

In order to facilitate reading, inspection and modification, user programs are generally stored in CMOS static RAM, and lithium batteries are used as backup power sources to ensure that information will not be lost when power is lost.

In order to prevent the damage to the programs in the RAM, when the user program runs normally and does not need to be changed, it can be solidified in the EPROM. Many PLCs now use EEPROM directly as user memory.

Working data is some data that changes frequently and is accessed frequently during PLC operation. Stored in RAM to meet random access requirements

In the working data memory of the PLC, there is a storage area for storing logic devices such as input and output relays, auxiliary relays, timers, counters, etc.

The state of these devices is determined by the initial setting and operation of the user program.

According to the need, part of the data is maintained in its current state by the backup battery when the power is turned off.

This part of the storage area that can save data when the power is turned off is called the data retention area.

Since the system program and work data have no direct connection with the user, the form and capacity of the memory listed in the PLC product catalog or user manual refer to the user program memory.

When the user memory capacity provided by PLC is not enough, many PLCs also provide memory expansion function.

There are two main types of memory: one is random access RAM for read / write operations, and the other is read-only memory or erasable programmable read-only memory ROM, PROM, EPROM, and EEPROM.

PLC CPU_Memory

PLC Input/output interface

PLC Input_Output

The input / output interface is the connecting part between the PLC and the field I / O devices or other external devices.

The PLC reads the status or information of external devices (such as switches, buttons, sensors) into the CPU through the input interface, and transmits the results to the actuator (such as solenoid valve, relay, contactor, etc.) through the output interface through the operation and operation of the user program ).

In the input / output interface circuit, generally equipped with electronic conversion, optocoupler and resistance-capacitance filter and other circuits, in order to achieve the matching of various signals from the external site and the unified signal within the system and the correct transmission of the signal, the PLC is through This interface realizes the conversion of signal level. Light-emitting diodes (LEDs) are used to indicate whether a certain input terminal has signal input. When the system’s I / O points are not enough, the system can be expanded through the PLC’s I / O expansion interface.

Input interface circuit

The input interface circuit structures of various PLCs are mostly the same. There are two types of external signal power accepted by their interfaces: DC input interface circuit and AC input interface circuit. Its function is to turn the on-site switching signal into a standard signal processed within the PLC. The input interface circuit of PLC is shown in below Figure

In the input interface circuit, each input terminal can receive a discrete signal from the user equipment, that is, the external input device can be a passive contact, such as a button, switch, shape switch, etc., or an active device, such as each Sensors, proximity switches, photoelectric switches, etc. Under the condition that the internal power supply capacity of the PLC allows, the active input device can use the PLC output power (24V), otherwise it must be external power supply.

DC input interface circuit

In the DC input interface circuit, when the input switch is closed, the phototransistor receives the optical signal and sends the received signal to the internal status register. That is, when the field switch is closed, the corresponding input image register is in the “1” state, and at the same time, the light emitting diode (LED) of the input terminal is lit; when the field switch is open, the corresponding input image register is in the “0” state.

The photocoupler isolates the electrical connection between the input circuit and the internal circuit of the PLC, so that the external signal becomes a standard signal that the internal circuit can receive through photoelectric coupling.

AC input interface circuit

In the AC input interface circuit, when the input switch is closed, the signal is sent to the PLC internal circuit via the bidirectional photocoupler for processing by the CPU, and the light-emitting diode (LED) lights at the same time

Output interface circuit

In order to meet the needs of different loads, all types of PLC outputs have three types of interface circuits, namely

  1. relay output
  2. transistor output
  3. thyristor output.

Its function is to convert the standard signal inside the PLC into the on-off signal required by the on-site actuator to drive the load. Light-emitting diodes (LEDs) are used to indicate whether a certain output terminal has a signal output.

Relay output interface circuit

In the relay output interface circuit, when the CPU sends the output signal to the PLC output image area according to the operation of the user program, the output signal is sent to the latch through the internal bus. When the corresponding bit of the output latch is “1”, its corresponding light-emitting diode (LED) turns on and emits light, the coil of the relay is charged, and its contacts connect the load and the power supply, so that the load draws current; when the output latch When the corresponding bit of the memory is “0”, the corresponding light-emitting diode (LED) is not conductive, the coil is not charged, and its contacts isolate the load L from the power supply, so that the load will not draw current.

transistor output interface circuit

In the transistor output interface circuit, when the corresponding bit of the output latch is “1”, the corresponding transistor is turned on, connecting the load and the power supply, so that the load draws current, and the light emitting diode (LED) conducts On; when the output latch corresponds to “0”, the corresponding transistor is turned off to isolate the load from the power supply, so that the load will not draw current, and the light-emitting diode (LED) does not conduct.

thyristor output interface circuit

In the thyristor output interface circuit, when the corresponding bit of the output latch is “1”, its corresponding optocoupler is turned on, connecting the load and the power supply, so that the load draws (current) Glowing. When the corresponding bit of the output latch is “0”, due to the zero-crossing of the load power supply, its corresponding optocoupler is cut off to isolate the load from the power supply, so that the load will not draw current, and the light-emitting diode (LED) does not conduct.

Among the above three types of output interface circuits, the relay output type is the most commonly used. It is suitable for AC and DC loads.

It is characterized by strong load carrying capacity, but the operating frequency and corresponding speed are slow.

Transistor output type is suitable for DC load, which is characterized by high operating frequency, corresponding speed block, but small load capacity.

The thyristor output type is suitable for AC loads, the corresponding speed is fast, and the load capacity with belt is not strong.

In the output interface circuit, the external load is directly connected to the PLC output terminal, and the load power supply is equipped by the user according to the load requirements.

In practical applications, when considering external drive power, the type of output device needs to be considered, and the output current of the PLC output terminal cannot exceed its rated value.

Must Read : Plc inputs and outputs 

Must Read : PLC Communication protocols

PLC power supply

PLC Power Supply
PLC Power Supply

The PLC is equipped with a dedicated switch-type power supply, which converts the AC / DC power supply into the power required by the units inside the system, that is, to provide working power for the integrated circuits of the PLC modules.

PLC generally uses 220V AC power supply. The switching power supply inside the PLC does not have high requirements for the power supply provided by the power grid. Compared with the ordinary power supply, the PLC power supply has good stability and strong anti-interference ability. Many PLCs provide a DC 24V regulated power supply for powering external sensors.

For the PLC with integral structure, the power supply is usually encapsulated inside the chassis; for the modular PLC, some use a separate power supply module, and some encapsulate the power supply and the PLC into one module.

PLC Programming

Must Read: PLC Ladder Logic Programming

PLC Programming
PLC Programming

The programmer is an indispensable device for PLC development and application, monitoring operation, inspection and maintenance.

It is an external device of PLC and a window for human-computer interaction. It can be used for programming, making some settings for the system, monitoring the working status of the PLC and the system controlled by the PLC, but it does not directly participate in the on-site control operation.

The programmer can be a dedicated programmer or a general-purpose computer system equipped with a programming software package.

The dedicated programmer is produced by a PLC manufacturer and is used exclusively for certain PLC products produced by the manufacturer.

The scope of use is limited and the price is higher. At present, most programmers are based on personal computers. As long as users purchase programming software and corresponding hardware interface devices provided by PLC manufacturers, they can obtain high-performance PLC program development systems

PLC Communication interface

Must Read : 5 Most Popular PLC programming languages nowdays

Must Read : Top 15 best Advantage of plc over relay

Must Read : Types of plc used in industry

Peripheral communication interface

PLC is equipped with a variety of communication interfaces.

PLC can communicate with programmers, printers, other PLCs, computers and other devices through these communication interfaces.

It can form a multi-machine system or be connected into a network to achieve larger-scale control.

Expansion interface

Used to connect I / O expansion units and special function units.

The expansion interface can expand the number of switching I / O points and increase the analog I / 0 terminals, and can also be equipped with intelligent units to complete specific functions, making PLC configuration more flexible to meet the needs of different control systems.

I/0 expansion interface circuit adopts two circuit forms of parallel interface and serial interface

In industrial control, in addition to digital signal control, sometimes analog signal is also used for control. There are three analog modules:

  1. analog input module
  2. analog output module
  3. analog input / output module

Analog input module

The analog input module, also known as A / D module, converts the continuous analog signal generated by the sensor detection in the field into a digital quantity that can be received by the PLC’s CPU. It is generally 12 binary digits, and the more digits the digital quantity Module, the higher the resolution.

Analog output module

The analog output module is also called D / A module, which converts the digital quantity sent from the PLC CPU to the analog output module into an analog quantity (voltage or current) that can be received by an external device. The digital signals received by the analog output module are generally 12-bit binary numbers. The higher the digital number, the higher the resolution.

PLC Software composition

The software of PLC control system mainly includes system software and user program. The system software is fixed in the memory by the PLC manufacturer and is used to control the operation of the PLC. The user program is compiled and entered by the user, and stored in the user memory for controlling the operation of external objects.

system software

System software includes system management programs, user instruction interpreters, standard program modules, and system calls.

The entire system software is a whole, and its quality greatly affects the performance of the PLC. Under normal circumstances, further improvement and improvement of the system software can greatly improve the performance of the PLC without adding any equipment, making its functions stronger and stronger.

The user program

PLC program is generally composed of three parts: user program, data block and parameter block. The user program is required, and the data block and parameter block are optional.

A user program is an application program, and is a program prepared by a user for a specific control object.

The PLC completes control tasks by cyclically scanning and executing user programs in the RUN mode. The user programs determine the functions of a control system.

A complete user program should include a main program, several subroutines, and several interrupt programs.

Must Read : PLC Communication protocols

Must Read : Analysis of the PLC Operation : You must know

Must Read : PLC Hardware : Everything you need to know

PLC Working Principle & Scan Cycle

PLC is an industrial control computer, and its working principle is based on the computer working principle, that is, it is completed by executing a user program reflecting the control requirements.

Here is the detail article about PLC Working Principle & Scan Cycle

PLC Programming Language

At present, PLC provides users with a variety of programming languages ​​to meet the needs of programming user programs. The programming languages ​​provided by PLC are usually the following:

  1. ladder diagram,
  2. instruction table,
  3. sequential function diagram
  4. function block diagram

PLC Application

At present, PLC has been widely used at home and abroad in various industries such as steel, petroleum, chemical industry, electric power, building materials, machinery manufacturing, automobile, textile, transportation, environmental protection and cultural entertainment. With its performance price The ratio is constantly improving, and the scope of application is still expanding.

The application of PLC can be roughly divided into the following categories.

Logic control of the switching value

This is the most basic and widest application field of PLC. PLC logic control replaces the traditional relay system control circuit to realize logic control and sequence control. It can be used for single-machine control, multi-machine group control and automatic production line control. Such as machine tool electrical control, assembly production line, elevator control, metallurgical system blast furnace feeding system and various production line control.

Motion control

PLC can be used to control circular motion or linear motion. At present, most PLC manufacturers provide single-axis or multi-axis position control modules that drag stepper motors or servo motors. This function can be widely used in various machinery, such as metal cutting machine tools, metal forming machine tools, robots, elevators Wait.

Process control

Process control refers to the closed-loop control of continuously varying analog quantities such as temperature, pressure, flow rate, and speed.

PLC adopts corresponding A / D and D / A conversion modules and various control algorithm programs to process the analog quantity and complete closed-loop control.

PID adjustment is a kind of adjustment method commonly used in the closed-loop control system. Process control is widely used in metallurgy, chemical industry, heat treatment, boiler control and other occasions. Modern large and medium-sized PLCs generally have closed-loop PID control modules.

This function can be implemented with PID subroutines, and more are implemented with dedicated PID modules.

Data processing

PLC has functions of mathematical operation (including matrix operation, function operation, logic operation), data transmission, data conversion, sorting, table lookup, bit operation, etc., which can complete data collection, analysis and processing. These data can be transferred to the designated smart device for processing through the communication interface, or they can be printed for backup.

Data processing is generally used in large-scale control systems, such as some large-scale control systems in the paper, metallurgy, and food industries.

Communication and networking

PLC communication includes the communication between PLCs, PLC and the host computer, PLC and other intelligent devices. Together with other intelligent control equipment, PLC can form a “centralized management, decentralized control” distributed control system to meet the needs of factory automation system development.

The difference between PLC control system and relay control system :

  1. The components are different: the relay control circuit is composed of many real hardware relays, and the ladder diagram is composed of many so-called “soft relays”.
  2. The number of contacts is different: the number of contacts of the hard relay is limited, and the number of contacts of the relay used for control is generally only 4 to 8 pairs; and the number of contacts for programming of each “soft relay” in the ladder diagram is unlimited.
  3. The method of implementing control is different: in the relay control circuit, a certain control is achieved by hard wiring between various relays.
  4. The PLC control is solved by ladder diagram or software programming.
  5. Different working methods: In the relay control circuit, parallel working mode is adopted; in the ladder control circuit, serial working mode is adopted.

PLC Advantage

  1. High reliability and strong anti-interference ability
  2. Complete hardware, easy to use and strong adaptability
  3. Intuitive programming, easy to learn and easy to learn
  4. the system design, installation and commissioning work load is small, easy maintenance
  5. Small size and low energy consumption

Here detail article about PLC Advantages and Disadvantages

Leave a Comment