0% found this document useful (0 votes)
97 views19 pages

Chap. 3 Working of PLC

A Programmable Logic Controller (PLC) is an industrial digital computer used for automation and control in manufacturing processes, characterized by its robust design and real-time operation. The PLC operates through a continuous scan cycle involving input scanning, program execution, output updating, and housekeeping, ensuring efficient control and monitoring of devices. Key components include the CPU, memory structures, I/O interfaces, and programming terminals, all of which contribute to the PLC's functionality and reliability in various applications.

Uploaded by

Rahul Mali
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
97 views19 pages

Chap. 3 Working of PLC

A Programmable Logic Controller (PLC) is an industrial digital computer used for automation and control in manufacturing processes, characterized by its robust design and real-time operation. The PLC operates through a continuous scan cycle involving input scanning, program execution, output updating, and housekeeping, ensuring efficient control and monitoring of devices. Key components include the CPU, memory structures, I/O interfaces, and programming terminals, all of which contribute to the PLC's functionality and reliability in various applications.

Uploaded by

Rahul Mali
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

3.

1 Basic Operation and Principles of PLC

A Programmable Logic Controller (PLC) is an industrial digital computer designed for the
control and automation of manufacturing or other processes, such as assembly lines, robotic
devices, or any activity requiring high reliability and process control. It is robust, adaptable, and
capable of handling complex control tasks in real-time. The term logic refers to the set of
instructions, user defines conditions/ contained applied on input data to execute the expected
output data i.e., end results.

3.1.1 Basic Principles:

• Input/Output (I/O) Interface: Monitors field devices like sensors and actuators. It converts
signals from sensors into data that the CPU can process and sends control signals to
actuators.

• Central Processing Unit (CPU): The brain of the PLC. It executes control instructions
based on the programmed logic and manages communication with other devices. The CPU
handles functions like logic operations, arithmetic calculations, data handling, and
communication with external devices.

• Memory: Stores the control program, input/output data, and intermediate results. PLC
memory can be divided into:

o Program Memory: Stores the user-defined logic and instructions.

o Data Memory: Holds variables, counters, timers, and status information.

o System Memory: Maintains diagnostic information and configuration settings.

• Power Supply: Provides the necessary voltage and current for the PLC and its components,
ensuring stable operation. It typically converts AC mains power to low-voltage DC power
required by the PLC.

• Programming Device: Allows users to write, test, and debug the control logic. Examples
include personal computers with dedicated PLC programming software like RSLogix, TIA
Portal, or CX-Programmer.
• Communication Interfaces: Enable connectivity with other devices and networks, such as
Ethernet, Modbus, or Profibus, for remote monitoring and control.

3.2 Scan Cycle

One of the fundamental concepts in the operation of a PLC is the scan cycle, which is essential
for understanding how a PLC processes inputs, executes logic, and controls outputs. The PLC
operates in a continuous loop called the scan cycle, which is essential for real-time control and
decision-making. These stages include input scanning, program execution, output updating, and
housekeeping tasks. The scan cycle operates in a loop, allowing the PLC to monitor the status of
inputs and adjust outputs accordingly in real-time.

PLC Scan Cycle


1. Input Scan:

o The PLC reads the status of all input devices (e.g., sensors, switches, and buttons).

o The data from the input devices is stored in the Input Image Table, which acts as a
temporary memory buffer. This input data remains constant throughout the scan cycle,
ensuring consistent logic execution.

o This allows the CPU to access the input data without directly communicating with the
physical input devices, improving response time.

2. Program Execution:

o The CPU executes the user-defined control program (typically written in Ladder Logic,
Function Block Diagram, or Structured Text).
o The logic is processed based on the data stored in the Input Image Table and determines
the appropriate control actions.

o The results of the logic execution are stored in the output image table, which temporarily
holds the output status before the physical output devices are updated. During this step,
the PLC updates internal variables, counters, timers, and other control functions.

3. Output Scan:

