22EEE1662 Module-3
22EEE1662 Module-3
● Students will get introduction of PLC with its Origin and Evolution.
● Students will be able to learn the fundamental structure of a PLC.
● Students will be able to understand the deep details of PLC I/O
Components.
Lecture Content:
Introduction to PLCs
Originally, PLCs were developed to replace relay logic systems. However, their
functionality has significantly expanded over time, allowing them to be used in
increasingly complex applications. Given that a PLC's structure is similar to that
of general computer architecture, it can handle more than just relay switching
tasks; it can also manage operations such as timing, counting, calculations,
comparisons, and the processing of analog signals.
Modern control systems may still incorporate relays, but their role in logic
operations has significantly diminished. Instead, Programmable Logic
Controllers (PLCs) have taken center stage, offering a range of advantages that
extend far beyond simple logic control.
5. Versatility in Applications:
While initially developed to replace relay logic, PLCs now support a wide range
of applications, including timing, counting, complex calculations, analog signal
processing, and more. They can be used in various industries, from
manufacturing and automotive to energy and food processing.
7. Cost-Effectiveness:
Over time, PLCs have become more affordable, offering a cost-effective solution
for automation. Their ability to reduce wiring complexity, minimize human error,
and improve system efficiency translates into significant cost savings for
companies.
These benefits highlight why PLCs have become the cornerstone of modern
industrial automation, driving efficiency, safety, and innovation across various
sectors.
Origin of PLCs
The concept of the Programmable Logic Controller (PLC) emerged in the late
1960s, spurred by the demand for more adaptable and dependable control
systems in industrial settings. Prior to the advent of PLCs, manufacturing
automation heavily depended on relay-based control systems, which were not
only cumbersome and large but also difficult to modify. To address these
challenges, General Motors, a leading figure in the manufacturing industry,
sought a more efficient solution. This led to the development of the first PLC by
Bedford Associates, under the leadership of Dick Morley, who is often recognized
as the "father of the PLC." The resulting device, named the Modicon 084, was
launched in 1969, marking a significant transformation in the field of industrial
automation. The success of the Modicon 084 quickly established the PLC as an
indispensable tool in industrial automation. Its introduction marked a
significant shift in how manufacturing processes were controlled and optimized.
The ability to easily modify control logic without extensive hardware changes
meant that manufacturers could rapidly adapt to new production requirements,
leading to increased efficiency and reduced costs.
Evolution of PLCs
1. 1970s: Early PLCs were limited in memory and processing power but were
highly successful in replacing relay-based systems. Their programming
was done using ladder logic, a method that resembled electrical relay
logic,making it easier for engineers to adopt.
4. 2000s and Beyond: Modern PLCs are highly advanced, with extensive
memory, processing power, and connectivity options, including Ethernet
and wireless communication. They are integral to the Industrial Internet
of Things (IIoT), enabling real-time data collection, remote monitoring, and
predictive maintenance. Today's PLCs are more compact, energy-efficient,
and capable of handling highly complex automation tasks.
In terms of system architecture, there are two primary types: open and closed.
An open architecture design facilitates easy integration with devices and
programs from various manufacturers. Such systems utilize standard, off-the-
shelf components that adhere to established standards, promoting compatibility
and flexibility. Conversely, a closed architecture system has a proprietary design,
which can complicate the integration with other systems and may require
specific components and software from the same manufacturer. As a result, most
PLC systems operate under a proprietary framework, necessitating careful
consideration of compatibility when using generic hardware or software.
On the other hand, modular I/O systems, consist of a rack into which separate
modules can be inserted. This design significantly enhances the system's
flexibility and customization options. Users can select and arrange various
modules from the manufacturer according to their specific needs. A basic
modular PLC setup includes a rack, a power supply, a CPU module, I/O
modules, and an operator interface for programming and monitoring. This
modular approach allows for greater adaptability and easier upgrades compared
to fixed I/O systems. In a PLC system, modules are inserted into a rack, where
they connect electrically through a set of contacts known as the backplane,
located at the rear of the rack. This backplane facilitates communication between
the PLC processor and all the modules within the rack.
The power supply unit delivers DC power to the modules that are plugged into
the rack. For larger PLC systems, the power supply typically does not power the
field devices directly. Instead, these systems use external AC or DC power
supplies for field devices. In contrast, smaller micro-PLC systems might use the
internal power supply to also power the field devices.
The PLC processor, often referred to as the Central Processing Unit (CPU), acts
as the "brain" of the PLC system. The processor generally comprises a
microprocessor responsible for executing logic operations and managing
communications among the various modules. It requires memory to store the
user program instructions, numerical values, and status information from the
I/O devices. This arrangement ensures efficient processing and control within
the PLC system. The CPU manages all activities within a PLC and is designed to
allow users to program using relay ladder logic. The execution of the PLC
program follows a repetitive cycle known as a scan. During each scan, the CPU
first checks the status of the inputs. Next, it executes the application program.
After completing the program, it updates the status of all outputs. The CPU then
carries out internal diagnostics and communication tasks before beginning the
next scan. This cycle continues as long as the PLC is operating in run mode.
The I/O system acts as the interface between the field devices and the controller.
Its role is to condition the signals sent to or received from external devices. Input
devices, such as pushbuttons, limit switches, and sensors, connect through this
interface. Input devices such as pushbuttons, limit switches, and sensors are
directly connected to the PLC's input terminals. Similarly, output devices like
small motors, motor starters, solenoid valves, and indicator lights are connected
to the output terminals. To ensure electrical isolation between the PLC's internal
components and these external devices, an optical isolator is often used. This
component employs light to link the circuits while maintaining separation.
Definition: This type involves the use of fixed, dedicated machines and
systems designed for specific tasks. The setup is tailored to handle
repetitive tasks with high efficiency and minimal variation.
Flexibility: Low flexibility. Once set up, changing the process or adapting
to new tasks requires significant effort, often involving redesign or
reconfiguration of machinery.
Cost: Often higher initial investment due to the need for custom
machinery and dedicated systems.
Efficiency: Highly efficient for repetitive, high-volume tasks. Ideal for
environments where processes do not change frequently.
Maintenance: Typically, lower maintenance needs if the processes are
stable and unchanged.
Programmable Automation
1. Input Reading: The PLC begins by checking the current status of all
connected input devices, such as sensors and switches. This step involves
gathering real-time data from these devices to understand the system’s
current state.
2. Program Execution: Next, the PLC runs the user-defined program, which
is typically written in a language like ladder logic. During this stage, the
PLC processes the input data according to the programmed instructions
to determine the appropriate actions or outputs.
3. Output Update: Based on the results from the program execution, the PLC
adjusts the output devices. This could mean activating or deactivating
components such as motors, solenoids, or indicator lights to manage the
process or machinery effectively.
5. Cycle Repetition: The process starts again with reading the inputs. This
repetitive cycle allows the PLC to continuously monitor, process, and
control the system in real-time.
This scanning cycle enables the PLC to maintain effective control over automated
processes by consistently updating and responding to changes in the system.
PLC construction
Compact PLCs
Limitations:
Modular PLCs
Benefits:
Limitations:
PLC I/O components are vital for the interaction between the industrial
automation system's I/O devices and the PLC's microprocessor, which executes
the control logic. These components ensure that the PLC can accurately read
data from the physical world and send commands to control devices. Here’s a
detailed look at each key element of PLC I/O components:
1. Power Source
Purpose: The power source supplies the necessary electrical energy to the
I/O modules and their associated devices, ensuring they function properly.
Details:
Purpose: These circuits translate the signals from field devices into a
format that the PLC’s microprocessor can process and vice versa. They
handle the necessary modifications to ensure accurate data exchange.
Details:
3. Terminal Blocks
Details:
Purpose: The mounting mechanism ensures that the I/O modules are
securely attached to a panel or rack, providing stability and accessibility
for maintenance.
Details:
o Rail Mounting: Many PLC I/O modules are mounted on DIN rails,
which offer a standardized and secure method of attachment. This
method allows for easy installation and removal of modules.
o Panel Mounting: Some systems may use panel mounting, where
modules are fixed directly to a control panel or enclosure. This
method can be used in environments where space is less of a
concern.
o Backplane Mounting: Modular PLC systems often use backplane
mounting, where the modules are connected to a central backplane
that provides power and communication pathways. This setup
supports modularity and easy expansion.
These I/O components collectively enable the PLC to interface effectively with
various industrial devices, translating real-world inputs into actionable data and
ensuring that control commands are accurately executed. They are essential for
the PLC's ability to manage and control complex automation processes reliably.
The standard and most common I/O modules are the following:
Digital input and output modules are critical components in PLC systems,
enabling communication between the PLC and external devices. Here’s a detailed
look at each type of module:
Digital Input Module
Function: A digital input module receives signals from external digital devices,
such as switches, sensors, or pushbuttons. It converts these signals into a
format that the PLC's microprocessor can process.
Key Components:
1. Signal Conditioning Circuitry:
2. Isolation Circuitry:
o Purpose: Protects the PLC from electrical noise and high voltage
spikes from external devices. Isolation circuits ensure that high
voltages do not damage the PLC’s internal electronics.
o Types: May include opto-isolators or transformer-based isolation.
3. Input Filtering:
o Debouncing: For mechanical switches, input filtering is used to
debounce the signal, eliminating noise and ensuring that only
stable, clean signals are read by the PLC.
4. Terminal Block:
o Purpose: Provides connection points for wiring the external input
devices. The terminal block is designed for easy and secure wiring,
with clear labeling for each connection.
Function: A digital output module sends control signals from the PLC to external
devices such as relays, solenoids, or indicator lights. It converts the PLC’s digital
output signals into the necessary electrical signals to control these devices.
Key Components:
2. Isolation Circuitry:
o Purpose: Ensures that the PLC’s internal circuits are protected from
the electrical loads and potential spikes generated by the external
devices. This protection helps to maintain the reliability and
longevity of the PLC.
o Types: Often involves opto-isolators or relays that separate the PLC
from the high-voltage or high-current outputs.
4. Terminal Block:
Initially, PLCs were limited to handling only discrete inputs and outputs, which
restricted their use to ON-OFF control and digital elements of industrial
processes. This limitation meant that PLCs were not suitable for managing
analog control systems, which require continuous signal processing.
An analog input module in a PLC is crucial for interfacing with analog signals,
enabling the PLC to process continuous variables like temperature, pressure, or
flow. An analog input module enables a PLC to handle continuous analog signals
by converting them into digital values through an A/D converter. This capability
greatly expands the PLC’s versatility, allowing it to interact with a broader range
of industrial processes and applications that require precise measurement and
control of variables. The integration of such modules marks a significant
advancement in PLC technology, enhancing its ability to manage complex and
varied control tasks.
Here’s a detailed look at how it functions:
4. Terminal Block:
The analog signals supplied in an analog input module are standard and
compatible with the corresponding output signals of the analog input devices
(sensors or transducers). In the Table, the most common analog input devices
and the standard analog signals that we find in the analog input modules are
shown in given table
The module's design ensures that analog and digital components are electrically
isolated to protect the PLC’s microprocessor and other sensitive parts from
potential damage caused by electrical noise or faults.
Analog output modules in PLCs serve the critical function of converting digital
data generated by the PLC's central processing unit (CPU) into analog signals,
which are then used to control various analog devices such as actuators,
valves, or drives. Here's an expanded explanation of how these modules operate
and their significance:
2. Signal Conditioning:
4. Isolation:
Analog output signals produced by PLCs are typically DC, but they can effectively
control AC devices as well. For example, an analog output module can send a
varying DC signal to an AC motor controller, such as a soft starter, to regulate
the motor's speed.
Connection Types
While standard digital and analog I/O modules meet most industrial automation
needs, there are specific situations where specialized I/O modules are required.
These modules are designed to handle signals or perform tasks that standard
PLC modules cannot efficiently manage. Below are some examples of where
special purpose I/O modules are necessary:
Summary:
References:
Lecture Content:
The processor module is generally divided into two main sections: the CPU
section and the memory section. The CPU section is responsible for executing
the program and making decisions that enable the PLC to function and
communicate with other modules. The memory section, on the other hand, is
where the PLC's program and other digital information are electronically stored
for retrieval as needed.
The processor module also interfaces with the PLC's memory, where the control
program and important data are stored. This module coordinates with the power
supply to ensure the system receives the necessary voltage and manages
communication with other modules within the PLC, such as input/output
modules, to execute the control strategy effectively.
Central Processing Unit (CPU) of a PLC
While the terms "CPU" and "microprocessor" are often used interchangeably,
they refer to different aspects of the PLC's architecture. The microprocessor is
the integrated circuit responsible for executing instructions, while the CPU
encompasses the microprocessor along with additional components and circuitry
required for the PLC's full functionality. The CPU's architecture includes digital
circuits for data storage and retrieval, enabling the system to store operational
data, recall instructions, and manage input/output operations effectively.
In some PLC systems, the CPU may include multiple processors. The advantage
of multiprocessing is that it enhances the overall operating speed of the system.
Each processor in a multiprocessing setup has its own dedicated memory and
runs its own program, allowing them to operate simultaneously and
independently. This parallel processing approach reduces the total response time
as each processor scans independently.
For critical industrial processes, fault-tolerant PLC systems may include dual
processors. These systems are designed with redundancy in mind, meaning that
if one processor fails, control is automatically transferred to the secondary
processor, ensuring continuous operation without interruption. This
redundancy is crucial in environments where reliability and uptime are
paramount.
In PLCs, the Central Processing Unit (CPU) is integral to the system, though its
physical configuration may vary depending on the type of PLC. In single-unit
fixed PLCs, the CPU is built into the unit itself, whereas in modular rack-type
PLCs, the CPU is typically housed in a plug-in module. Terms such as CPU,
controller, and processor are often used interchangeably by different
manufacturers, but they all refer to the module responsible for executing the
PLC's core functions. These processors can differ in terms of processing speed
and memory capacity. In more advanced PLC systems, the processor module
may include multiple microprocessors, which work in parallel to improve overall
system performance. This multiprocessing capability allows different processors
to handle different tasks simultaneously, reducing the response time of the
system. In critical applications where reliability is essential, processor modules
may also feature redundancy. This means that if the primary processor fails, a
secondary processor can take over without any disruption to the system,
ensuring continuous operation.
Memory Organization
Writing is the process of storing data into these memory locations, while reading
refers to retrieving data from them. The complexity of the PLC program influences
the memory requirements; more complex programs demand more memory.
Memory elements in a PLC store individual pieces of information called bits,
which are the fundamental units of binary data.
Memory capacity is chosen based on the needs of the application, with larger
memory sizes accommodating more complex programs and larger volumes of
data.
In a PLC (Programmable Logic Controller), the program is stored in memory as
binary data, represented by 1s and 0s. This binary data is often organized into
16-bit units known as words. The memory size of a PLC is typically expressed in
terms of the number of words it can accommodate.
Memory locations are specific addresses within the CPU's memory where binary
words are stored. Each word is generally composed of 16 bits. The smallest unit
of data is a bit, and 8 bits together make up a byte. Understanding this memory
organization is essential for effectively designing and managing PLC-based
control systems.
The CPU routinely updates these status tables as it executes the control
program, ensuring that any changes in the state of inputs or outputs are
accurately captured and reflected in the memory. This continuous updating is
crucial for the PLC to respond dynamically to changes in the field devices and to
maintain accurate control over the process being managed.
To ensure the reliability and safety of operations, PLCs incorporate memory-
checking routines. These routines verify the integrity of the PLC’s memory to
detect any potential corruption. If memory corruption is detected, the PLC can
prevent the execution of its control program, thereby avoiding the risk of
erroneous operations and ensuring that only reliable, accurate commands are
executed. This safety feature is essential for maintaining the overall integrity of
automated processes and protecting both the equipment and the system’s
operators.
Memory Types
Memory can be placed into two general categories: vola tile and nonvolatile.
Volatile memory will lose its stored information if all operating power is lost or
removed. Volatile memory is easily altered and is quite suitable for most
applications when supported by battery backup. Nonvolatile memory has the
ability to retain stored information when power is removed accidentally or
intentionally. As the name implies, programmable logic controllers have
programmable memory that allows users to develop and modify control
programs. This memory is made nonvolatile so that if power is lost, the PLC holds
its programming.
Characteristics: It retains its contents even when the PLC loses power,
which eliminates the need for an emergency power supply to maintain its
data. In PLCs, ROM is primarily used to store the operating system and
essential firmware, ensuring that the PLC's core instructions are always
available for booting and operation.
2. Random Access Memory (RAM)
Characteristics: While EPROM retains data when power is lost, its need
for external erasing equipment and the inconvenience of chip removal have
led to its replacement by more modern technologies.
5. Flash Memory
Each memory type serves a distinct role in the PLC’s operation, from storing
critical system instructions and user programs to handling temporary data and
allowing flexibility for program updates. Understanding these memory types
helps ensure that the PLC can efficiently manage both its operational tasks and
user-defined programs while maintaining data integrity and flexibility.
1. AC Power Supplies:
Input Voltage Range: PLCs typically use AC power supplies with input voltages
like 110V, 220V, or 240V AC. The exact input voltage depends on the region and
PLC specifications.
2. DC Power Supplies:
Input Voltage Range: DC power supplies are used in systems where a DC input
is required. They may accept various DC input voltages depending on the
application.
Output Voltage: These supplies provide stable DC voltages, typically 24V DC,
12V DC, or 5V DC, as required by the PLC system.
Integrated Power Supply: Some PLCs come with an integrated power supply,
meaning the PLC enclosure includes a built-in power supply unit. This simplifies
installation and reduces the need for external components.
External Power Supply: For modular or larger PLC systems, an external power
supply is often used. This allows flexibility in selecting a power supply that meets
specific requirements and provides isolation from the PLC's internal power
needs.
Voltage Rating:
Nominal Voltage: The power supply must match the PLC’s voltage requirements
precisely. Overvoltage or undervoltage can lead to system instability or damage.
Tolerance: Power supplies usually have a tolerance range (e.g., ±5%) for the
output voltage to ensure compatibility with the PLC’s operating range.
Current Rating:
Capacity: The power supply must provide enough current to support the PLC
and all connected devices. The current rating is crucial to avoid overloading the
power supply.
1. Overvoltage Protection
2. Overcurrent Protection
3. Short-Circuit Protection
Internal Fuses: Many power supplies come equipped with internal fuses
as a built-in defense mechanism against short circuits. These fuses are
specifically designed to break the circuit if a short occurs, protecting the
power supply and connected PLC components from potential damage. This
internal safeguard ensures that the PLC system remains intact even in the
event of a severe electrical fault.
PLC Operation
By integrating these elements, the PLC can efficiently manage and execute
complex automation tasks, ensuring reliable operation and precise control over
industrial processes. The structured approach to memory organization and data
handling allows for effective program execution and robust system performance.
The choice of an electrical enclosure for PLC installation plays a pivotal role in
protecting both the equipment and personnel from potential hazards. Enclosures
are designed to meet international standards, which define their protective
capabilities.
Grounding
Proper grounding is one of the most fundamental aspects of a reliable and safe
PLC installation. Inadequate grounding not only affects the functionality of the
PLC but also poses safety risks to personnel.
The protection of low-voltage signals, such as those from analog sensors or data
lines, from electromagnetic interference is crucial in maintaining the integrity of
the signals being processed by the PLC.
Summary:
References:
Lecture Content:
While each manufacturer has its own software, the underlying principles of PLC
programming remain consistent across platforms. The primary differences lie in
memory organization, I/O addressing, and instruction sets. So, once you grasp the
basic concepts, adapting to different software becomes manageable.
PLC programming languages, as defined by the IEC 61131-3 standard, are a set of
standardized languages designed to provide versatility and flexibility for
programming PLCs. These languages allow for the creation of control programs
that dictate the operation of industrial automation systems.
Ladder Diagram, also known as Ladder Logic, is one of the most widely used PLC
programming languages, particularly in the United States. It was originally
developed to resemble electrical relay logic, making it easier for electricians and
engineers familiar with relay-based control systems to transition to PLCs.
Structure: Ladder Diagram is made up of rungs, each representing a logical
operation, similar to a rung on a ladder. These rungs contain symbols
representing contacts (inputs), coils (outputs), and other functions.
Use Cases: Ideal for simple, straightforward control processes such as on/off
control, sequencing, and basic logic operations.
Use Cases: Best suited for small, simple programs that require fast
execution, or for users who prefer a low-level programming approach.
5. Sequential Function Chart (SFC)
Each of these languages has its own strengths and is suited to different types of
applications within industrial automation. While some industries or regions may
favor one language over another, the IEC 61131-3 standard ensures that these
languages can be used interchangeably, allowing for greater flexibility in
programming and system design.
The SLC 500 series of Allen-Bradley PLCs utilizes a rack-based fixed memory
structure. This type of memory organization is systematically divided into sections
to manage the storage of both the control program and the data that the program
uses during operation.
1. Program Files:
Program Files are dedicated to storing the instructions that make up the
PLC's control logic. These instructions are written by the programmer to
dictate how the PLC should respond to various input signals and how to
control outputs.
In the SLC 500 series, the program files have a predetermined layout. For
example, File 2 is commonly the main program file (often referred to as "LAD
2"), where the core logic resides. Additional program files can be created for
subroutines or other tasks, which can be called from the main program.
• Program files store the user ladder logic program, which accounts for most of
the PLC's memory. This logic, formatted as ladder diagrams, consists of
instructions that control machine operations, with most instructions
requiring one word of memory. Program files include system functions (File
0), reserved files (File 1), the main ladder program (File 2), and subroutine
ladder programs (Files 3- 255), each serving specific roles in the controller's
operation.
Program memory Ranges from 0 to 255 but initial it start from LAD 2 as
shown in figure, 0 and 1 use for internal system, so we use 254 Ladder 2 to
255.
2. Data Files:
Data Files are sections of memory used to store the various data types
needed by the program during execution. These can include real-time data
from inputs and outputs, as well as internal variables such as timers and
counters.
• Data files store the information necessary for executing the user program,
such as the status of input and output devices, timer and counter values, and
other data. The contents of the data files are divided into status data and
numerical or coded information.
In the SLC 500 PLCs, memory allocation is structured and unchangeable, meaning
each file type has a predefined space. The term "rack-based" refers to the physical
configuration of the PLC system, where each I/O module is inserted into a specific
slot within a rack. Each slot is linked to a specific address in the PLC's memory.
Slot Addressing: Each I/O slot in the rack has a corresponding memory
address. For instance, inputs and outputs connected to Slot 1 would have
their statuses stored in the respective data files (such as File 1 for inputs
and File 0 for outputs).
This rack-based memory structure contrasts with more modern PLC systems that
use tag-based memory, where memory is more flexible, and data is organized using
descriptive tags rather than fixed memory addresses.
B3:0/0 to B3:0/15
To
The input image table file records the status of connected discrete inputs, updating
during the I/O scan phase. If an input is detected, its corresponding bit is set to 1;
if not, it is set to 0.as seen in figure
Similarly, the output image table file stores the status of connected discrete
outputs, controlled by the user program, with bits set to 1 or 0 based on the
required output state. As seen in figure
Let’s take an example of SLC 500 controller AB PLC for addressing, which is
available in 4 slots, 7 slots, 10 slots and 13 slot rack.
The program scan cycle in a PLC can be broken down into four distinct phases:
input scan, program scan, output scan, and housekeeping.
Input Scan: During this initial phase, the PLC reads the current status of all input
devices connected to it, such as sensors, switches, and other field devices. The PLC
stores this information in a dedicated memory area known as the input image
table. This table acts as a snapshot of all the inputs at that particular moment,
which the PLC uses to make decisions during the program scan phase.
Program Scan: In this phase, the PLC processes the instructions in its program,
which is often written in a language like ladder logic. The PLC evaluates each
instruction based on the input data stored in the input image table. The logic of
the program determines what actions need to be taken, such as turning on or off
specific outputs, setting flags, or performing calculations. This evaluation process
is akin to checking for logical continuity in hardwired circuits; if certain conditions
are met (i.e., there is a continuous path of true conditions in a rung), the PLC will
execute the corresponding action.
Output Scan: Once the program logic has been evaluated, the PLC updates the
output image table, which holds the status of all output devices, such as motors,
lights, or valves. The PLC then applies these updated statuses to the actual
physical outputs. This ensures that the devices controlled by the PLC reflect the
results of the program logic executed during the program scan phase.
Housekeeping: The final phase of the scan cycle involves the PLC performing
various internal tasks that ensure its smooth operation. These tasks may include
diagnostic checks, communication with other devices or systems, and updating
timers and counters. This phase is critical for maintaining the overall health and
reliability of the PLC.
The PLC repeats this entire scan cycle continuously as long as it remains in RUN
mode. This ensures that the PLC constantly monitors the system and can react to
any changes in the inputs.
The time it takes for a PLC to complete one full scan cycle is known as the scan
cycle time. This time is crucial because it dictates how quickly the PLC can
respond to changes in input conditions. Typical scan cycle times range from 1 to
20 milliseconds, though this can vary depending on the specific PLC model, the
complexity of the program, and the types of instructions used.
If an input signal changes more rapidly than the PLC’s scan time, there is a risk
that the PLC will miss the change. This is because the PLC only reads inputs
during the input scan phase, and if the input change occurs outside of this phase,
it will not be detected until the next scan cycle. Therefore, the scan time is a key
factor in the responsiveness and reliability of the control system.
Executing Program Logic: The PLC processes each rung of the ladder logic,
examining whether the conditions in the rung are true or false. If the conditions
are met, the PLC sets the corresponding output status in the output image table to
ON. This step is crucial for ensuring that the program logic is executed correctly
and that the system behaves as intended.
Updating Outputs: After evaluating the logic, the PLC updates the output image
table to reflect any changes in the output statuses. The PLC then applies these
changes to the physical output terminals, ensuring that the outputs accurately
represent the results of the logic evaluation.
This entire process ensures that each input and output is accurately represented
within the PLC’s memory, enabling precise control of the system.
Vertical Scan by Column: Modicon PLCs, on the other hand, often use a vertical
scan pattern. In this method, the PLC scans the program column by column and
page by page. This approach can affect how the program logic is executed,
particularly in complex programs with multiple branches and nested conditions.
The PLC program scan cycle is a fundamental aspect of how PLCs operate,
enabling them to monitor and control processes in real-time. By breaking down the
scan cycle into its constituent phases—input scan, program scan, output scan,
and housekeeping—we can better understand how the PLC processes inputs,
executes logic, and updates outputs. The scan cycle time is a critical parameter
that affects the system’s responsiveness, while the specific scan pattern used by
the PLC influences how the program logic is executed. A deep understanding of
these concepts is essential for anyone involved in programming, maintaining, or
troubleshooting PLC-based control systems.
Summary:
References:
Lecture Content:
Logic gates are fundamental components in PLCs, enabling the system to make
decisions based on specific input conditions. A logic gate is essentially a circuit
that has multiple inputs but only one output. This output is determined by the
particular combination of inputs, following the rules of logic.
The Role of Logic in PLCs:
Logic in PLCs is the mechanism that allows the system to evaluate conditions and
make decisions. For example, a PLC may need to determine whether a machine
should start or stop based on the status of several sensors. This decision-making
process relies on logical operations, where the PLC checks if the required
conditions are met before executing a command.
1. Basic Gates:
o AND Gate: Outputs 1 only if all inputs are 1.
o OR Gate: Outputs 1 if at least one input is 1.
o NOT Gate: Inverts the input; outputs 1 if the input is 0, and vice
versa.
2. Universal Gates:
o NAND Gate: Outputs 0 only if all inputs are 1 (inverted AND gate).
o NOR Gate: Outputs 1 only if all inputs are 0 (inverted OR gate).
3. Special Gates:
o XOR Gate (Exclusive OR): Outputs 1 if the inputs are different.
o XNOR Gate (Exclusive NOR): Outputs 1 if the inputs are the same.
These gates are the building blocks of logical functions within a PLC, allowing it to
execute complex control strategies with precision.
.
The AND Function
The AND gate is a fundamental component in digital electronics and logic systems,
including Programmable Logic Controllers (PLCs). It is designed to have two or
more input signals and a single output signal. The operation of the AND gate is
based on a straightforward principle: the output will be in a high state, represented
by the binary value 1, only if all the input signals are also in a high state.
This means that for the AND gate to produce an output of 1, every one of its inputs
must be set to 1. If any of the inputs are set to 0, the output of the AND gate will
be 0, regardless of the other input values. This behavior makes the AND gate
useful in scenarios where a particular action should only be triggered when
multiple conditions are simultaneously met.
For example, in a PLC system controlling a machine, an AND gate might be used to
ensure that the machine only starts when all safety conditions, such as a closed
door and a pressed start button, are satisfied. This ensures that the operation is
safe and meets the required criteria before proceeding.
By using AND gates in conjunction with other logic gates, complex decision-making
processes can be implemented within digital systems, allowing for precise and
reliable control of operations.
The OR Function
The OR gate is a crucial logic element used in digital circuits and systems,
including Programmable Logic Controllers (PLCs). This gate is characterized by its
ability to accept multiple input signals while providing a single output signal. The
fundamental operation of an OR gate is based on the principle that the output will
be in a high state, represented by the binary value 1, if at least one of its input
signals is in a high state.
In practical terms, the OR gate's output will be 1 if any of the input signals are 1.
The output will only be in a low state, represented by the binary value 0, when all
input signals are 0. This behavior makes the OR gate especially useful in situations
where an action or decision needs to occur if any one of several conditions is met.
For example, in a PLC system, an OR gate might be used to control a warning light
that activates if any of several monitored sensors detect an issue. Even if only one
sensor registers a problem, the OR gate will output a 1, turning on the warning
light to alert operators.
By incorporating OR gates into digital logic circuits, engineers can design systems
that respond appropriately to multiple potential triggers, ensuring flexibility and
responsiveness in control processes.
The NOT function, also known as an inverter, is a fundamental logic gate in digital
electronics and control systems, such as those used in Programmable Logic
Controllers (PLCs). Unlike other logic gates that can have multiple inputs, the NOT
gate is unique in that it only accepts a single input signal. The primary function of
the NOT gate is to invert the input signal, meaning it outputs the opposite binary
value of the input.
If the input to the NOT gate is a binary 0 (low state), the output will be a binary 1
(high state). Conversely, if the input is a binary 1, the output will be a binary 0.
This inversion process makes the NOT gate crucial in situations where it is
necessary to reverse or negate a signal.
The behavior of the NOT gate can be particularly useful in PLC applications where
an action must occur when a specific condition is not met. For example, a NOT
gate might be used to ensure that a motor stops running when a sensor does not
detect a certain condition. By inverting the sensor's signal, the NOT gate can
trigger the appropriate response, enhancing the control logic's flexibility and
reliability.
In summary, the NOT gate plays an essential role in digital logic by providing the
ability to invert signals, which is a critical function in many control and decision-
making processes.
The NAND function, short for "NOT AND," is a fundamental logic gate that plays a
crucial role in digital electronics and control systems, including Programmable
Logic Controllers (PLCs). The NAND gate is essentially a combination of an AND
gate followed by a NOT gate. It can have two or more input signals and produces a
single output.
The operation of the NAND gate is based on the inverse of the AND gate's logic. In
an AND gate, the output is 1 only if all inputs are 1. However, in a NAND gate, the
output is 0 only if all inputs are 1. If any one or more of the inputs are 0, the
output will be 1. This means that the NAND gate provides a high output (1) in all
cases except when every input is high (1), in which case the output is low (0).
This unique behavior makes the NAND gate a versatile component in digital
circuits. It can be used to implement various logic functions, as it is considered a
"universal gate." This means that any other logic function (AND, OR, NOT, etc.) can
be constructed using only NAND gates.
For example, in a PLC system, a NAND gate might be used in safety circuits to
ensure that a machine only operates when not all safety conditions are met
simultaneously. This allows for a failsafe mechanism, ensuring that the machine
shuts down or does not start if any critical condition is not satisfied.
In summary, the NAND gate is an essential building block in digital logic, providing
both flexibility and reliability in the design and operation of complex control
systems. Its ability to invert the output of an AND gate and its status as a
universal gate make it indispensable in various applications.
The NOR Function
The NOR function, short for "NOT OR," is a fundamental logic gate widely used in
digital electronics and control systems, including Programmable Logic Controllers
(PLCs). The NOR gate combines the operations of an OR gate followed by a NOT
gate. It can accept two or more input signals and produces a single output signal.
The operation of the NOR gate is based on the inversion of the OR gate's logic. In
an OR gate, the output is 1 if at least one of the inputs is 1. However, in a NOR
gate, the output is 0 if any of the inputs are 1. The output will only be 1 when all
inputs are 0. This means that the NOR gate provides a high output (1) only when
all input signals are in a low state (0).
The NOR gate's behavior makes it particularly useful in situations where a specific
action should only occur when none of the input conditions are met. For instance,
in a PLC system, a NOR gate might be used to control a warning signal that
activates only when all monitored conditions are in a safe state (all inputs are 0). If
any condition becomes unsafe (any input becomes 1), the output of the NOR gate
drops to 0, deactivating the warning signal or triggering a different response.
Like the NAND gate, the NOR gate is considered a "universal gate," meaning that it
can be used to construct any other logic gate, including AND, OR, and NOT
functions. This versatility makes the NOR gate a critical component in digital logic
design, allowing engineers to create complex circuits and control systems using a
single type of gate.
The defining characteristic of the XOR gate is that its output is HIGH (represented
by a binary 1) only when exactly one of its inputs is HIGH. If both inputs are the
same—either both HIGH (1) or both LOW (0)—the output will be LOW (0). In other
words, the XOR gate outputs a 1 only when there is an odd number of HIGH
inputs.
This behavior is particularly useful in digital systems where binary comparison is
required. The XOR gate is commonly employed to compare two binary numbers bit
by bit. If the bits being compared are different, the XOR gate outputs a 1,
indicating a difference. If the bits are the same, the XOR gate outputs a 0,
indicating no difference. This makes the XOR gate invaluable in operations such as
error detection, parity checking, and certain arithmetic functions like addition.
For example, in a PLC application, an XOR gate might be used to monitor two
sensors that should not be triggered simultaneously. If only one sensor is
triggered, the XOR gate will output a HIGH signal, which could be used to activate
an alarm or other response. However, if both sensors are triggered at the same
time, the output will be LOW, indicating a potential issue.
In summary, the XOR gate is a powerful tool in digital logic, providing the ability to
detect differences between input signals and facilitating complex decision-making
processes in various electronic and control applications.
The XNOR gate, short for "Exclusive-NOR," is a crucial logic gate in digital
electronics, often utilized in control systems such as Programmable Logic
Controllers (PLCs). The XNOR gate is essentially the complement of the XOR gate
and operates on two or more input signals to produce a single output.
The defining characteristic of the XNOR gate is that its output is HIGH
(represented by a binary 1) only when all inputs are the same—either all HIGH (1)
or all LOW (0). If the inputs differ, meaning one is HIGH and the other is LOW, the
output will be LOW (0). In other words, the XNOR gate produces a 1 when the
number of HIGH inputs is even.
This behavior makes the XNOR gate particularly useful in applications where
equality between inputs is required. For instance, the XNOR gate is often employed
in digital systems for tasks such as equality checking, where it is important to
determine whether two binary numbers are identical. When used in comparison
circuits, the XNOR gate outputs a 1 if the binary values being compared are equal,
and a 0 if they are not.
In practical applications, an XNOR gate might be used in a PLC system to ensure
that two sensors are synchronized. If both sensors detect the same condition
(either both are on or both are off), the XNOR gate outputs a HIGH signal,
indicating proper synchronization. If the sensors are out of sync, the output will be
LOW, triggering an alarm or corrective action. In summary, the XNOR gate is a
versatile logic gate that plays a critical role in digital systems, particularly in
scenarios where the equality of inputs must be verified. Its ability to output a HIGH
signal when all inputs are identical makes it invaluable in tasks like parity
checking, error detection, and other decision-making processes.
As the PLC executes the ladder program, it evaluates each rung from top to
bottom, just like how electricity flows in a physical circuit. If the conditions on a
rung are met (i.e., the logic is true), the PLC will activate the output associated with
that rung, such as turning on a motor or opening a valve. For example, consider a
simple rung where a normally open contact is used to control a coil. If the contact
is closed (indicating that a condition is true), the coil will be energized, causing the
connected device to operate. If the contact remains open (indicating the condition
is false), the coil stays de-energized, and the device does not operate.
Ladder programming is favored in industrial automation because it provides a
clear and logical representation of control processes, making it easier to design,
troubleshoot, and modify PLC programs.
3. Coil: Output
These symbols form the basic building blocks of ladder logic programming,
allowing the creation of complex control sequences through a combination of
simple inputs and outputs. By understanding how to use these symbols effectively,
one can design, implement, and troubleshoot ladder logic diagrams with greater
ease and precision.
When working with PLC ladder programming, there are specific rules that must be
followed to ensure the program operates correctly and efficiently. These rules
govern how inputs, outputs, and rungs are arranged within the ladder logic
diagram. Below are the key rules to keep in mind, along with examples of correct
and incorrect practices:
o Rule: Each rung must have at least one input connected to the left
power rail. This input can be either a Normally Open (NO) or Normally
Closed (NC) contact.
o Explanation: The rung cannot be left blank on the left side; an input
must be present to initiate the logic operation.
o Examples:
o Rule: Each rung must have at least one output connected to the right
power rail.
o Explanation: The rung cannot be left blank on the right side; an
output must be present to complete the logic operation.
o Examples:
Wrong: Rung without an output connected to the right power
rail
Right: Rung with an output coil connected to the right power
rail.
o Examples:
Wrong: Two output coils connected in series.
Right: Two output coils connected in parallel.
4. Correct Connection of Inputs and Outputs:
o Rule: Inputs should be connected to the left side (input side), and
outputs should be connected to the right side (output side) of the rung.
o Explanation: Inputs control the flow of logic, and outputs are the
result of that logic. Mixing these connections can lead to incorrect
operation.
o Examples:
Wrong: Output coil connected to the left side or input connected
to the right side.
Right: Inputs on the left side and outputs on the right side.
o Examples:
Wrong: Two identical input addresses connected in series.
Right: Different input addresses or parallel connection of the
same input address.
o Examples:
Wrong: Using an input address directly as an output.
Right: Using an output address as an input in a different
context.
7. Reuse of Input and Output Addresses:
o Rule: The same input and output addresses can be used multiple
times in the program, but keep in mind that all instances will respond
simultaneously to the same conditions.
o Explanation: Reusing addresses can simplify the program but
requires careful consideration to avoid unintended consequences.
o Examples:
Right: Reusing an input or output address across different
rungs with the understanding that they will all respond together.
These rules ensure that the PLC ladder logic is structured correctly, enabling
reliable and predictable control operations. Following these guidelines helps
prevent common errors and improves the overall efficiency of the control system.
In ladder programming, logic gates like AND, OR, NOT, NAND, NOR, XOR, and
XNOR can be implemented using basic ladder logic elements.
1. AND Function
2. OR Function
3. NOT Function
Summary:
References:
Lecture Content:
1. NAND Function
2. NOR Function
PLC programming for special gate
1. X-OR Function
2. X-NOR Function
Boolean algebra ladder programming
Key Concepts:
By using these logical operations in ladder diagrams, complex control logic can be
implemented within PLCs, providing a clear visual representation of how inputs are
processed to generate desired outputs.
1. ̅ )] = Y
(A*B) + (C*D) + [E*(𝑭 + 𝑮
3. Third Branch:
4. Final Step: Connect these three branches in parallel, with the output
leading to the coil Y.
1. First Branch:
2. Second Branch:
1) Left Section:
2) Right Section:
3) Final Output:
1. First Section:
2. NOT Operation (̅ ):
3. Final Section:
4. Here B3.0 is binary bit from data file. If B3 is low in 1st rung, in 2nd rung b3
will high, because of NC switch in 2nd rung.
Interlocking in PLC systems refers to a control technique used to ensure that certain
operations or conditions are mutually exclusive. It helps to prevent conflicting or
unsafe operations by ensuring that one process cannot start until another has
completed, or by controlling the sequence of operations.
2. Types of Interlocks:
o Series and Parallel Interlocks: Ladder diagrams can use series (AND)
and parallel (OR) configurations to establish interlocking conditions. For
example, a motor might only start if a series of conditions are true (AND
logic), or if at least one of several conditions is true (OR logic).
o Interlock Rung: Specific rungs in the ladder diagram are used to define
the interlock conditions. For instance, you might have a rung that
ensures a conveyor cannot start if a safety gate is open.
Suppose we have 3 toggle switches (SW1, SW2 and SW3) and 3 digital outputs (DI1,
DI2 and DI3), when
CASE 1 -Any one switch is ON, o/p DI1 will high only
CASE 2 -Any two switch is ON, o/p DI2 will high only
CASE 3 -All three switch is ON, then o/p DI3 will high only
To create a ladder logic program for the given scenario, we need to evaluate the
number of switches (SW1, SW2, and SW3) that are ON and then activate the
appropriate digital output (DI1, DI2, or DI3). Here’s how to approach the
programming:
We need to create logic to determine how many switches are ON at any given time:
Explanation: DI3 is high when all three switches (SW1, SW2, SW3) are ON.
Rung 2: CASE 2 (Exactly 2 Switches ON)
Explanation: DI2 is high when exactly two of SW1, SW2, or SW3 are ON (i.e., two
switches are ON, and the other one is OFF).
Explanation: DI1 is high when exactly one of SW1, SW2, or SW3 is ON (i.e., one
switch is ON, and the other two are OFF).
Step 3: Combine All Cases
You can combine the logic for all three cases in the ladder logic program, ensuring
that each output (DI1, DI2, DI3) only turns on under its respective condition.
To ensure the program functions correctly, simulate the operation by toggling SW1,
SW2, and SW3 and observing the outputs DI1, DI2, and DI3:
Only DI1 should be high when exactly one switch is ON.
Only DI2 should be high when exactly two switches are ON.
Only DI3 should be high when all three switches are ON.
This logic ensures that the outputs respond correctly based on the number of
switches activated.
o Latch Coil: When the latch coil is energized momentarily, the relay
switches to the latched (or "set") position. This means that the contacts
change state (from open to closed or vice versa) and remain in this state
even after the latch coil is de-energized.
2. Operation:
o The latching relay does not require continuous power to maintain its
state, making it energy-efficient for applications where maintaining a
particular state over long periods is essential.
o Once the relay is latched, the contacts will stay in that position until the
release coil is energized, which can be crucial for fail-safe designs in
control systems.
3. Applications:
In a PLC, the latching function can be implemented using the following instructions:
o This instruction latches the output coil (turns it ON) when a specific
condition is met.
o Example: [Condition] ---> [SET Q]
o This instruction unlatches the output coil (turns it OFF) when a different
condition is met.
o Example: [Condition] ---> [RESET Q]
When input I:1/0 is high output O:2/5 goes high. but when I:1/0 become low ,
output O:2/5 remain high, output become low , only and only when Input I:1/1
become high.
Push buttons are widely used in industrial control systems for starting and stopping
machines, motors, and processes. The preference for push buttons over toggle
switches is driven by their ability to enhance safety, provide precise control, and
integrate seamlessly with automation systems. Here’s why push buttons are
preferred and how they contribute to safety and control:
1. Safety Enhancement:
Momentary Action:
o Push buttons are typically momentary, meaning they only stay engaged
while being pressed. This ensures that machines or processes are only
activated intentionally and do not remain in an ON state due to an
accidental bump or mechanical failure.
2. Precise Control:
Controlled Start-Up:
o Green push buttons are usually used to start a machine or process.
Since the button must be held down to initiate the start sequence, this
provides operators with control over when the process begins, allowing
for a deliberate, controlled start-up.
3. User-Friendly Operation:
Intuitive Design:
o Push buttons are often color-coded (green for start, red for stop) and
ergonomically designed, making them easy for operators to use correctly
even under stressful conditions. This reduces the risk of errors and
enhances operational safety.
Push buttons are a critical component in industrial control systems because they
offer superior safety, precise control, and ease of integration with automation
systems. Their momentary action reduces the risk of accidental activation, while
their design and functionality support controlled and deliberate operation, essential
for maintaining safety and efficiency in industrial environments. If we consider the
power outage as a fault condition, after the fault, using push buttons gives you
control over when to turn the entire system back on. This is why push buttons are
used in the industry instead of toggle buttons.
Ladder Implementation