Mechatronics, Industrial Control & Instrumentation

Basic Features of Programmable Logic Controllers (PLCs)

Introduction to Programmable Logic Controllers

What is a Programmable Logic Controller?

A PLC is a user friendly; microprocessor-based specialized equipment that carries out many types of control functions with levels of complexity for use in industrial automation applications. Its objective is to monitor crucial process parameters and adjust process operations accordingly. A PLC can be programmed, controlled and operated by users.

PLC use a programmable memory to store instructions and to implement functions such as logic, sequencing, timing, counting and arithmetic in order to control machines and processes.

In a traditional industrial control system, all control devices are wired directly to each other according to how the system is intended to operate. The PLC replaces the wiring between the devices. Hence, instead of being wired directly to each other, all equipment is wired to the PLC. Then, the control program inside the PLC provides the wiring connection between the devices. The control program is the computer program stored in PLC’s memory that tells the PLC what’s supposed to be going on in the system. If you want a PLC system to behave differently or to control a different process element, you simply have to change the control program. In a traditional industrial control system, making this type of change would involve physically changing the wiring between the devices, which is costly and time-consuming task.
In transitioning from the traditional control systems, the existing push buttons, limit switches and other command components continue to be used and become input devices to the PLC. Likewise, the contactors, relays, solenoids, indicating lamps, etc. become the output devices controlled by the PLC.

The PLC Control Program

In a PLC, switches, sensors or input devices, are realised as contacts and output circuits as coils. The term logic in a PLC is used because programming is primarily concerned with implementing logic and switching operations. The input devices such as sensors, switches and output devices in the system being controlled, e.g. lamp, motor, etc. are connected to the PLC. The operator then enters a sequence of instructions i.e. a control program into the memory of the PLC. The controller then monitors the inputs (contacts) and outputs (coils) according to this control program and carries out the control rule for which it has been programmed.

The Structure of a PLC

A PLC consists of the CPU, memory and circuits for inputs and outputs. Input and output circuits deal with receiving input data and sending data to output devices respectively. A PLC may be considered to be a collection of a large member of relays, counters, timers, and data-storage locations. These components (timers, counters, etc.) do not exist physically but are used as logic components.

block diagram of the internal structure of a PLC
Block diagram of the Internal Structure of PLC

Input Relays (Contacts)

These components are actually transistors, and they exist physically, they are meant for receiving signals from sensors, switches, etc.

Internal Utility Relays (Contacts)

They are logical (simulated) relays and are the main tools of a PLC which eliminate the use of conventional physical relays and hard-wired relay control circuits. They help implement the control logic programs.

Output Relays (Coils)

They exist physically, made of transistors, conventional relays, etc. depending upon the application and are used to send on/off signals to lamps, solenoids, etc.

Counters

Counters are programmed to count the number of events (pulses). They do not exist physically. These logical components are used for the sake of implementing control programs containing the need of counting up or down or both, a series of events.

Timers

They exist logically. They are used to introduce time delay between the occurrences of two events. We have different types of timers e.g. on-delay timers, off-delay timers, etc.

Data storage

These are group of registers, used to store data to carry out arithmetic and logical operations with them.

PLC Hardware

Typically a PLC has 3 basic functional components. The 3 major parts are:

  1. Central Processing Unit (CPU)
  2. Input/output module
  3. Programming terminals
Block diagram of PLC hardware

Central Processing Unit (CPU)

The CPU controls and processes all the operations within the PLC. It comes with a clock frequency of typically between 1 and 8 MHz. This frequency decides the operating speed of a PLC, and provides the timing and synchronization for all elements in the system. The CPU has 3 subparts:

Don’t miss out on key updates, join our newsletter  List

  • Processor
  • Memory
  • Power supply

Processor

It contains the microprocessor. It interprets the input signals and carries out mathematic and logic operations to set the control actions, according to the program stored in the memory and then communicate the decision as action signals to the output. In other words, the processor performs the following functions in a PLC:

  • Updating inputs and outputs –this function allows a PLC to read the status of its input terminals and activate or de-activate its output terminals.
  • Performing logic and arithmetic operations –this is achieved with the help of arithmetic and logic unit (ALU). It is responsible for data manipulation and carrying out arithmetic operation of addition & subtraction and logic operations of AND, OR, NOT, XOR.
  • Communicating with memory –as data and programs, are stored in the memory, the CPU needs to communicate with the memory throughout the process.
  • Scanning application programs –the scanning function allows the PLC to execute the application program as specified by the programmer.
  • Communicating the programming terminal –the programming terminal is used to load programs and data into the CPU. Therefore in a PLC programming mode, the CPU has to constantly communicate with the programming terminal.

A PLC uses four buses to carry out communication process, when binary information is transferred from one location to another. These buses are:

  • Data bus –this bus carries data used in the processing carried out by the CPU. This is a bidirectional bus as the CPU has to perform both data/instruction read and write operation through the bus.
  • Address bus –used to carry the address of memory locations or I/O devices to identify a particular memory register or I/O devices with which the read/write operation is conducted by CPU.
  • Control bus –carries the signals used by the CPU for control actions e.g. to inform memory devices whether they are to receive data from an input device or to send data to an output device. This bus is used to carry timing signals used to synchronous actions.
  • System bus –this bus is used for communication between the input/output ports and input/output units.

Memory

This is the area of the CPU in which data and information are stored and retrieved. It holds the system software and user programs.

