SlideShare a Scribd company logo
Definition and History of the PLC
 A PLC is a user-friendly, micro process or based specialized computer that
carries out control functions of many types and levels of complexity.
 Its purpose is to monitor crucial process parameters and adjust process
operations accordingly.
 Used extensively because the PLC – Is easy to set up and program –
Behaves predictably – Ruggedized
 It can be programmed (to a degree), controlled, and operated by a person
unskilled in operating (programming) computers.
 Essentially, a PLC's operator draws the lines and devices of ladder
diagrams with a keyboard/mouse onto a display screen.
 The resulting ladder diagram is converted into computer machine language
and run as a program.
Example PLCs
PLC basics
 Some PLCs are
– integrated into a single unit (Pico controller),
– Whereas others are modular (PLC5, SLC500)
– The Micrologix product lies somewhere between the PLC5 and the Pico
controller
• Integrated PLCs are sometimes called brick PLCs because of their small
size
– These PLCs have embedded I/O (i.e. the I/O is a part of the same unit as
the controller itself)
– Modular PLCs have extended I/O
Components in a PLC system
• CPU module, containing the processor and memory
• Input and output modules, to allow the PLC to read sensors and control
actuators – A wide variety of types are available
• Power supply for the PLC, and often sensors and low power actuators
connected to I/O modules
• A rack or bus so the PLC can exchange data with I/O modules
PLC in an automated system
Additional PLC components
• A programming unit is necessary to create, edit and download a user program
to the PLC
• Additional components can include:
– Network interfaces: to allow PLCs to function in a networked environment
– Communication adapters for remote I/O devices: so I/O devices do not have
to be physically close to the CPU module
– Operator interface devices: allow monitoring and/or data entry by operators
PLC Advantages
• Large Quantities of Contacts
– The PLC has a large number of contacts for each coil available in its
programming.
– Suppose that a panel-wired relay has four contacts and all are in use when a
design change requiring three more contacts is made.
• Time would have to be taken to procure and install a new relay or relay contact
block.
– Using a PLC, however, only three more contacts would be typed in.
• Lower Cost
– Increased technology makes it possible to condense more functions into
smaller and less expensive packages.
– Now you can purchase a PLC with numerous relays, timers, and counters, a
sequencer, and other functions for a few hundred dollars.
• Pilot Running
– A PLC programmed circuit can be evaluated in the lab. The program can be
typed in, tested, observed, and modified if needed, saving valuable factory time.
• Visual Observation
– A PLC circuit's operation can be seen during operation directly on a CRT
screen.
– The operation or mis-operation of a circuit can be observed as it happens.
• Ladder or Boolean Programming Method
• Reliability and Maintainability
• Documentation
PLC Disadvantages
• Fixed Program Applications
– Some applications are single-function applications. It does not pay to use a
PLC that includes multiple programming capabilities if they are not needed.
– Their operational sequence is seldom or never changed, so the reprogramming
available with the PLC would not be necessary.
• Fail-Safe Operation
– In relay systems, the stop button electrically disconnects the circuit; if the
power fails, the system stops.
– This, of course, can be programmed into the PLC; however, in some PLC
programs, you may have to apply an input voltage to cause a device to stop.
These systems may not be fail-safe.
Programmable Logic Controllers
Operating systems and application programs
• A PLC contains a basic operating system that allows for:
– Downloading and executing user (ladder logic) programs
– Communicating with devices
• I/O modules
• Other PLCs on a network
– Holding configuration data such as
• Number and type of I/O modules present in the PLC system
• Status information
• A PLC retains its operating system, user programs, and some data in retentive
(nonvolatile) memory
– While the PLC is off or is even disconnected from the power supply (given a
battery backup)
• A PLC can then resume running a user program as soon as power is restored
– The PLC may be programmed to require some operator action before resuming
user program execution (for safety purposes)
User program execution
• A PLC executes an initialization step when placed in run mode, then repeatedly
executes a scan cycle sequence
• The basic PLC scan cycle consists of three steps
– An input scan – A user program scan – An output scan
• The total time for one complete program scan is a function of processor speed,
I/O modules used, and length of user program
• Typically, hundreds of complete scans can take place in 1 second
Input Scan
• During the input scan, data is taken from all input modules in the system and
placed into an area of PLC memory referred to as the input image area.
User program scan
• During the program scan, data in the input image area is applied to the user
program, the user program is executed and the output image area is updated
Output scan • during the output scan, data is taken from the output image area
and sent to all output modules in the system
PLC scanning considerations
• During the input scan, input terminals are read and the input image area is
updated accordingly.
• During the program scan
– Data in the input image area is applied to the user program
– The program is executed (instructions carried out in sequence)
– The output image area is updated appropriately
• During the output scan, data associated with the output image area is
transferred to output terminals
• It is important to understand that the input, program, and output scans are
separate, independent functions
– Any changes in the status of input devices during the program or output scan
are not recognized until the next input scan
• Furthermore, data changes in the output table are not transferred to the output
terminals during the input and program scans
• The transfer affecting the output devices takes place only during the output
scan
• With all PLCs, there are special processing considerations to note
• First, all PLCs take a specific amount of time to scan their operational
programs completely
• Typically, the program scanning takes place left to right across each rung and
from the top to bottom rungs, in order
• Usually, the complete ladder scan time is a few milliseconds
• Another scanning consideration involves proper operational sequencing of
events
• An output might not go on immediately in sequence as it would in a relay logic
system
• In a relay logic system, an event occurring anywhere in the ladder control
system results in immediate action
• In a PLC ladder control diagram, however, no effect takes place until the rung
is scanned
• In most cases, the PLC logic delay effect is inconsequential
• Program (ladder logic) scanning typically takes place left to right across each
rung and from the top to bottom rungs, in order – Known as rung scanning, it is
the method used, for example, by Allen-Bradley
• Another method, used by Modicum/Schneider Automation is known as column
scanning
– Here the processor "looks" at the first contact at the top left corner and reads
the first column from top to bottom
– It next reads the second column from top to bottom, and so on
• Either method, rung or column, is appropriate
Example Program (In Logic Pro Simulator)
PLC Addressing and Basic Instructions
Basic addressing
• For the Allen-Bradley PLCs and the simulator used, the input and output image
areas (in addition to other data) are held in “data files”
• Each “data file” holds information such as
– Discrete input values
– Discrete output values
– Values associated with timers
– Values associated with counters
– Status information
– Etc.
PLC data files
Basic instructions
• Examine If Closed (XIC)
• Examine If Open (XIO)
• Output Energize (OTE)
• Output Latch (OTL)
• Output Unlatch (OTU)
• One-shot Rising (OSR)
Examine if closed (XIC)
• Alternate name: Normally open contact
• Use the XIC instruction in your ladder program to determine if a bit is on. –
When the instruction is executed, if the bit addressed is on (1), then the
instruction is evaluated as TRUE. – When the instruction is executed, if the bit
addressed is off (0), then the instruction is evaluated as FALSE
Examine if open (XIO)
• Alternate name: Normally closed contact
• Use the XIO instruction in your ladder program to determine if a bit is off. –
When the instruction is executed, if the bit addressed is on (1), then the
instruction is evaluated as FALSE. – When the instruction is executed, if the bit
addressed is off (0), then the instruction is evaluated as TRUE
Output energize (OTE)
• Alternate name: coil
• This instruction is usually used in conjunction with XIC or XIO or any other
input instruction.
• If the logic preceding the OTE instruction is true (1), the OTE instruction will
be energized
Output latch (OTL)
• The OTL instruction is used only to turn a bit on and latch it on
Output unlatch (OTU)
• The OTU instruction is used only to turn a bit off and latch it off
• OTL and OTU are generally used in pairs
One-shot rising (OSR)
When the rung conditions preceding the OSR go from false-totrue, the OSR
instruction goes true also but for only one scan
• The address on the OSR instruction is a bit that is used to reflect the state of the
input to the OSR
Branches
• Branches can be inserted in ladder logic programs to create parallel
combinations of various ladder logic elements
Multiple Series/Parallel Branches
• Multiple series/parallel branches can be utilized with multiple inputs and also
affecting multiple outputs in parallel
PLC simulator usage
• Ladder logic elements (instructions) can be dragged and dropped onto the
ladder window to create a ladder logic program
• The ladder logic program is executed by going online, „downloading‟ the PLC
program, and switching to run mode
Prose simulations
• The Logixpro simulator provides a set of built-in simulations
• The I/O simulation initially will be of most use since it provides access to
simulated discrete inputs (switches) and outputs (lamps)
Other Prose simulations
• Available simulators
– Door simulator
– Silo simulator
– Traffic simulator
– Batch simulator
– Dual Compressor simulator
– Bottle line simulator
– Four floor elevator simulator
• Most projects will involve designing ladder logic programs to control these
simulations
Boolean logic control programs
• Boolean logic control programs examine and control on and off states –
Boolean here is used interchangeably with the word “discrete”
• Each control program (ladder diagram sequence) can contain one or more
conditionals
• Example – If (a part is on the conveyor) AND (there is not a box in the chute)
THEN (turn the conveyor motor on)
• In terms of sensors and actuators this becomes
– If (sensor A is ON) AND (sensor B is NOT ON) THEN (turn actuator C ON)
Logical AND ladder diagram
•the logical AND function is constructed by series combinations of digital
(discrete) inputs – Two (or more) series components
I: 1/0 AND I:1/1
• The logical OR function is constructed by parallel combinations of digital
(discrete) inputs – Two (or more) parallel component
Logical NOT
• The logical NOT function is constructed by referencing the input signal with a
normally closed contact (XIO instruction)
Start-Stop-Seal Circuit
• For PLC systems without latch and unlatch instructions, a circuit is needed that
will allow a process to start, continue to run after a start button is released, and
stop under control of another button
– A circuit that implements this functionality is commonly referred to as a start-
stop-seal circuit
• A feedback path (i.e. a contact) that references the output is normally used to
seal around the start contact
 Start-stop-seal ladder diagram