o After program execution, the PLC updates the status of all output devices, such as
actuators, relays, and indicators, based on the information in the output image table. The
CPU updates the Output Image Table with the results of the program execution.

o This ensures that the physical outputs reflect the decisions made during the program
execution phase i.e., the data from the Output Image Table is sent to the output devices
(e.g., motors, valves, relays) through the output modules.

4. Housekeeping:

o This stage involves internal maintenance tasks, such as diagnostics, communication with
other devices, updating timers and counters, and managing memory. The PLC performs
internal diagnostics to detect faults or errors.

o It handles communication tasks with other devices or supervisory systems. The system
updates status flags and performs necessary maintenance tasks to ensure smooth
operation. So housekeeping tasks ensure the PLC operates efficiently and reliably.

➢ Importance of the Scan Cycle:

• The scan cycle is repeated continuously at high speed, typically in milliseconds.

• A faster scan cycle improves response time and ensures accurate real-time control.

• Proper management of the scan cycle is critical for applications requiring precise timing
and synchronization, such as robotics and process control systems.
Scan Time:

The scan time refers to the time taken to complete one full cycle, from input scanning to
housekeeping. Factors influencing scan time include:

✓ The complexity and length of the control program.


✓ The number of input and output devices.
✓ The speed and processing power of the PLC’s CPU.

A shorter scan time allows for faster response to changes in input conditions, which is critical
in high-speed automation applications. However, excessive scan times can lead to delays and
affect the overall performance of the control system.

E.g., In a conveyor belt system, the input scan reads data from proximity sensors, the program
execution determines whether the motor should start or stop, the output scan activates the motor,
and the housekeeping step checks for errors or communication updates.

3.3 Memory Structures

The memory structure of a PLC is critical for managing data, executing programs, and
maintaining system reliability. Efficient memory management is essential for optimizing PLC
performance. Key strategies for the same include:

o Proper allocation of memory resources to prevent data corruption.


o Regular backups to protect against data loss.
o Implementing security measures to prevent unauthorized access.

PLC memory is organized into distinct sections that serve different functions, including storing
the control program, managing input and output data, and handling internal variables.

✓ Input/ Output Image Table: Reflect (Temporarily stores) the current state of input and
output devices. It temporarily holds the status of output devices before sending signals. Input
image table captures the status of sensors and switches, while the output image table holds
the status of actuators and indicators.
✓ Data Memory: Stores intermediate variables, counters, timers, and other data needed during
program execution. Divided into temporary and permanent data areas. Temporary data is lost
when the PLC powers off, while permanent data is retained.
✓ Program Memory: Holds the user-defined control logic, typically written in ladder logic,
structured text, or function block diagrams. The program is stored in non-volatile memory to
retain data during power loss.
✓ System Memory: Maintains internal diagnostics, status flags, and configuration settings.
Stores the operating system, firmware, and configuration settings necessary for the PLC to
function. Manages communication protocols and handles diagnostics and error handling.
➢ Memory Addressing: PLC memory is typically organized in addressable units, such as bits,
bytes, or words. Common addressing schemes include:
• Bit Addressing: Individual binary states, such as a relay contact or sensor status.
• Word Addressing: Multi-bit data, such as analog input values or numerical counters.
• Indexed Addressing: Allows access to data arrays and tables for advanced control
functions.

3.4 I/O Structure

The Input/Output (I/O) structure is a critical component of the PLC system that allows
interaction with external devices. It serves as the bridge between the PLC’s CPU and the physical
world.

Components of I/O Structure:

• Input Modules:

o Detect and transmit (Collect data) signals from field devices (e.g., sensors, switches,
switches, and encoders) to the PLC. It also converts analog or digital signals into a format
the PLC can process.

o Additionally, it includes signal conditioning and isolation circuits to protect the PLC from
voltage spikes or noise. Types include discrete input modules (for binary signals) and
analog input modules (for continuous signals like temperature and pressure).

• Output Modules:

o Send control signals from the PLC to external devices (e.g., Control devices such as
motors, relays, and solenoids). It also converts the PLC’s logic signals into appropriate
voltage or current levels to drive actuators.
o Types include discrete output modules (for ON/OFF control) and analog output modules
(for variable control, such as motor speed). It may also include solid-state relays or
mechanical relays for different load types.

o If required, it provides feedback loops to confirm output activation and detect faults.

• I/O Addressing:

o Each input and output point are assigned a unique address. These addresses are used in the
control program to reference specific devices.

o Addressing schemes vary based on the PLC manufacturer (e.g., Allen-Bradley, Siemens).

• Signal Conditioning and Isolation Circuits:

o It filters out noise and protect against surge and convert signals to appropriate voltage or
current levels.

o Electrically isolate the PLC from high-voltage devices to prevent damage.

Communication Protocols:

• Fieldbus Systems: For complex industrial environments (e.g., DeviceNet, Profibus).

• Ethernet/IP: For high-speed communication and data sharing.

Example:

In a temperature control system, the analog input module reads the temperature sensor’s signal,
and the output module adjusts the heater’s power accordingly. Similarly, in a conveyor belt
system, discrete input modules detect object presence via sensors, and output modules control
the motor.

3.5 Power Supply

The power supply unit converts AC voltage from the mains into the DC voltage required by the
PLC components. It ensures stable operation and protects against voltage fluctuations and power
surges.
Example:

A 24V DC power supply is standard for industrial PLCs and can power sensors, actuators, and
communication devices.

3.6 Programming Terminal

A programming terminal is essential for developing and maintaining PLC programs. The
programming terminal of a PLC is a crucial component, allowing engineers and technicians to
create, edit, and monitor control programs. The programming terminal of PLCs, its features,
functionalities etc. are listed below,

• Programming Software: Common languages include Ladder Logic, Function Block


Diagram (FBD), Structured Text, and Sequential Function Chart (SFC).

• Communication Interface or Hardware Interface: A computer or a dedicated device with


connectivity options like USB, Ethernet, or serial ports for uploading and downloading
programs. It also includes Human-Machine Interface (HMI) used for visualization and
interaction with the PLC.

• Diagnostic/Debugging Tools: Features for monitoring the program execution, diagnosing


errors, and modifying logic in real-time.

• Features of PLC Programming Terminals

✓ Graphical Programming Interface: Supports ladder logic, function block diagrams, and
structured text programming.

✓ Real-Time Monitoring: Allows observation of input/output status and internal variables.

✓ Data Logging and Trend Analysis: For performance evaluation and fault detection.

✓ Security and Access Control: Restricts unauthorized modifications.

Example:

Ladder Logic is the most commonly used programming language for PLCs. It resembles
electrical relay logic diagrams and uses rungs to represent control logic.

Basic Ladder Logic Example including PB1: Push Button (input) and L1: Lamp (output)
|----[ ]----( )----|
| PB1 L1 |

Here, when PB1 is pressed, the circuit closes, and the lamp L1 is turned on. The programming
terminal allows the user to create, edit, and simulate this logic before downloading it to the PLC.

Example 2: Timer Function including PB2: Push Button, T1: Timer On Delay and M1: Motor

|----[ ]----[TON]----( )----|


| PB2 T1 M1 |

Here, when PB2 is pressed, the timer T1 starts counting. After a preset time, the motor M1 turns
on. This is used in applications like conveyor belt systems and automated filling stations.

3.7 Logic gates

1) AND Gate in Manufacturing Industry:

• The AND gate outputs HIGH (1) only when all inputs are HIGH (1).

• It is commonly used in safety systems and quality control processes where multiple
conditions must be met simultaneously.

• The function of an AND GATE is simulated as shown in the figure below. Notice that
the lamp is on ONLY when the switches are closed. In the truth table you can see that
there is only one set of inputs that produces a high logic output.

• AND Gate ensures all safety conditions are met before operation.
Example:

Automated Assembly Line Safety Control:

• For a machine to operate, all safety conditions must be satisfied:

o Emergency stop switch is OFF (Input A = 1)


o Safety door is CLOSED (Input B = 1)

o Operator is in a safe zone (Input C = 1)

The machine will only start when all three conditions are met.

2) OR Gate in Manufacturing Industry:

• The OR gate outputs HIGH (1) when at least one input is HIGH (1).

• It is used in alarm systems and failure detection mechanisms.

• Notice that the lamp will be ON when one or both of the switches are closed. The truth
table shows a logic high output for all combinations of inputs except where both A and
B are low. When either input A,B ,or both are ON ,output is ON.

• OR Gate helps in early fault detection to prevent system failures.

Example:
Machine Fault Detection System:

• An alarm is triggered if any one of the following faults occurs:


o Overheating (Input A = 1)

o Low pressure (Input B = 1)


o Power fluctuation (Input C = 1)

The alarm will sound if any one or more faults occur.

3) NOT Gate in Manufacturing


A NOT gate (also called an inverter) is a logic gate that takes one input and produces the
opposite output.
• If the input is HIGH (1), the output is LOW (0).
• If the input is LOW (0), the output is HIGH (1).
• It is used in digital circuits to invert signals and control logic in automation systems.
• The output of a NOT GATE is the inverse of the input. The NOT GATE is sometimes
called an inverter. The function of NOT GATE is simulated. When the switch is
closed, the electric bulb turns off. When the switch is open, the electric current flow
through the light bulb and the light bulb turns ON. Like NOT GATE, the output is when
input is on and vice versa. The input is inverted to generate an output.

Example of NOT Gate in Manufacturing

• In an emergency stop system, machines must stop when an emergency button is


pressed.
• Some emergency stops buttons work in a normally closed (NC) configuration,
meaning:
– When the button is NOT pressed, it outputs 1 (HIGH voltage).
– When the button is pressed, it outputs 0 (LOW voltage).
4) NAND (NOT AND) Gate in Manufacturing Industry:
• A NAND gate is the inverse of an AND gate. It outputs HIGH (1) unless all inputs are
HIGH (1).
• It is widely used in safety interlocks and fault detection systems where failure
prevention is crucial.
• Notice that the lamp will be off when both switches are closed. The NAND gate takes
its name from NOT and AND. Its outputs are the inverse of the AND gate. Notice that
the NAND gate can be built by connecting and AND gate in series with a NOT gate.
• NAND Gate ensures fail-safe operations by keeping the system running unless a critical
stop condition is met.

Example: Safety Lock System


• It is used in manufacturing plants to ensure machinery operates only under safe
conditions.
• In a safety lock system machine should stop when worker is detected in danger zone
and safety door is open.
• Conditions:
o Worker detected in the danger zone (A = 1)
o Machine door OPEN (B = 1)
Worker in Danger Zone Machine Door Closed NAND Output (Machine
(A) (B) Running)
0 0 1 (Machine runs)
0 1 1 (Machine runs)
1 0 1 (Machine runs)
1 1 0 (Machine stops)
• Machine stops when both conditions fail (worker detected AND door is open).
• Ensures worker safety by preventing accidents.

5) NOR (NOT OR) Gate in Manufacturing Industry:

• A NOR gate is the inverse of an OR gate. It outputs HIGH (1) only when all inputs are
LOW (0).
• Used in fault monitoring and standby systems, ensuring that a machine runs only when no
faults occur.
• Notice that the lamp will be ON when both switches are open. The NOR gate takes its
name from NOT and OR gate. It can be built by connecting an OR gate and NOT gate.
• NOR Gate is ideal for fault monitoring, ensuring the machine runs only when no faults are
present.

Example: Fault Monitoring System


• A machine should operate only if there are no system faults.

• Fault Conditions:
o Overheating (A = 1)
o Low Pressure (B = 1)
Overheating (A) Low Pressure (B) NOR Output (Machine Running)

0 0 1 (Machine runs)