An illustration PLC memory

The memory is used to store different files. File is the collection of words and a word has two bytes; lower byte and higher byte. Eight bits make a word. Bit is the smallest unit of information, either high or low. To store a bit, the smallest unit of memory is known as a memory cell.  A register is a group of memory cells e.g. eight memory cells connected in parallel forms an eight-bit register. Therefore, to store a word (2 bytes), two such registers are to be used. To identify memory locations, an addressing scheme which maybe octal or hexadecimal is used.

PLC operating system programs are stored permanently into ROM, whereas information can be stored and retrieved into/from the RAM. The programs and data in RAM can be changed by the user.  User programs e.g. ladder logic program can be written into the RAM and a new program can overwrite previously written programs in the same locations. We also have Erasable and Programmable read-only-memory (EPROM), for PLCs modules.

Power Supply

The power supply makes regulated dc voltage with proper filtering circuit to ensure the supply of desired low dc voltage levels to the processor and circuits in the input and output modules.

Related Content: PLC Programming for Beginners

Input/output Modules

The input/output modules provides the interface between the system and the outside world, allowing for connections to be made through input/output channels to input and output devices.

The input module has terminals into which the outside process electrical signals, generated by the sensors or transducers are fed. The output module has terminals to which output signals are sent to activate relays, solenoids, solid-state switches, motors, indicators, and displays.

It is also through the input/output module that programs are entered from a programming terminal. Every input/output point has a unique address which can be used by the CPU for identifying the device. The input/output channels provide isolation and signal-conditioning functions; hence sensors and actuators can often be directly connected to them without the need for other circuitry.

An electronic system for connecting I/O modules to remote locations can be added if required. The actual operating process under PLC control can be hundreds of meters from the CPU and its I/O modules input and output devices can be classified as giving analog or digital/discrete signals.

For faster switching operation or response, transistor-type output is preferred over relay-type output. Off relay-type output isolates the PLC from the external circuit, but in the transistor type, opto-isolators are used to provide isolation. Triac output with opto-isolator can be used to control external loads which are strictly connected to AC power supply.

Outputs to actuators allow the PLC to change a process. Examples of actuators include:

  • Solenoids
  • Valves
  • Motor starters
  • Lights/indicators
  • Servomotors

Examples of sensors used as inputs to PLC include:

  • Potentiometers
  • Switches e.g. level switches, flow level switches, pressure switches, etc.
  • Linear variable differential transformers (LVDTs)

Rack is an enclosure with slots on which the CPU, power supply and input/output modules are mounted. The modular type of a PLC design can be used for all sizes of programmable controllers and has various functional units packaged in individual modules which can be plugged into slots according to the requirement. Therefore, it is easy to expand the number of inputs/outputs by just adding more I/O modules or expand the memory by adding more memory units.

PLC programming terminal

The programming terminal connects PLC monitor/programmer to CPU by a cable. PLC programming equipment exists to allow the user to write, edit, and monitor a program, as well as perform various diagnostic procedures. PLC programming arrangements can be a hand-held device, a desktop console, or a personal computer.

Five common PLC programming languages include:

  • Ladder logic
  • Functional block diagram (FBD)
  • Structured text (ST)
  • Instruction list (IL)
  • Sequential function chart (SFC)

Related: The Basics of Ladder Diagrams for Programming PLCs

PLC operation and program scan

The actions carried out by a PLC as shown in diagram below is called the program scan.

Steps in PLC operation

The period of the loop is called program scan time. This depends on the size of the PLC program and the speed of the processor.

At the start, the PLC scans the state of all the connected inputs and stores their states in the PLC memory. When PLC program accesses an input, it reads the input state as it was at the start of the program scan. A zone of PLC memory corresponding to the outputs is changed by the execution of the program, and then all the outputs are updated simultaneously at the end of the scan. This action is therefore, read inputs, executes program, update outputs.

Advantages of Using PLCs in Industrial Control Applications

PLCs offer the following advantages:

  • Computational abilities allow sophisticated control.
  • Flexible and can be reapplied to control other systems quickly and easily.
  • The ability to be expanded.
  • Reliable components make PLCs likely to operate for years before failure.
  • Ability to withstand harsh environments.
  • Small space requirements.
  • PLC circuit operation can be seen during the operation directly on a monitor.
John Mulindi

John Mulindi is an Industrial Instrumentation and Control Professional with a wide range of experience in electrical and electronics, process measurement, control systems and automation. In free time he spends time reading, taking adventure walks and watching football.

View Comments

Recent Posts

How AI and Machine Learning are Enhancing Electrical Control Processes

Electrical control processes form the backbone of industries, enabling seamless operations across sectors like manufacturing,…

2 days ago

Standard Process Signals for Industrial Instrumentation

Industrial measurement and control processes employ standard process signals that are used throughout all the…

2 weeks ago

Top 5 Benefits of Combining CCTV Cameras with Biometric Systems

The integration of advanced technologies in security systems has become imperative for ensuring safety and…

2 weeks ago

Sources of Power Quality Problems

Power quality may be affected by a number of issues. Our discussion in this article…

2 weeks ago

Common Terms Used When Describing Power Quality Problems

Power quality has become an important issue to electricity consumers at all levels of consumption.…

2 weeks ago

What to Expect from PCB Assembly Services in China

The importance of printed circuit board (PCB) technology has escalated throughout the years with the…

3 weeks ago