Start-stop-seal variations
• In practice several start and/or several stop buttons can be used in a process
• Start buttons (with XIC instructions) can be used – In series if it is required that
ALL be pressed before a process starts – In parallel if pressing ANY start button
is to start a process
• Stop buttons (with XIO instructions) are normally used in series if pressing
ANY stop button is to stop a process
Start-stop-seal circuit example
Interlock Circuits
• Interlocks can prohibit output(s) from energizing under a certain condition
• Example: O: 2/0 should not energize if O: 2/1 is energized (and vice versa)
Formatting considerations
• Ladder logic rungs should be formatted so the reader can easily infer the
meaning of the intended logic
• One mechanism to help this is the grouping of related signals within an area on
a given rung of logic
• For example: – Group signals together that have some common intent
• Start signals
• Stop signals
• Emergency stop signals (E-stop)
• Interlocks – Controls that might have greater importance (i.e. E-stop) might
be located on the left hand side of the rung if possible
Formatting consideration
This is also a good example of instruction and rung documentation.
Properly formatted outputs
• An output energize instruction (OTE) referencing a specific output bit should
appear only once in a ladder logic program
• If more than one output is to be controlled by a certain rung of ladder logic, the
output energizes (OTE) instructions can be placed in parallel
PLC Timer Functions
Timer Uses
• The timing block functions are used with various contact arrangements and in
multiples to accomplish various timing tasks.
• Typical industrial timing tasks include timing of the intervals for welding,
painting, and heat treating.
• Timers can also predetermine the interval between two operations.
• With a PLC you can utilize as many timer blocks as you need, within the PLC
memory limitations.
• Here we illustrate the basic PLC TIME DELAYON function and some other
derived timing functions.
• Typical of the derived functions are – TIME DELAY-OFF, – interval pulse
timing, – and multiple pulse timing of more than one process operation.
• One major advantage of the PLC timer is that its time may be a programmable
variable time as well as a fixed time.
• The variable time interval may be in accordance with a changing register value.
• Another advantage of the PLC timer is that its timer accuracy, repeatability,
and reliability are extremely high because it is based on solid-state technology.
Non-retentive Timers
• A single-input timer called a non-retentive timer is used in some PLCs. –
Energizing Me: 1/0 causes the timer to run for 4 seconds.
– At the end of 4 seconds the output (DN) goes on. When the input is de-
energized, the output goes off and the timer resets to 0.
– If the input I: 1/0 is turned off during the timing interval (for example, after 2.7
seconds), the timer resets to 0.
– TON is the basic non-retentive timer in Allen-Bradley PLCs
Timer Information
• The timer table contains all information for that timer
– /EN: Timer is enabled (i.e. the input rung is energized)
– /TT: Timer is timing
– /DN: Timer is done
– .PRE: Timer preset value (point at which the timer stops timing)
– .ACC: Timer accumulator (accumulated time value)
Timer Delay off (TOF)
• The TOF timer functions the opposite of the TON timer.
– De-Energizing Me: 1/0 causes the timer to run for 4.5 seconds. The DN bit is
initially set.
– At the end of 4.5 seconds the output (DN) goes off. When the input is
energized the timer resets to 0.
– If the input I: 1/0 is turned on during the timing interval (for example, after 2.7
seconds), the timer resets to 0
Retentive Timers (RTO) • Functions exactly like TON except the
accumulated time value is retained even if the input rung is reenergized.
Timer Reset Coils (RES) • A reset coil (RES) can be associated with a timer
to provide a means of resetting the accumulated time value (and status bits) at
any given time
Examples of Timer Function Applications
• On delay – Output B comes on at a specific set time after output A is turned
on. When A is turned off, B also goes off.
• Limited on time – A and B go on at the same time. B goes off after specific set
time period, but remains on.
• One-shot operation – Output B goes on for a specified time after output A is
turned on. Output B will run for its specified time interval even if A is turned off
during the B timing interval.
• Interval time within a cycle – We may require that an output come on 7.5
seconds after system startup, remain on for 4.5 seconds, and then go off and stay
off. The interval would repeat only after the system is shut off and then turned
back on.
On Delay Timer Function • the first example is the simplest form of time
delay.
– When the circuit is turned on, one action takes place.
– A specified time later, another action occurs.
– O: 2/1 energizes exactly 8 seconds after O: 2/0 energizes, provided I: 1/0
remains energized
Limited On-Time Timer Function
• This example illustrates a situation in which two outputs go on at the same
time.
• Then, one of them is to go off after a preset period of time.
• One output, O: 2/0 stays on; the other output, O: 2/1, turns off at the end of the
timing interval.
Resetting is accomplished by turning me: 1/0 off.
• The next example is a one-shot system. – The done bit comes on after its
specified time period even if the input is turned off during the timing period.
Interval Time With in a Cycle
• This example is for a timed interval of a number of seconds after the start of a
process operation.
– This time interval is sometimes called an embedded time interval.
– A fan is to come on 8.7 seconds after a system is turned on.
– It is then to run until 16 seconds after the system is turned on, which is a net
time of 7.3 seconds.
PLC Counter Functions
Introduction
• PLC counters have programming formats which are similar to timer formats
• Transitions on counter input rung causes the counter to count up (or down)
• Counter reset is accomplished via the (RES) instruction
Up Counter (CTU)
• The CTU is an instruction that counts false-to-true rung transitions.
– Rung transitions can be caused by events occurring in the program (from
internal logic or by external devices) such as parts traveling past a detector or
actuating a limit switch.
• When rung conditions for a CTU instruction have made a false-to-true
transition, the accumulated value is incremented by one count, provided that the
rung containing the CTU instruction is evaluated between these transitions.
– The ability of the counter to detect false–to–true transitions depends on the
speed (frequency) of the incoming signal.
• The accumulated value is retained when the rung conditions again become
false.
• The accumulated count is retained until cleared by a reset (RES) instruction.
Up Counter Example
• Accumulated count is reset only by the (RES) instruction
• The counter will increment the accumulator value even after the preset is
reached
Using Status Bits (CTU)
This bit Is Set When And remains set until
Count Up
Overflow Bit
(OV)
Accumulated value
wraps around to -32768
(from +32767)
A (RES) instruction with
the same address as the
CTU instruction is
enabled OR the count is
decremented less than or
equal to +32767 with a
countdown (CTD)
instruction
Done Bit (DN) Accumulated value is
equal to or greater than
the present value
Accumulated value
becomes less than the
present value
Count Up Enable
Bit (CU)
Rung conditions are true Rung conditions go false
or a (RES) instruction
with the same address as
the CTU instruction is
enabled
Down Counter (CTD)
• The CTD is an instruction that counts false-to-true rung transitions. – Rung
transitions can be caused by events occurring in the program such as parts
traveling past a detector or actuating a limit switch.
• When rung conditions for a CTD instruction have made a false-to-true
transition, the accumulated value is decremented by one count, provided that the
rung containing the CTD instruction is evaluated between these transitions.
• The accumulated counts are retained when the rung conditions again become
false.
• The accumulated count is retained until cleared by a reset (RES) instruction.
Down Counter Example
• Accumulated count is reset only by the (RES) instruction
• The counter will decrement the accumulator value even after a 0 count is
reached
Counter Applications
• Straight counting in a process
– The counter output goes on after the set count is received by repetitive pulses
to the counter input.
• A process where a timed interval is started when a count reaches a preset value
• A process where a count of events is to start after a fixed time interval
Straight Counting in a Process
• After a certain number of counts occur, the output goes on.
• The output can be used to energize an indicator.
• The output status could also be utilized in the ladder diagram logic in the form
of a contact.
• Either counter will function (count) if its input rung transitions from false-to-
true.
• After the count input receives 18 pulses, the O: 2/0 output will energize.
Time a Process after a Count has been reached
• After a count of 5 from a sensor, a paint spray is to run for 25 seconds.
Delayed Start of the Counting Process
• In this process we do not wish to start counting until one hour after the process
starts.
• A timer output contact in the timer run line closes after the time period. • The
closure then enables the counter to start counting input pulses.
• After a count of 150, the output comes on.
Configuring Allen Bradley Relinks and RSLogix for Use with the PLC
Trainer
Accessing and using the PLC trainers located in 2003 SERC requires that
the Relinks software be properly configured for communication. Begin by
executing the All Programs->Rockwell Software->Relinks->Relinks
Classic utility. If the Relinks software is executing, the icon should be
present in the system tray. The Relinks software must be running to
communicate with the PLCs on the network. With the PLC running,
opening this software should show the state of the PLC in a window
similar to Figure 1 below.
Figure 1. Relinks with RSWho Browsing Ethernet Network.
The communication parameters have already been setup for communication
between the PC and the PLC. This was done within Relinks by first selecting a
driver (Communications->Configure Driver). This was done by selecting the
Ethernet/IP Driver as the driver type and then selecting the driver name as
AB_ETHIP-1(the default). The IP addresses for the four PLC trainers in the lab
are given in Table 1. Note these IP addresses are dynamically assigned and may
possibly change. The specific IP address assigned to a PLC on the network can
be checked on the PLC itself. On the MicroLogix 1100 PLC, press the front
Panel ESC button and then press the down arrow key until the Advance Set
function is selected. Press OKand press the down arrow key until the ENET
Cogfunction is selected. Press OKto show the current IP address for the PLC.
Press ESCuntil the I/O Status function is selected. Press OKto return to the I/O
Status screen
Table 1. PLC Trainer IP Addresses
PLC
Station
PLC Trainer IP
addresses PLC Lab
Layout
1 10.115.222.50
2
`10.115.222.72
3 10.115.222.75
4 10.115.222.99
Use Relinks to verify the status of each PLC on the network. With the
communication driver setup, the RSLogix software may be used to define a
program for download and execution on the PLC trainer. The startup state of the
RSLogix software is shown in Figure 2.
Figure 2. RSLogix Startup Screen
The first step in the creation of a new ladder logic program is the specification
of the processor type, the communication driver, and the processor node
number. For our installation, the processor type will be the MicroLogix 1100
(Series B). The communications settings will set the driver type (AB_ETHIP-
1), the processor node number (we will use the default), and the timeout (10 sec.
is the default value).
Select File->New to begin a new PLC program. The “Who Active” button will
initiate the Relinks software that will allow you to search for active PLCs on a
given network. Optionally, the processor may be given a name. The screen
capture shown in Figure 3 gives the appropriate processor type settings. Use the
“Who Active” button on the “Select Processor Type” screen to select a
particular PLC as the target for your program.
Figure 3. Processor Type Configuration Screen
After the processor type is configured, an empty ladder diagram is displayed
within RSLogix as shown in Figure 4 below
Figure 3. Processor Type Configuration Screen
After the processor type is configured, an empty ladder diagram is displayed
within RSLogix as shown in Figure 4 below.
Figure 4. RSLogix Ladder Logic Screen.
The next step in the configuration process requires the identification and
selection of all I/O modules attached to the PLC and the specification of their
location (under Controller, select IO Configuration). The 1762-IF2OF2
module should be selected into slot one. The I/O module configuration can also
be accomplished by selecting “Read IO Config” which will read the current
I/O module setup for the selected PLC. Results of this configuration step are
shown in Figure 5.
Figure 5. I/O Configuration Scree
The communication channel configuration parameters should be verified by
selecting the Channel Configurationentry located under the controller folder.
The settings under the “General” and “Channel 1” tabs should match Figures 6
and 7 given below. Make sure that the BOOTP Enable checks box is not checked
and that the DHCP Enablecheck box is
Figure 6. General Channel Configuration Tab.
Figure 7. Channel One Configuration Tab.
At this point, the program is completely configured and ladder logic instructions
may be added. Figure 8 shows a screen capture with the state of the RSLogix
software with selected data tables displayed.
Figure 8. RS Logic with Sample Data Files Shown.
After the ladder logic code is written, commented, and saved to a file, it
must be verified (for syntactic correctness) before being downloaded to
the PLC. The computer icon with the check symbol on the menu can
be used to accomplish this. If the program verifies as syntactically
correct, it can be downloaded to the PLC using the drop down box
labeled as OFFLINE in Figure 8. This drop down box displays the state
of the communication with the PLC: OFFLINE, REMOTE PROG,
RUN, etc. Other elements of the RSLogix software may be explored
using the online help facility.

More Related Content

What's hot

Part 5 PLC inputs & outputs
Part 5 PLC inputs & outputsPart 5 PLC inputs & outputs
Part 5 PLC inputs & outputs
KuldeepMakwana6
 
programmable logic controller presentation
programmable logic controller presentationprogrammable logic controller presentation
programmable logic controller presentation
Ashutosh Verma
 
Plc example presentation
Plc example presentationPlc example presentation
Plc example presentationRoshit Kadiru
 
automation slides,plc,scada,HMI
automation slides,plc,scada,HMIautomation slides,plc,scada,HMI
automation slides,plc,scada,HMI
BOSCH
 
Plc and scada
Plc and scadaPlc and scada
Plc and scada
Ratnesh Verma
 
Plc basics
Plc   basicsPlc   basics
PLC(Programmable Logic Controller)-Control system Engineering.
PLC(Programmable Logic Controller)-Control system Engineering.PLC(Programmable Logic Controller)-Control system Engineering.
PLC(Programmable Logic Controller)-Control system Engineering.
Tahmid Rongon
 
Programming logic controllers (plc) seminar
Programming  logic controllers (plc) seminarProgramming  logic controllers (plc) seminar
Programming logic controllers (plc) seminar
manish gharte
 
plc-basics.pptx
plc-basics.pptxplc-basics.pptx
plc-basics.pptx
AyyarKandasamy1
 
PLC
PLCPLC
Plc
PlcPlc
Plc notes
Plc notesPlc notes
Plc notes
Nishant Bhamare
 
Industrial automation (PLC, SCADA, VFD & HMI)
Industrial automation (PLC, SCADA, VFD & HMI)Industrial automation (PLC, SCADA, VFD & HMI)
Industrial automation (PLC, SCADA, VFD & HMI)
Praveen Ramola
 
Getting started with PLCs
Getting started with PLCsGetting started with PLCs
Getting started with PLCs
plc_course
 
PLC - Programmable Logic Controller
PLC - Programmable Logic ControllerPLC - Programmable Logic Controller
PLC - Programmable Logic Controller
Mahesh Vadhavaniya profmjv
 

What's hot (20)

Part 5 PLC inputs & outputs
Part 5 PLC inputs & outputsPart 5 PLC inputs & outputs
Part 5 PLC inputs & outputs
 
programmable logic controller presentation
programmable logic controller presentationprogrammable logic controller presentation
programmable logic controller presentation
 
Plc example presentation
Plc example presentationPlc example presentation
Plc example presentation
 
automation slides,plc,scada,HMI
automation slides,plc,scada,HMIautomation slides,plc,scada,HMI
automation slides,plc,scada,HMI
 
Presentaton on Plc & Scada
Presentaton on Plc & ScadaPresentaton on Plc & Scada
Presentaton on Plc & Scada
 
Plc presentation
Plc presentation Plc presentation
Plc presentation
 
Plc and scada
Plc and scadaPlc and scada
Plc and scada
 
Plc basics
Plc   basicsPlc   basics
Plc basics
 
PLC(Programmable Logic Controller)-Control system Engineering.
PLC(Programmable Logic Controller)-Control system Engineering.PLC(Programmable Logic Controller)-Control system Engineering.
PLC(Programmable Logic Controller)-Control system Engineering.
 
Plc Basics
Plc BasicsPlc Basics
Plc Basics
 
Programming logic controllers (plc) seminar
Programming  logic controllers (plc) seminarProgramming  logic controllers (plc) seminar
Programming logic controllers (plc) seminar
 
plc-basics.pptx
plc-basics.pptxplc-basics.pptx
plc-basics.pptx
 
PLC
PLCPLC
PLC
 
Plc
PlcPlc
Plc
 
Plc notes
Plc notesPlc notes
Plc notes
 
Plc basics
Plc basicsPlc basics
Plc basics
 
Plc syllabus
Plc syllabusPlc syllabus
Plc syllabus
 
Industrial automation (PLC, SCADA, VFD & HMI)
Industrial automation (PLC, SCADA, VFD & HMI)Industrial automation (PLC, SCADA, VFD & HMI)
Industrial automation (PLC, SCADA, VFD & HMI)
 
Getting started with PLCs
Getting started with PLCsGetting started with PLCs
Getting started with PLCs
 
PLC - Programmable Logic Controller
PLC - Programmable Logic ControllerPLC - Programmable Logic Controller
PLC - Programmable Logic Controller
 

Similar to PLC

Sandeeprana
SandeepranaSandeeprana
Sandeeprana
Sandeep Rana
 
lect 01 (1).pdf
lect 01 (1).pdflect 01 (1).pdf
lect 01 (1).pdf
Mahamad Jawhar
 
Plc introduction
Plc  introductionPlc  introduction
Plc introduction
Yasir Hashmi
 
MECHATRONICS-UNIT 4-PROGRAMMABLE LOGIC CONTROLLER .ppt
MECHATRONICS-UNIT 4-PROGRAMMABLE LOGIC CONTROLLER .pptMECHATRONICS-UNIT 4-PROGRAMMABLE LOGIC CONTROLLER .ppt
MECHATRONICS-UNIT 4-PROGRAMMABLE LOGIC CONTROLLER .ppt
CHANDRA KUMAR S
 
L3 Programmable logic controller
L3 Programmable logic controllerL3 Programmable logic controller
L3 Programmable logic controller
taruian
 
Lect01
Lect01Lect01
UNIT-IV.ppt
UNIT-IV.pptUNIT-IV.ppt
Chapter 1
Chapter 1Chapter 1
Chapter 1
maziyahump
 
PLC basic concepts
PLC  basic conceptsPLC  basic concepts
PLC basic concepts
Yasir Hashmi
 
Introduction to PLC
Introduction to PLCIntroduction to PLC
Introduction to PLC
Veerakumar S
 
Programmable Logic Controllers (1).pptx
Programmable Logic Controllers (1).pptxProgrammable Logic Controllers (1).pptx
Programmable Logic Controllers (1).pptx
ssuserf399e11
 
IIA module 6
IIA module 6IIA module 6
IIA module 6
HARITHA A.S
 
PLC
PLCPLC
Lect02
Lect02Lect02
chapter 2 IE.pptx
chapter 2 IE.pptxchapter 2 IE.pptx
chapter 2 IE.pptx
Harshal Vaidya
 
PLC-converted.pdf
PLC-converted.pdfPLC-converted.pdf
PLC-converted.pdf
SaidAbouzeid1
 
UNIT IV PROGRAMMABLE LOGIC CONTROLLER
UNIT IV PROGRAMMABLE LOGIC CONTROLLER UNIT IV PROGRAMMABLE LOGIC CONTROLLER
UNIT IV PROGRAMMABLE LOGIC CONTROLLER
ravis205084
 

Similar to PLC (20)

Sandeeprana
SandeepranaSandeeprana
Sandeeprana
 
lect 01 (1).pdf
lect 01 (1).pdflect 01 (1).pdf
lect 01 (1).pdf
 
Plc introduction
Plc  introductionPlc  introduction
Plc introduction
 
MECHATRONICS-UNIT 4-PROGRAMMABLE LOGIC CONTROLLER .ppt
MECHATRONICS-UNIT 4-PROGRAMMABLE LOGIC CONTROLLER .pptMECHATRONICS-UNIT 4-PROGRAMMABLE LOGIC CONTROLLER .ppt
MECHATRONICS-UNIT 4-PROGRAMMABLE LOGIC CONTROLLER .ppt
 
L3 Programmable logic controller
L3 Programmable logic controllerL3 Programmable logic controller
L3 Programmable logic controller
 
Lect01
Lect01Lect01
Lect01
 
PLC.pdf
PLC.pdfPLC.pdf
PLC.pdf
 
UNIT-IV.ppt
UNIT-IV.pptUNIT-IV.ppt
UNIT-IV.ppt
 
Chapter 1
Chapter 1Chapter 1
Chapter 1
 
plc_scada.pptx
plc_scada.pptxplc_scada.pptx
plc_scada.pptx
 
PLC basic concepts
PLC  basic conceptsPLC  basic concepts
PLC basic concepts
 
Introduction to PLC
Introduction to PLCIntroduction to PLC
Introduction to PLC
 
Programmable Logic Controllers (1).pptx
Programmable Logic Controllers (1).pptxProgrammable Logic Controllers (1).pptx
Programmable Logic Controllers (1).pptx
 
IIA module 6
IIA module 6IIA module 6
IIA module 6
 
PLC
PLCPLC
PLC
 
Lect02
Lect02Lect02
Lect02
 
chapter 2 IE.pptx
chapter 2 IE.pptxchapter 2 IE.pptx
chapter 2 IE.pptx
 
Cqm1 h
Cqm1 hCqm1 h
Cqm1 h
 
PLC-converted.pdf
PLC-converted.pdfPLC-converted.pdf
PLC-converted.pdf
 
UNIT IV PROGRAMMABLE LOGIC CONTROLLER
UNIT IV PROGRAMMABLE LOGIC CONTROLLER UNIT IV PROGRAMMABLE LOGIC CONTROLLER
UNIT IV PROGRAMMABLE LOGIC CONTROLLER
 

Recently uploaded

Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
TeeVichai
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
Amil Baba Dawood bangali
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
Osamah Alsalih
 
English lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdfEnglish lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdf
BrazilAccount1
 
ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
AhmedHussein950959
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Teleport Manpower Consultant
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
AJAYKUMARPUND1
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
seandesed
 
The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
ankuprajapati0525
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Sreedhar Chowdam
 
AP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specificAP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specific
BrazilAccount1
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
Pipe Restoration Solutions
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation & Control
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
thanhdowork
 
space technology lecture notes on satellite
space technology lecture notes on satellitespace technology lecture notes on satellite
space technology lecture notes on satellite
ongomchris
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
JoytuBarua2
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
karthi keyan
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
zwunae
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
Jayaprasanna4
 

Recently uploaded (20)

Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
 
English lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdfEnglish lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdf
 
ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
 
The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
 
AP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specificAP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specific
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
 
space technology lecture notes on satellite
space technology lecture notes on satellitespace technology lecture notes on satellite
space technology lecture notes on satellite
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
 

PLC

  • 1. Definition and History of the PLC  A PLC is a user-friendly, micro process or based specialized computer that carries out control functions of many types and levels of complexity.  Its purpose is to monitor crucial process parameters and adjust process operations accordingly.  Used extensively because the PLC – Is easy to set up and program – Behaves predictably – Ruggedized  It can be programmed (to a degree), controlled, and operated by a person unskilled in operating (programming) computers.  Essentially, a PLC's operator draws the lines and devices of ladder diagrams with a keyboard/mouse onto a display screen.  The resulting ladder diagram is converted into computer machine language and run as a program. Example PLCs PLC basics  Some PLCs are – integrated into a single unit (Pico controller),
  • 2. – Whereas others are modular (PLC5, SLC500) – The Micrologix product lies somewhere between the PLC5 and the Pico controller • Integrated PLCs are sometimes called brick PLCs because of their small size – These PLCs have embedded I/O (i.e. the I/O is a part of the same unit as the controller itself) – Modular PLCs have extended I/O Components in a PLC system • CPU module, containing the processor and memory • Input and output modules, to allow the PLC to read sensors and control actuators – A wide variety of types are available • Power supply for the PLC, and often sensors and low power actuators connected to I/O modules • A rack or bus so the PLC can exchange data with I/O modules PLC in an automated system
  • 3. Additional PLC components • A programming unit is necessary to create, edit and download a user program to the PLC • Additional components can include: – Network interfaces: to allow PLCs to function in a networked environment – Communication adapters for remote I/O devices: so I/O devices do not have to be physically close to the CPU module – Operator interface devices: allow monitoring and/or data entry by operators PLC Advantages • Large Quantities of Contacts – The PLC has a large number of contacts for each coil available in its programming. – Suppose that a panel-wired relay has four contacts and all are in use when a design change requiring three more contacts is made. • Time would have to be taken to procure and install a new relay or relay contact block. – Using a PLC, however, only three more contacts would be typed in.
  • 4. • Lower Cost – Increased technology makes it possible to condense more functions into smaller and less expensive packages. – Now you can purchase a PLC with numerous relays, timers, and counters, a sequencer, and other functions for a few hundred dollars. • Pilot Running – A PLC programmed circuit can be evaluated in the lab. The program can be typed in, tested, observed, and modified if needed, saving valuable factory time. • Visual Observation – A PLC circuit's operation can be seen during operation directly on a CRT screen. – The operation or mis-operation of a circuit can be observed as it happens. • Ladder or Boolean Programming Method • Reliability and Maintainability • Documentation PLC Disadvantages • Fixed Program Applications – Some applications are single-function applications. It does not pay to use a PLC that includes multiple programming capabilities if they are not needed. – Their operational sequence is seldom or never changed, so the reprogramming available with the PLC would not be necessary. • Fail-Safe Operation – In relay systems, the stop button electrically disconnects the circuit; if the power fails, the system stops. – This, of course, can be programmed into the PLC; however, in some PLC programs, you may have to apply an input voltage to cause a device to stop. These systems may not be fail-safe.
  • 5. Programmable Logic Controllers Operating systems and application programs • A PLC contains a basic operating system that allows for: – Downloading and executing user (ladder logic) programs – Communicating with devices • I/O modules • Other PLCs on a network – Holding configuration data such as • Number and type of I/O modules present in the PLC system • Status information • A PLC retains its operating system, user programs, and some data in retentive (nonvolatile) memory – While the PLC is off or is even disconnected from the power supply (given a battery backup) • A PLC can then resume running a user program as soon as power is restored – The PLC may be programmed to require some operator action before resuming user program execution (for safety purposes) User program execution • A PLC executes an initialization step when placed in run mode, then repeatedly executes a scan cycle sequence • The basic PLC scan cycle consists of three steps – An input scan – A user program scan – An output scan • The total time for one complete program scan is a function of processor speed, I/O modules used, and length of user program • Typically, hundreds of complete scans can take place in 1 second Input Scan • During the input scan, data is taken from all input modules in the system and placed into an area of PLC memory referred to as the input image area.
  • 6. User program scan • During the program scan, data in the input image area is applied to the user program, the user program is executed and the output image area is updated Output scan • during the output scan, data is taken from the output image area and sent to all output modules in the system PLC scanning considerations • During the input scan, input terminals are read and the input image area is updated accordingly. • During the program scan – Data in the input image area is applied to the user program – The program is executed (instructions carried out in sequence) – The output image area is updated appropriately
  • 7. • During the output scan, data associated with the output image area is transferred to output terminals • It is important to understand that the input, program, and output scans are separate, independent functions – Any changes in the status of input devices during the program or output scan are not recognized until the next input scan • Furthermore, data changes in the output table are not transferred to the output terminals during the input and program scans • The transfer affecting the output devices takes place only during the output scan • With all PLCs, there are special processing considerations to note • First, all PLCs take a specific amount of time to scan their operational programs completely • Typically, the program scanning takes place left to right across each rung and from the top to bottom rungs, in order • Usually, the complete ladder scan time is a few milliseconds • Another scanning consideration involves proper operational sequencing of events • An output might not go on immediately in sequence as it would in a relay logic system • In a relay logic system, an event occurring anywhere in the ladder control system results in immediate action • In a PLC ladder control diagram, however, no effect takes place until the rung is scanned • In most cases, the PLC logic delay effect is inconsequential • Program (ladder logic) scanning typically takes place left to right across each rung and from the top to bottom rungs, in order – Known as rung scanning, it is the method used, for example, by Allen-Bradley • Another method, used by Modicum/Schneider Automation is known as column scanning – Here the processor "looks" at the first contact at the top left corner and reads the first column from top to bottom – It next reads the second column from top to bottom, and so on • Either method, rung or column, is appropriate
  • 8. Example Program (In Logic Pro Simulator) PLC Addressing and Basic Instructions Basic addressing • For the Allen-Bradley PLCs and the simulator used, the input and output image areas (in addition to other data) are held in “data files” • Each “data file” holds information such as – Discrete input values – Discrete output values – Values associated with timers – Values associated with counters – Status information – Etc. PLC data files
  • 9. Basic instructions • Examine If Closed (XIC) • Examine If Open (XIO) • Output Energize (OTE) • Output Latch (OTL) • Output Unlatch (OTU) • One-shot Rising (OSR) Examine if closed (XIC) • Alternate name: Normally open contact • Use the XIC instruction in your ladder program to determine if a bit is on. – When the instruction is executed, if the bit addressed is on (1), then the instruction is evaluated as TRUE. – When the instruction is executed, if the bit addressed is off (0), then the instruction is evaluated as FALSE Examine if open (XIO) • Alternate name: Normally closed contact
  • 10. • Use the XIO instruction in your ladder program to determine if a bit is off. – When the instruction is executed, if the bit addressed is on (1), then the instruction is evaluated as FALSE. – When the instruction is executed, if the bit addressed is off (0), then the instruction is evaluated as TRUE Output energize (OTE) • Alternate name: coil • This instruction is usually used in conjunction with XIC or XIO or any other input instruction. • If the logic preceding the OTE instruction is true (1), the OTE instruction will be energized Output latch (OTL) • The OTL instruction is used only to turn a bit on and latch it on Output unlatch (OTU) • The OTU instruction is used only to turn a bit off and latch it off • OTL and OTU are generally used in pairs One-shot rising (OSR) When the rung conditions preceding the OSR go from false-totrue, the OSR instruction goes true also but for only one scan • The address on the OSR instruction is a bit that is used to reflect the state of the input to the OSR Branches • Branches can be inserted in ladder logic programs to create parallel combinations of various ladder logic elements Multiple Series/Parallel Branches
  • 11. • Multiple series/parallel branches can be utilized with multiple inputs and also affecting multiple outputs in parallel PLC simulator usage • Ladder logic elements (instructions) can be dragged and dropped onto the ladder window to create a ladder logic program • The ladder logic program is executed by going online, „downloading‟ the PLC program, and switching to run mode Prose simulations • The Logixpro simulator provides a set of built-in simulations • The I/O simulation initially will be of most use since it provides access to simulated discrete inputs (switches) and outputs (lamps)
  • 12. Other Prose simulations • Available simulators – Door simulator – Silo simulator – Traffic simulator – Batch simulator – Dual Compressor simulator – Bottle line simulator – Four floor elevator simulator • Most projects will involve designing ladder logic programs to control these simulations Boolean logic control programs • Boolean logic control programs examine and control on and off states – Boolean here is used interchangeably with the word “discrete” • Each control program (ladder diagram sequence) can contain one or more conditionals • Example – If (a part is on the conveyor) AND (there is not a box in the chute) THEN (turn the conveyor motor on) • In terms of sensors and actuators this becomes – If (sensor A is ON) AND (sensor B is NOT ON) THEN (turn actuator C ON) Logical AND ladder diagram •the logical AND function is constructed by series combinations of digital (discrete) inputs – Two (or more) series components I: 1/0 AND I:1/1
  • 13. • The logical OR function is constructed by parallel combinations of digital (discrete) inputs – Two (or more) parallel component Logical NOT • The logical NOT function is constructed by referencing the input signal with a normally closed contact (XIO instruction) Start-Stop-Seal Circuit • For PLC systems without latch and unlatch instructions, a circuit is needed that will allow a process to start, continue to run after a start button is released, and stop under control of another button – A circuit that implements this functionality is commonly referred to as a start- stop-seal circuit • A feedback path (i.e. a contact) that references the output is normally used to seal around the start contact  Start-stop-seal ladder diagram
  • 14. Start-stop-seal variations • In practice several start and/or several stop buttons can be used in a process • Start buttons (with XIC instructions) can be used – In series if it is required that ALL be pressed before a process starts – In parallel if pressing ANY start button is to start a process • Stop buttons (with XIO instructions) are normally used in series if pressing ANY stop button is to stop a process Start-stop-seal circuit example Interlock Circuits • Interlocks can prohibit output(s) from energizing under a certain condition • Example: O: 2/0 should not energize if O: 2/1 is energized (and vice versa)
  • 15. Formatting considerations • Ladder logic rungs should be formatted so the reader can easily infer the meaning of the intended logic • One mechanism to help this is the grouping of related signals within an area on a given rung of logic • For example: – Group signals together that have some common intent • Start signals • Stop signals • Emergency stop signals (E-stop) • Interlocks – Controls that might have greater importance (i.e. E-stop) might be located on the left hand side of the rung if possible Formatting consideration This is also a good example of instruction and rung documentation.
  • 16. Properly formatted outputs • An output energize instruction (OTE) referencing a specific output bit should appear only once in a ladder logic program • If more than one output is to be controlled by a certain rung of ladder logic, the output energizes (OTE) instructions can be placed in parallel PLC Timer Functions Timer Uses • The timing block functions are used with various contact arrangements and in multiples to accomplish various timing tasks. • Typical industrial timing tasks include timing of the intervals for welding, painting, and heat treating. • Timers can also predetermine the interval between two operations. • With a PLC you can utilize as many timer blocks as you need, within the PLC memory limitations. • Here we illustrate the basic PLC TIME DELAYON function and some other derived timing functions. • Typical of the derived functions are – TIME DELAY-OFF, – interval pulse timing, – and multiple pulse timing of more than one process operation.
  • 17. • One major advantage of the PLC timer is that its time may be a programmable variable time as well as a fixed time. • The variable time interval may be in accordance with a changing register value. • Another advantage of the PLC timer is that its timer accuracy, repeatability, and reliability are extremely high because it is based on solid-state technology. Non-retentive Timers • A single-input timer called a non-retentive timer is used in some PLCs. – Energizing Me: 1/0 causes the timer to run for 4 seconds. – At the end of 4 seconds the output (DN) goes on. When the input is de- energized, the output goes off and the timer resets to 0. – If the input I: 1/0 is turned off during the timing interval (for example, after 2.7 seconds), the timer resets to 0. – TON is the basic non-retentive timer in Allen-Bradley PLCs Timer Information
  • 18. • The timer table contains all information for that timer – /EN: Timer is enabled (i.e. the input rung is energized) – /TT: Timer is timing – /DN: Timer is done – .PRE: Timer preset value (point at which the timer stops timing) – .ACC: Timer accumulator (accumulated time value) Timer Delay off (TOF) • The TOF timer functions the opposite of the TON timer. – De-Energizing Me: 1/0 causes the timer to run for 4.5 seconds. The DN bit is initially set. – At the end of 4.5 seconds the output (DN) goes off. When the input is energized the timer resets to 0. – If the input I: 1/0 is turned on during the timing interval (for example, after 2.7 seconds), the timer resets to 0 Retentive Timers (RTO) • Functions exactly like TON except the accumulated time value is retained even if the input rung is reenergized. Timer Reset Coils (RES) • A reset coil (RES) can be associated with a timer to provide a means of resetting the accumulated time value (and status bits) at any given time Examples of Timer Function Applications • On delay – Output B comes on at a specific set time after output A is turned on. When A is turned off, B also goes off. • Limited on time – A and B go on at the same time. B goes off after specific set time period, but remains on.
  • 19. • One-shot operation – Output B goes on for a specified time after output A is turned on. Output B will run for its specified time interval even if A is turned off during the B timing interval. • Interval time within a cycle – We may require that an output come on 7.5 seconds after system startup, remain on for 4.5 seconds, and then go off and stay off. The interval would repeat only after the system is shut off and then turned back on. On Delay Timer Function • the first example is the simplest form of time delay. – When the circuit is turned on, one action takes place. – A specified time later, another action occurs. – O: 2/1 energizes exactly 8 seconds after O: 2/0 energizes, provided I: 1/0 remains energized Limited On-Time Timer Function • This example illustrates a situation in which two outputs go on at the same time. • Then, one of them is to go off after a preset period of time. • One output, O: 2/0 stays on; the other output, O: 2/1, turns off at the end of the timing interval. Resetting is accomplished by turning me: 1/0 off. • The next example is a one-shot system. – The done bit comes on after its specified time period even if the input is turned off during the timing period.
  • 20. Interval Time With in a Cycle • This example is for a timed interval of a number of seconds after the start of a process operation. – This time interval is sometimes called an embedded time interval. – A fan is to come on 8.7 seconds after a system is turned on. – It is then to run until 16 seconds after the system is turned on, which is a net time of 7.3 seconds. PLC Counter Functions Introduction • PLC counters have programming formats which are similar to timer formats • Transitions on counter input rung causes the counter to count up (or down) • Counter reset is accomplished via the (RES) instruction Up Counter (CTU) • The CTU is an instruction that counts false-to-true rung transitions. – Rung transitions can be caused by events occurring in the program (from internal logic or by external devices) such as parts traveling past a detector or actuating a limit switch. • When rung conditions for a CTU instruction have made a false-to-true transition, the accumulated value is incremented by one count, provided that the rung containing the CTU instruction is evaluated between these transitions. – The ability of the counter to detect false–to–true transitions depends on the speed (frequency) of the incoming signal. • The accumulated value is retained when the rung conditions again become false. • The accumulated count is retained until cleared by a reset (RES) instruction.
  • 21. Up Counter Example • Accumulated count is reset only by the (RES) instruction • The counter will increment the accumulator value even after the preset is reached Using Status Bits (CTU) This bit Is Set When And remains set until Count Up Overflow Bit (OV) Accumulated value wraps around to -32768 (from +32767) A (RES) instruction with the same address as the CTU instruction is enabled OR the count is decremented less than or equal to +32767 with a countdown (CTD) instruction Done Bit (DN) Accumulated value is equal to or greater than the present value Accumulated value becomes less than the present value Count Up Enable Bit (CU) Rung conditions are true Rung conditions go false or a (RES) instruction with the same address as the CTU instruction is enabled Down Counter (CTD) • The CTD is an instruction that counts false-to-true rung transitions. – Rung transitions can be caused by events occurring in the program such as parts traveling past a detector or actuating a limit switch.
  • 22. • When rung conditions for a CTD instruction have made a false-to-true transition, the accumulated value is decremented by one count, provided that the rung containing the CTD instruction is evaluated between these transitions. • The accumulated counts are retained when the rung conditions again become false. • The accumulated count is retained until cleared by a reset (RES) instruction. Down Counter Example • Accumulated count is reset only by the (RES) instruction • The counter will decrement the accumulator value even after a 0 count is reached Counter Applications • Straight counting in a process – The counter output goes on after the set count is received by repetitive pulses to the counter input. • A process where a timed interval is started when a count reaches a preset value • A process where a count of events is to start after a fixed time interval Straight Counting in a Process • After a certain number of counts occur, the output goes on. • The output can be used to energize an indicator. • The output status could also be utilized in the ladder diagram logic in the form of a contact. • Either counter will function (count) if its input rung transitions from false-to- true. • After the count input receives 18 pulses, the O: 2/0 output will energize.
  • 23. Time a Process after a Count has been reached • After a count of 5 from a sensor, a paint spray is to run for 25 seconds. Delayed Start of the Counting Process • In this process we do not wish to start counting until one hour after the process starts. • A timer output contact in the timer run line closes after the time period. • The closure then enables the counter to start counting input pulses. • After a count of 150, the output comes on. Configuring Allen Bradley Relinks and RSLogix for Use with the PLC Trainer Accessing and using the PLC trainers located in 2003 SERC requires that the Relinks software be properly configured for communication. Begin by executing the All Programs->Rockwell Software->Relinks->Relinks Classic utility. If the Relinks software is executing, the icon should be present in the system tray. The Relinks software must be running to communicate with the PLCs on the network. With the PLC running, opening this software should show the state of the PLC in a window similar to Figure 1 below.
  • 24. Figure 1. Relinks with RSWho Browsing Ethernet Network. The communication parameters have already been setup for communication between the PC and the PLC. This was done within Relinks by first selecting a driver (Communications->Configure Driver). This was done by selecting the Ethernet/IP Driver as the driver type and then selecting the driver name as AB_ETHIP-1(the default). The IP addresses for the four PLC trainers in the lab are given in Table 1. Note these IP addresses are dynamically assigned and may possibly change. The specific IP address assigned to a PLC on the network can be checked on the PLC itself. On the MicroLogix 1100 PLC, press the front Panel ESC button and then press the down arrow key until the Advance Set function is selected. Press OKand press the down arrow key until the ENET Cogfunction is selected. Press OKto show the current IP address for the PLC. Press ESCuntil the I/O Status function is selected. Press OKto return to the I/O Status screen
  • 25. Table 1. PLC Trainer IP Addresses PLC Station PLC Trainer IP addresses PLC Lab Layout 1 10.115.222.50 2 `10.115.222.72 3 10.115.222.75 4 10.115.222.99 Use Relinks to verify the status of each PLC on the network. With the communication driver setup, the RSLogix software may be used to define a program for download and execution on the PLC trainer. The startup state of the RSLogix software is shown in Figure 2. Figure 2. RSLogix Startup Screen
  • 26. The first step in the creation of a new ladder logic program is the specification of the processor type, the communication driver, and the processor node number. For our installation, the processor type will be the MicroLogix 1100 (Series B). The communications settings will set the driver type (AB_ETHIP- 1), the processor node number (we will use the default), and the timeout (10 sec. is the default value). Select File->New to begin a new PLC program. The “Who Active” button will initiate the Relinks software that will allow you to search for active PLCs on a given network. Optionally, the processor may be given a name. The screen capture shown in Figure 3 gives the appropriate processor type settings. Use the “Who Active” button on the “Select Processor Type” screen to select a particular PLC as the target for your program. Figure 3. Processor Type Configuration Screen After the processor type is configured, an empty ladder diagram is displayed within RSLogix as shown in Figure 4 below
  • 27. Figure 3. Processor Type Configuration Screen After the processor type is configured, an empty ladder diagram is displayed within RSLogix as shown in Figure 4 below. Figure 4. RSLogix Ladder Logic Screen.
  • 28. The next step in the configuration process requires the identification and selection of all I/O modules attached to the PLC and the specification of their location (under Controller, select IO Configuration). The 1762-IF2OF2 module should be selected into slot one. The I/O module configuration can also be accomplished by selecting “Read IO Config” which will read the current I/O module setup for the selected PLC. Results of this configuration step are shown in Figure 5. Figure 5. I/O Configuration Scree The communication channel configuration parameters should be verified by selecting the Channel Configurationentry located under the controller folder. The settings under the “General” and “Channel 1” tabs should match Figures 6 and 7 given below. Make sure that the BOOTP Enable checks box is not checked and that the DHCP Enablecheck box is
  • 29. Figure 6. General Channel Configuration Tab.
  • 30. Figure 7. Channel One Configuration Tab. At this point, the program is completely configured and ladder logic instructions may be added. Figure 8 shows a screen capture with the state of the RSLogix software with selected data tables displayed.
  • 31. Figure 8. RS Logic with Sample Data Files Shown. After the ladder logic code is written, commented, and saved to a file, it must be verified (for syntactic correctness) before being downloaded to the PLC. The computer icon with the check symbol on the menu can be used to accomplish this. If the program verifies as syntactically correct, it can be downloaded to the PLC using the drop down box labeled as OFFLINE in Figure 8. This drop down box displays the state of the communication with the PLC: OFFLINE, REMOTE PROG, RUN, etc. Other elements of the RSLogix software may be explored using the online help facility.