0 1 0 (Machine stops)

1 0 0 (Machine stops)

1 1 0 (Machine stops)

• The machine runs only when no faults occur (both inputs LOW).
6) X-OR Gate in Manufacturing Industry:

• The X-OR gate outputs HIGH (1) when only one input is active, which is ideal for
detecting mismatches or anomalies in manufacturing processes.
• The XOR gate stands for the Exclusive-OR gate. This gate is not basic gates in their own
and is constructed by combining with other logic gates. The XOR gate is the hybrid gate.
• X-OR Gate helps in error detection and identifying misalignment issues.

Example in Manufacturing:

Quality Control in Conveyor Systems:


• In a conveyor belt system, two sensors (A and B) detect the presence of a product at different
checkpoints.
• If only one sensor detects a product, it indicates a misalignment or missing component.
• The X-OR gate will trigger an alarm or stop the system to prevent defective products from
proceeding.

7) X-NOR Gate in Manufacturing Industry:


• The X-NOR gate outputs HIGH (1) when both inputs are the same, which is useful for
comparing signals or verifying processes.
• The XNOR gate stands for the Exclusive-NOR gate. This gate is not basic gates in their
own and is constructed by combining with other logic gates. The XNOR gate is the hybrid
gate.
• Following figure displays a two input XNOR GATE symbol and its truth table.

• X-NOR Gate is effective for process verification and position monitoring in automated
systems.

Example in Manufacturing:

Robotic Arm Position Verification:

• Two sensors, A and B, monitor the position of a robotic arm during welding.
• If both sensors detect the arm in the correct position (both HIGH) or both detect it in the
incorrect position (both LOW), the process continues.

• If the positions do not match, the X-NOR gate triggers an error signal to halt the operation.

3.8 Selection of PLC:

When choosing a PLC for an industrial process, consider the application's complexity, I/O
requirements, environmental conditions, communication protocols, scalability, programming
software, and budget, ensuring the PLC meets the specific needs of the process while being
reliable and durable.

Here's a more detailed breakdown of the key factors:

1. Application Requirements & Complexity:

• Process Type: Is it a simple on/off control, a complex sequence, or a process involving


motion control, robotics, or safety systems?

• Scale of Automation: Will the PLC control a single machine or an entire factory?
• Process Complexity: Determine whether you need a simple control process, or something
more complex involving data handling, motion control, or safety measures

2. Input/Output (I/O) Requirements:

• Number of I/O Points: Determine the number of digital and analog inputs and outputs
required for the application.

• Type of I/O: Consider the types of signals (digital, analog, special) that the PLC needs to
handle.

• Remote I/O: If the application requires remote I/O, ensure the PLC supports the necessary
interfaces.

3. Processing Power & Speed:

• Cycle Time: Evaluate the required cycle time for the PLC to respond to changes in the
process.

• Complexity of Logic: Consider the complexity of the control logic and ensure the PLC has
sufficient processing power.

4. Communication Protocols:

• Network Requirements: Determine the communication protocols required for integration


with other devices or systems (e.g., Ethernet, ProfiNet, Modbus).

• Existing Infrastructure: Consider any existing communication protocols or networks in


place.

5. Environmental Considerations:

• Operating Conditions: Ensure the PLC can withstand the environmental conditions of the
application (temperature, vibration, humidity, dust).

• Ruggedness: For harsh environments, choose a PLC with a ruggedized design.

6. Scalability & Expandability:

• Future Growth: Consider the ability to expand the PLC system in the future.
• Modular Design: Look for a PLC with a modular design that allows for easy addition of
modules.

7. Programming & Software:

• Programming Languages: Evaluate the programming languages supported by the PLC


(e.g., Ladder Logic, Function Block Diagram).

• Software Tools: Consider the availability of user-friendly programming environments and


debugging tools.

• Documentation: Ensure the PLC has comprehensive documentation for programming and
maintenance.

8. Reliability & Durability:

• Vendor Reputation: Consider the reputation of the PLC manufacturer and the reliability of
their products.

• Warranty: Evaluate the warranty offered by the manufacturer.

• Maintenance: Consider the ease of maintenance and troubleshooting.

9. Cost:

• Budget: Determine the budget for the PLC and ensure it aligns with the application
requirements.

• Life Cycle Cost: Consider the total cost of ownership, including initial cost, maintenance,
and potential downtime.

10. Power Supply Requirements:

PLC power supply is a critical factor to ensure reliability.

Voltage Levels:

• AC Power (110V–240V AC) – Used in large industrial applications.

• DC Power (24V DC) – Common in small to medium automation systems.


Redundant Power Supplies:

• Used in critical applications where power failure must be prevented.


• Ensures continuous operation even if one power source fails.

Key Consideration: Select a PLC with suitable power input and redundancy options for
reliability.

3.9 Redundancy in PLC:

Redundancy in PLC refers to the use of backup components or systems to ensure continuous
operation in case of failure. This is essential in critical industrial applications where downtime
can lead to significant losses in production, safety risks, or equipment damage.

Types of Redundancy in PLC:


• Hardware Redundancy: This involves duplicating physical components like PLCs, power
supplies, or network interfaces.

• Software Redundancy: This involves having backup software or programs that can take
over in case of a failure.

• System-Level Redundancy: This refers to the duplication of entire systems or subsystems,


ensuring that if one system fails, another can take over.

1. CPU Redundancy
o Two CPUs (main and standby) are used.
o If the primary CPU fails, the standby CPU takes over automatically.
o Ensures continuous process control without interruption.
2. Power Supply Redundancy
o Two power supplies (primary and backup) provide power to the PLC.
o If one fails, the other takes over to prevent system shutdown.
3. I/O Redundancy
o Duplicate Input/Output (I/O) modules are used.
o If one I/O module fails, the system switches to the backup module.
4. Network Redundancy
o Uses dual communication paths (e.g., two Ethernet networks).
o Ensures reliable data transmission even if one network fails.
5. Chassis/Module Redundancy
o Redundant PLC chassis with identical configurations.
o If one chassis fails, the other takes over.
The points highlighting the importance of redundancy in PLC are listed below,

• Ensuring Continuous Operation: In industries where downtime can lead to significant


losses or safety hazards, redundancy is crucial for maintaining continuous operation.

• Increased Reliability: By having backup systems in place, PLC systems can maintain their
functionality even in the face of hardware or software malfunctions, thereby ensuring high
availability and reliability.

• Reduced Downtime: Redundancy minimizes the impact of failures by allowing backup


systems to take over, reducing downtime and ensuring minimal disruption to operations.

• Safety: Redundancy is particularly important in safety-critical applications where failure can


lead to accidents or harm.

Implementation of Redundancy

o Redundant PLCs: Using multiple PLCs to control the same process or equipment, with one
acting as the primary and the others as backups.

o Redundant Power Supplies: Having multiple power supplies to ensure that if one fails, the
others can continue to power the system.

o Redundant Network Interfaces: Having multiple network interfaces to ensure that if one
fails, the others can continue to provide communication.

o Redundant I/O Modules: Having multiple I/O modules to ensure that if one fails, the others
can continue to provide input and output signals.

o Redundant Communication Protocols: Using multiple communication protocols to ensure


that if one fails, the others can continue to provide communication.

Some of the considerations for redundancy are discussed below,

✓ Cost: Redundant systems can be more expensive than non-redundant systems, so it's
important to weigh the costs and benefits.

✓ Complexity: Redundant systems can be more complex to design, implement, and maintain.
✓ Synchronization: In warm and hot redundancy, it's important to ensure that the backup PLC
is synchronized with the primary PLC.

✓ Switchover Time: The time it takes for the backup PLC to take over in case of a failure
should be as short as possible.

✓ Testing and Validation: Redundant systems should be thoroughly tested and validated to
ensure that they can operate reliably in the event of a failure.

You might also like