Вы находитесь на странице: 1из 29

For more details visit us at :wwww.sapengineers.com/www.sapengineers.co.

in 1
OPERATION & INSTRUCTION
MANUAL
FOR
PROGRAMAMMABLE LOGIC CONTROLLER
(PLC) TRAINER
Manufactured by:
SAP ENGINEERS & CONSULTANTS,
Sales Office: Shop no.26, Srushti Co.Op.Hsg.Soc., S.No.82/11123233,
Near Guruganesh Nagar, 100 It DP Road, Kothrud, Pune-38, Maharashtra, India
PH. (020) 25384737, 25383544, Fax. - 25383544
E-mail: - pravinsdeodevsnl.net Web site. - www.sapengineers.co.in/ www.sapengineers.com
www.indiamart.com/sapengineers

For more details visit us at :wwww.sapengineers.com/www.sapengineers.co.in 2
INDEX
SR.
NO.
DESCRIPTION PAGE
1.

FRONT PANEL OF THE TRAINER 3
2.

COMPNENTS USED IN TRAINER AND THEIR
SPECIFICATIONS
4
3.

WIRING DIAGRAM 7
4.

G A DIAGRAM 8
5.
INTRODUCTION TO PLC
A) WHAT IS A PROGRAMMABLE LOGIC
CONTROLLER (PLC)?
B) WHY USE A PLC?
C) HOW DO INSTRUCTIONS GET INTO THE
PLC`S MEMORY?
D) BLOCK DIAGRAM OF PLC
9
6. COMMUNICATION OF COMPUTER TO PLC 16
7. INTRODUCTION TO LOGIC 17
8. TIMER AND COUNTER INSTRUCTIONS 20
9. OPERATING PROCEDURE 28
10. FAULTS THAT MAY OCCUR & THEIR
SOLUTIONS
29
11. PLC PROGRAM

For more details visit us at :wwww.sapengineers.com/www.sapengineers.co.in 3
1.
FRONT PANEL OF THE TRAINER
FIGURE-1


For more details visit us at :wwww.sapengineers.com/www.sapengineers.co.in 4
2.
COMPONENTS USED IN TRAINER AND SPECIFICATIONS
ALLEN-BRADLEY PLC:24 V dc supply,14 digital inputs,10 digital outputs, (5 relay,5 FET output)
Can connect various inputs (digital) to the system and similarly connect to outputs on the Iield by means oI
wiring.
FIGURE-2

ALLEN-BRADLEY ANALOG INPUT- OUTPUT CARD: Expansion card connected to PLC.
2 input & 2 output card (Input can be 4- 20mA,0-5 volt)In this trainer we have used 4-20mA input.
It is connected to PLC with help oI a cable.
FIGURE-3

For more details visit us at :wwww.sapengineers.com/www.sapengineers.co.in 5
POWER SUPPLY : 230 V AC supply, output 24 v dc. Output 24V dc positive and negative is
indicated on the supply unit itselI.
FIGURE-4
CURRENT SOURCE: 230 V AC supply, output 4 to 20mA (variable),it can be varied with the
help oI the knob (SET) on the Iront oI current source. Zero (minimum,4mA,indicated as Z)`and
span (maximum,20mA,indicated as S`on panel) can be adjusted by varying the screws.
FIGURE-5

CURRENT METER: 230 V AC supply, display 4-20mA

For more details visit us at :wwww.sapengineers.com/www.sapengineers.co.in 6
FIGURE-6
INDUCTIVE PROXIMITY SWITCH : 24V supply, output 24V sensing distance 5-7mm.
FIGURE-7
OPTICAL PROXIMITY SWITCH : 24V supply, output 24V sensing distance upto 40cm.
FIGURE-8


For more details visit us at :wwww.sapengineers.com/www.sapengineers.co.in 7
3.
WIRING DIAGRAM
FIGURE-9
W|re Co|our Used for
ked co|our (0.7S) hase 230 V AC supp|y
8|ack co|our (0.7S) Neutra| 230 V
Green co|our (0.7S) Larth|ng
Crange co|our (0.S) +24 V DC
Wh|te co|our (0.S) -24 V DC
Grey co|our (0.S) S|gna|
1wo core (0.S)
ked
8|ack
os|t|ve of s|gna|
Negat|ve of s|gna|

For more details visit us at :wwww.sapengineers.com/www.sapengineers.co.in 8
4.
GA DIAGRAM
FIGURE-10

For more details visit us at :wwww.sapengineers.com/www.sapengineers.co.in 9
5.
INTRODUCTION TO PLC
A programmable logic controller, which is usually called a PLC or, more commonly, simply
a programmable controller, is a solid-state, digital, industrial computer.
Upon Iirst glance, a programmable controller may seem to be no more than a black box with
wires bringing signals in & wires sending signals out. It might also appear there is some magic
being done inside that somehow decides when Iield devices should be turned on. In actuality, there
is no magic. The PLC is a computer; however, without a set oI instruction telling it what to do, it is
nothing more than a box Iull oI electronic components. Without instructions, the black box that we
call a PLC can do nothing. The user program is the list oI instructions that tells the PLC what to do.
Computers such as PLCs can be wonderIul tools; however, although it might appear
otherwise, they only do exactly what the human programmer told them to do.
WHAT IS A PROGRAMMABLE LOGIC CONTROLLER (PLC)?
The programmable logic controller (PLC), or programmable controller, can be classiIied as a
solid-state member oI the computer Iamily. A programmable controller is an industrial computer in
which control devices such as limit switches, push buttons, proximity or photoelectric sensors, Iloat
switches, or pressure switches, to name a Iew, provide incoming control signals into the unit. An
incoming control signal is called an Input.
Incoming control signals, or inputs, interact with instructions speciIied in the user ladder
program, which tells the PLC how to react with the incoming signals. The user program also directs
the PLC on how to control Iield devices like motor starters, pilot lights, & solenoids. A signal going
out oI the PLC to control a Iield device is called an Output. Figure 1 gives an overview oI the
interaction between SW 1 (the systems input), the PLC & its ladder program, & the pilot light
output.

For more details visit us at :wwww.sapengineers.com/www.sapengineers.co.in 10
FIGURE-11-A GENERAL OVERVIEW OF PLC IDENTIFYING SW-1, THE PLC INPUTS AND OUTPUTS
A Iormal deIinition oI a PLC comes Irom the National Electrical ManuIacturers Association
(NEMA):
A programmable controller is a digitally operated electronic system, designed Ior use in an
industrial environment, which uses a programmable memory Ior the internal storage oI user-
orientated instructions Ior implementing speciIic Iunctions such as logic sequencing, timing,
counting, & arithmetic to control, through digital or analog inputs & outputs, various types oI
machines or processes. Both the PLC & its associated peripherals are designed so that they can be
easily integrated into an industrial control system & easily used in all their intended Iunctions.
WHY USE A PLC?
The question, 'Why use a PLC? really should be rephrased to, 'Why automate? The PLC is a tool
that controls an automated process. What will automating a process do Ior a company? Automation
will help a manuIacturing Iacility to:
1. Gain complete control oI the manuIacturing process
2. Achieve consistency in manuIacturing
3. Improve quality & accuracy
4. Work in diIIicult or hazardous environments

For more details visit us at :wwww.sapengineers.com/www.sapengineers.co.in 11
5. Increase productivity
6. Shorten the time to market
7. Lower the cost oI quality, scrap, & rework
8. OIIer greater product variety
9. Quickly change over Irom one product to another
10. Control inventory
WHAT MAKES A PLC WORK?
The heart oI any computer is the microprocessor. The computer`s microprocessor, also called the
processor or central processing unit (CPU), supervises system control through the user program.
The microprocessor reads input signals & Iollows the instructions that a programmer has stored in
the PLC`s memory. As a result oI the solved program, the PLC turns outputs, or Iield-controlled
devices, ON or OFF. When the PLC is running & Iollowing the programmer`s instructions, this is
called solving the user program.
HOW DO PLCS KNOW WHAT THEY ARE SUPPOSED TO DO?
A PLC simply Iollows the instructions stored in memory. To retain user program instructions, they
are stored in the memory oI the PLC Ior Iuture use & reIerence. Think oI an instruction as a
sentence. Each instruction that is entered will be placed in memory in ascending order. The list oI
instructions is called the user ladder program.
Figure-2 illustrates what a schematic representation oI the instruction list would look like.
FIGURE-12 CIRCUIT REPRESENTATION OF THE PROGRAM
HOW DO INSTRUCTIONS GET INTO THE PLC`S MEMORY?
The instructions you wish your PLC to carry out are transIerred to the memory oI the controller
Irom either a handheld programmer or a personal computer. The user ladder program is created by
the operator pushing the correct sequence oI buttons on a handheld programmer. The handheld
programmer can be used to program the PLC.
A PLC user program can also be created using a personal or industrial computer. When using a
personal or industrial computer to develop the user ladder program, A PLC ladder development
soItware package is used. The primary diIIerence between a personal computer & an industrial

For more details visit us at :wwww.sapengineers.com/www.sapengineers.co.in 12
computer is that the industrial computer has been hardened to withstand the Iactory environment.
For now we will use the term 'personal computer.
When the entire user ladder program has been developed, entered, & veriIied Ior correctness, the
next step is to download the program into the processor`s memory. TransIerring the PLC program
Irom a personal computer`s memory to PLC memory is called downloading the program. A
personal computer can be interIaced to the PLC.
BeIore downloading a user program, the processor must be in program mode. AIter downloading
the program, iI all input & output signals are wired to the correct screw terminals, the processor can
be put in run mode. In run mode, the program will continuously run & solve the programmed
instructions. Solving the programmed instructions is sometimes called solving the logic. This
continual running oI the program in a PLC is called scanning. As part oI the processor`s problem-
solving routine, the PLC will look at the incoming signals, Iollow the preprogrammed instructions
associated with each input signal, & control the programmed output Iield devices.
INNOVATIONS INCORPORATED INTO THE PROGRAMMABLE CONTROLLER
The Iirst programmable logic controllers had many important developments incorporated into them:
1. The PLC is hardened industrial computer designed to withstand the harsh Iactory
environment.
2. PLCs are reusable. They contain a changeable program that eliminates extensive
rewiring & component changes.
3. PLCs oIIer easy troubleshooting.
4. PLCs Ieature easy installation & small size.
Let us look at each oI these innovations:
The PLC Is Hardened Industrial Computer
A PLC is a hardened industrial computer, so it can survive in the manuIacturing
environment. We need to diIIerentiate between a PLC as an industrial computer & an
industrial computer-programming terminal. Even though a PLC is an industrially hardened
computer, an industrial computer-programming terminal is similar to an industrially
hardened personal computer.
PLCs are small, easy-to-install units. A PLC is easy to install because all input & output
connections are connected to terminal strips in a central location. The relays have been
replaced by instructions programmed inside the PLC unit. Arranging &, later, rearranging
relay contact sequences to program a replacement instruction is much easier than rewiring
together relays & mechanical timers, counters, or sequencers.

For more details visit us at :wwww.sapengineers.com/www.sapengineers.co.in 13
A PLC`s Control Sequence Is Easily Changeable through Programming
The PLC is easily programmed & reprogrammed. This new device`s programs are
developed directly Irom the standard ladder-diagram Iormat, with which electrical
maintenance personnel are already Iamiliar. As an industrial computer, the PLC is able to
replace such mechanical Iunctions as relay control, timers, counters, & sequencers. As time
progressed & electronic & microprocessor technology advanced, new Iunctionality was
added to the PLC. Advanced Iunctions such as arithmetic, data manipulation, shiIt registers,
data storage, ladder diagram programming using the personal computer, & communication
links & networking to other PLCs & personal computers were added.
Easier Troubleshooting
Troubleshooting became easier as each input is wired separately to its own input screw
terminal. Notice in Figure-4 that Sw1 & Sw2, although physically connected in a schematic
diagram, & the PLC user ladder program are separate inputs when wired to the PLC. The
separately wired input signals are recombined to represent the original schematic or user
ladder program using the programming soItware`s instructions. Traditional hardware relays
are now programmed inside the unit. Changing an instruction or sequence is as simple as
changing the program (much easier than rewiring hardware relays).
FIGURE-13-CORRELATING LADDER PROGRAM RUNG TOACTUAL PLC WIRING

For more details visit us at :wwww.sapengineers.com/www.sapengineers.co.in 14
The six major sections oI a PLC are:
1. Sensing inputs or controlling hardware
2. PLC input hardware
3. The controller or CPU
4. Handheld programming device or personal computer
5. Output PLC hardware
6. Hardware output devices
To understand how a PLC works with these signals, we will look at the major sections that make up
typical PLC (see Figure- 4)
FIGURE-14- BLOCK DIAGRAM OF PROGRAMMABLE CONTROLLER
A programmable controller is made up oI the Iollowing sections, each oI which has a unique job in
its operation.

For more details visit us at :wwww.sapengineers.com/www.sapengineers.co.in 15
1. 1he sensing section: The sensing section is made up oI limit switches, pressure switches,
photoelectric sensors, push buttons, & so Iorth. These incoming hardware devices provide
input signals. Devices such as the push button, limit switch or photoelectric sensor are Iield
input devices. The term 'Iield input reIers to hardware items providing incoming signals
that are tangible items that you physically connect to the PLC.
2. Input section: The input section oI the PLC contains two major areas. First, the physical
screw terminals where incoming signals (inputs) Irom Iield input devices like a limit switch,
Ior example, are attached to the PLC. Figure-6 illustrates a product sitting on a conveyor.
When the conveyor moves the product into position, the sensor will send an input into input
screw terminal number zero on the PLC input section.
The second portion oI the input section is the PLC`s internal conversion electronics. The
Iunction oI the input section-voltage input level Irom Iield devices. High-voltage signals
Irom Iield devices are converted to 5 volts direct current (VDC) Ior a valid ON input
signal, & 0VDC Ior a valid OFF input signal. Incoming signal conversion & isolation are
necessary as the solid-state microprocessor components operate on 5 VDC where as input
signal may be 24VDC, 120 volts alternating current (VAC), or 220VDC. Inputting a120
VAC signal, Ior example, into a 5VDC circuit will quickly destroy your PLC.
3. Controller: The controller is commonly called the central processing unit (CPU) or, simply,
the processor. This is the brain, or microprocessor, that controls or supervises the entire
process. The CPU solves the user program & updates the outputs.
4. Programmer: The programmer is the device whereby the programmer or operator can enter
or edit program instructions or data. The programmer can be handheld unit.
5. Output Section: The result oI looking at, or reading, the ON or OFF status oI the inputs &
using this inIormation to solve the user ladder program is to send updated signals to the
output section. The output section is simply a series oI switches, one Ior each output point,
that are controlled by the CPU & are used to turn output Iield devices ON or OFF.
6. Field hardware devices: The motor starter is the device controlled by the PLC. The devices
that are controlled by the PLC`s output section screw terminals are the Iield hardware
devices.

For more details visit us at :wwww.sapengineers.com/www.sapengineers.co.in 16
6.
COMMUNICATION OF COMPUTER TO PLC
Allen Bradley PLC (Micrologix 1200) can be programmed by using soItware RS Logix 500
(version 8.1 or later). For programming this soItware has to be installed in the computer and then
connect the PLC and computer through cable provided. Then communicate the PC to PLC using
RS logix Link. Then open the main program and you can edit,change,or do a new program. For
details you can reIer the video provided.
Steps to start communication:
1) Install RS logix 500 by the CD provided (Ior detailed procedure reIer installation video) in
the computer through which you want to communicate to PLC.
2) Fix the cable provided to the PLC & connect its other end to computer.
3) Then click on the RS link on the bottom toolbar oI the computer. AIter clicking a screen will
open on which click on the cable symbol 'ConIigure Drivers. On that screen there is a drop
below list, click on drop below list and select RS-232 DF1 devices. Then click on 'Add
New button, a deIault screen will appear click on OK. AIter that a screen will appear Ior
conIiguration oI port, click on 'Auto ConIigure button.
4) Now the conIiguration is complete.
5) For more detail reIer to the 'CD Installation video.

For more details visit us at :wwww.sapengineers.com/www.sapengineers.co.in 17
7.
INTRODUCTION TO LOGIC
Determine iI a PLC ladder rung is true or Ialse under speciIied conditions
INTRODUCTION
This section introduces the concepts oI how logic Iunctions are executed when solving a PLC
program. We will introduce how a PLC solves a user program using AND, OR, & NOT logic.
Conventional hardwired relay ladder diagrams represent actual hardwired control circuits. In a
hardwired circuit, there must be electrical continuity beIore the load will energize. Even though
PLC ladder logic was modeled aIter the conventional relay ladder, there is no electrical continuity
in PLC ladder logic. PLC ladder rungs must have logical continuity beIore the output will be
directed to energize.
CONVENTIONAL LADDERS VERSUS PLC LADDER LOGIC
The Iamiliar electrical ladder diagram is the traditional method oI representing an electrical
sequence oI operation in hardwired relay circuits. Ladder diagrams are used to represent the
interconnection oI Iield devices. Each rung oI the ladder clearly illustrates the relationship oI
turning on one Iield device & shows how it interacts with the next Iield device. Due to industry
wide acceptance, ladder diagrams became the standard method oI providing control inIormation to
users & designers oI electrical equipment. With the advent oI the programmable controller, one oI
the speciIications Ior this new control device was that it had to be easily programmed. As a result,
programming Iundamentals were developed directly Irom the old Iamiliar ladder diagram Iormat,
with which electrical maintenance personnel were already Iamiliar.
The diIIerence between a PLC ladder program & relay ladder rungs involves continuity. An
electrical schematic rung has electrical continuity when current Ilows uninterrupted Irom the leIt
power rail to the right power rail. Electrical continuity, as illustrated in Figure 7, is required to
energize the load. An electrical current Ilows Irom L-1 through SW1, onto the load returning by
way oI L-2. When current Ilows, there is electrical continuity.
Even though a PLC ladder program closely resembles an electrical schematic, PLC ladder symbols
represent ladder program instructions. A PLC program is set oI an instruction that is stored in
memory. These instructions tell the PLC what to do with input signals & then, as a result oI
Iollowing the instructions, where to send the signals.
A PLC ladder program uses an electrician`s ladder schematic as a model. Even though a PLC
ladder program employs Iamiliar terms like 'rungs & 'normally open & 'normally closed
contacts, relay ladder logic has no electrical continuity between an input & the controlled output.

For more details visit us at :wwww.sapengineers.com/www.sapengineers.co.in 18
There is no physical conductor that carries the input signal through to the output. A PLC input
signal Iollows these six steps:
1. The input signal is seen by the input module.
2. The input module isolates & converts the input signal to a low-voltage signal with which
the PLC can work.
3. The ON or OFF signal Irom the input section is sent via the back plane to the input status
Iile, where it is stored.
4. The processor will look at each input`s ON or OFF level as it solves the user program.
5.The resulting ON or OFF action, as a result oI solving each rung, is sent to the output
status Iile Ior storage.
6. During the output update portion oI the scan, the processor will send the ON or OFF
signal Irom each bit in the output status Iile to the associated output screw terminal by way
oI the output module.
Individual ladder-programming symbols are represented as instructions in the CPU section oI
Figure 8. The notations I: 01, I: 02, & O: 01 represent the instructions & their addresses. When
programming the PLC, these instructions are entered one-by-one & stored sequentially in the user
program portion oI the processor`s memory. When the PLC is in run mode, these instructions are
combined to arrive at the resulting ON or OFF state oI each rung`s output.

For more details visit us at :wwww.sapengineers.com/www.sapengineers.co.in 19
WHAT IS LOGIC?
Devices in an electrical schematic diagram are described as being open or closed. PLC ladder
instructions are typically reIerred to as either true or Ialse. When a PLC solves the user program, it
is said to be solving the ladder logic.
See Figure 9 Ior a look at a PLC ladder program printout.
Each rung is a program statement. A program statement consists oI a condition, or conditions, along
with some type oI action. Inputs are the conditions, & the action, or output, is the result oI the
conditions. Each PLC ladder rung can be looked at, as a problem the processor has to solve. The
PLC combines ladder program instructions similar to the physical wiring hardware devices in series
or parallel. However, rather than working in series or parallel, the PLC combines instructions
logically using logical operators. Logical operations perIormed by a PLC are based on the
Iundamental logic operators: AND, OR, & NOT. These operators are used to combine the
instructions on a PLC rung so as to make the outcome oI each rung either true or Ialse. The symbol
that represents the result oI the solving oI the input logic on as particular rung is the output.

For more details visit us at :wwww.sapengineers.com/www.sapengineers.co.in 20
8.
TIMER & COUNTER INSTRUCTIONS
INTRODUCTION
The programmable controller was conceptualized as an easy-to-use, easily changeable,
relay-replacing device. One oI the major enhancements to the original programmable controller was
to add timing & counting abilities. Early PLCs had optional timing circuit cards that the user could
slide into the CPU to add timer counter Iunctionality to the PLC. Timing cards had physical solid-
state timing chips installed on slide-in timer boards.
Today`s PLCs use modern microprocessor technology & have timers & counters included in
the instruction set. As an example, each SLC 500 can have up to 256 timers or counters in each oI
multiple timers or counter Iiles. SoItware timers or counters are easily included in your ladder
programs by simply programming the desired instruction on the ladder rung. This chapter will
introduce the Allen-Bradley SLC 500 & MicroLogix 1000 timers & counters. Allen-Bradley`s PLC
5 timers & counters are almost identical to SLC 500 timers & counters with the exception oI the
number oI timers & counters allowed per Iile & the speciIic data Iiles that can be designated as
timer or counter Iiles. When using a PLC 5, a short review oI the PLC 5 Instruction Set ReIerence
Manual will acquaint you with the diIIerences between the two PLCs.
TIMER INSTRUCTIONS
All PLCs have timer instructions. Even though each manuIacturer may represent timers
diIIerently on the ladder diagram, most timers operate in the same manner. A timer is comprised oI
the Iollowing parts: timer address, preset value, time base, & accumulated value. Figure 10
illustrates an SLC 500 timer ladder rung Irom Rockwell soItware`s RS Logix 500 Programming
SoItware Ior programming the SLC 500 & MicroLogix 1000. Notice the timer instruction name,
timer on delay (TON), timer address (T4:0), time base (1.0 seconds), a preset value oI 100, & the
accumulated value oI 0.
FIGURE--SLC 500 ON DELAY TIMER

For more details visit us at :wwww.sapengineers.com/www.sapengineers.co.in 21
THE ON-DELAY TIMER INSTRUCTION
Use the on-delay timer instruction iI you want to program a time delay beIore an instruction
becomes true.
Timer Addressing
Timer Addressing is as Iollows: T (Timer Iile number): (Timer element number). The timer
address T4:0 is addressing timer Iile 4, timer element 0.
a) The deIault timer Iile number is Iour.
b) Any unused data Iile greater than 10 & up to & including 255 may be a timer Iile.
c) Additional timer Iiles may be created in the memory map screen.
d) Each timer Iile may have up to 256 timer elements.
Example: T4:1 timer Iile 4, timer element 1 (remember, a timer element is simply another name
Ior timer number 1 in timer Iile 4)
T4: 12 timer Iile 4, timer element 12
T4: 112 timer Iile 4, timer element 112
T16: 34 timer Iile 16, timer element 34
T16: 2 timer Iile 16, timer element 2
Figure 11 illustrates an on-delay timer, called a timer on delay (TON) by Allen-Bradley along with
the associated ladder rungs.
FIGURE-SLC 500 ON DELAY TIMER AND ITS LADDER RUNGS

For more details visit us at :wwww.sapengineers.com/www.sapengineers.co.in 22
PLC COUNTER INSTRUCTIONS
Every PLC has counter instructions. Although most PLC counters work the same, the
instruction symbols used & method oI programming will change Ior diIIerent manuIacturers.
Consult your speciIic PLC user manual Ior particulars on the counters.
The typical counter counts Irom 0 up to a predetermined value, called the 'preset value. As
an example, iI you wanted to count Irom 0 to 100, you would be counting up & would use account-
up or up counter. The predetermined value oI 100 would be the preset value. The 'accumulated
value is the current or accumulated count. II our counter had counted 45 pieces that had passed on
a conveyor, the counter accumulated value & preset value would be equal. At this point the counter
would signal other logic within the PLC program that the batch oI 100 was completed & it should
now take some action. The PLC might move the box containing 100 parts on to the next station Ior
carton sealing. To start counting the next batch, a reset instruction would be used to reset the
counter`s accumulated value back to 0. Figure-12 illustrates a ladder rung & a count-up counter
(CTU) Ior an Allen-Bradley SLC500.
FIGURE-AN SLC 500 COUNT UP COUNTER
To count Irom 100 down to 0, you would choose a down-counter. A down-counter counts Irom the
accumulated value oI 100 down to the preset value oI 0. Figure 13 illustrates a count-down
counter.
FIGURE- AN SLC 500 COUNT-DOWN CONTER

For more details visit us at :wwww.sapengineers.com/www.sapengineers.co.in 23
Every PLC has counter instructions. Although they may program diIIerently, they operate very
similarly. Table 2 lists the generally available counters.
Instruction Functional Description
Count Up Count Irom zero up to a
desired value
Counting the number oI parts
produced during a speciIic work shiIt
or batch. Also counting the number oI
rejects Irom a batch.
Count
down
Count down Irom a
desired value to zero
An operator interIace display shows
the operator the number oI parts
remaining to be made Ior a lot oI 100
parts ordered.
High Speed
Counter
Count input pulses that are
too Iast separately Irom
normal input points &
modules
Most Iixed PLCs will have a high-
speed set oI input points that allow
interIace to high-speed inputs.
Signals Irom an incremental encoder
would be a typical high-speed input.
Check your speciIic PLC Ior the
maximum pulse rate.
Counter
Reset
Reset a timer or counter Used to reset a counter to zero so
another counting sequence can begin.
Table-2 Common counters found in programmable logic controllers.
HOW COUNTERS WORK
A counter instruction is an output instruction. Most PLC counters count the Ialse-to-true
transitions oI the rung`s input logic. The counter instruction counts each time the input logic
changes the rung Irom Ialse to true. Input logic can be a signal coming Irom an external device,
such as a limit switch, or sensor, or a signal Irom internal logic. Each time the counter instruction
sees a Ialse-to-true rung transition; a count- up counters accumulated value is incremented by one.
The down-counter works a little diIIerently. Each time a count-down counter sees a Ialse-to-
true rung transition, its accumulated value is decremented by one. Since the accumulated value
decremented each time the logic changes the rung Irom Ialse to true, the accumulated value must
be the staring point oI the count. In our example, we are counting a batch oI 100 parts. Each time
a part is made, the remaining total is displayed on an operator interIace display device so the
operator can see how many more parts need to be manuIactured. The accumulated value will be
programmed with the value oI 100, whereas the preset value is 0. As each part is made, the

For more details visit us at :wwww.sapengineers.com/www.sapengineers.co.in 24
accumulated value will be decremented by 1. When all 100 parts have been made, the
accumulated value & the preset value will be 0.
One important consideration when working with counters is the speed or Irequency with
which an input device is sending the Ialse-to-true signals to the processor. The speed oI the
processor scan must be taken into consideration. As an example, iI parts are passing an inductive
proximity sensor on a conveyor Iaster that the processor scan can see them, some parts will not be
counted.
Counting range is the numerical range within which a counter can count. The SLC 500
counters can count within the range oI 32,768 to 32,767. This is the range oI a 16-bit signed
integer.
II counter counts above 32,767, an overIlow is detected & the overIlow bit is set.
Conversely, iI a down-counter counts below 32,768, an underIlow is detected & the underIlow
bit is set. In either an overIlow or underIlow, the counter will set the appropriate bit, wrap around,
& begin counting Irom the other end oI the counting range. As an example, suppose a counter
overIlows, sets the overIlow bit, & then begins counting up Irom 32,768. A down-counter counts
below 32,768, sets the underIlow bit, & then continues counting down Irom 32,767. To avoid
overIlowing or under Ilowing a counter, a reset instruction can be used to reset the counter back to
0.
Counters are retentive. Assuming that the memory backup battery is in good condition, a
counter will retain its accumulated value & the on or oII status oI the done, overIlow, &
underIlow bits through a power loss.
THE COUNT -UP INSTRUCTION
Use the count-up instruction iI you want a counter to increment one decimal value each time
it registers a rung transition Irom Ialse to true. Again, the rung`s transition Irom Ialse to true must
be seen by the processor during the processor scan beIore the input transitional signal will be
recorded by the counter. Use the count-up instruction iI you want to keep an accumulated tally oI
the number oI timers some predetermined event transpires.
Figure-14 illustrates a sample count-up (CTU) counter & its associated status bits.

For more details visit us at :wwww.sapengineers.com/www.sapengineers.co.in 25
FIGURE-18-SLC 500 COUNT-UP INSTRUCTION AND ITS ASSOCIATED STATUS BIT RUNGS
THE COUNT -DOWN INSTRUCTION
Use this instruction iI you want to count down over the range oI 32,767 to 32,768. Each time the
instruction sees a Ialse to - true transition, the accumulated value will be decremented by one
count. Assume that you want to display the remaining number oI parts to be built Ior a speciIic
order oI 100 parts. The remaining parts to be built will be displayed on an operator display device
so workers can see how many parts are needed to complete the lot. For this example, the
accumulated value will be set at 100 & the preset value will be 0. Each time a part is completed &
passes the sensor, the accumulated value will be decremented one decimal value as illustrated in
Figure 15 .

For more details visit us at :wwww.sapengineers.com/www.sapengineers.co.in 26
FIGURE-19-SLC 500 COUNT-DOWN COUNTER AND ITS ASSOCIATED STATUS BITS
Summary of Timer Features
A timer is an output instruction.
A timer is comprised oI the Iollowing parts: timer address, preset value, time base &
accumulated value.
Status bits are associated with the current state oI the timer.
The timer address is the timer`s unique identiIier in PLC memory.
A timer`s preset value is the length oI time the timer is to time Ior, while the time base
speciIies at what rate the timer will increment.
A typical time base may be seconds, tenths oI seconds, or hundredths oI a second. The
time base is also reIerred to as the timer`s accuracy.
The accumulated value is the current elapsed time.

For more details visit us at :wwww.sapengineers.com/www.sapengineers.co.in 27
Summary of Counter Features
A counter instruction is an output instruction.
Almost PLC counters count the Ialse-to-true transitions oI the rung`s input logic.
As an output, the counter instruction counts each time the input logic changes the rung
Irom Ialse to true
Input logic can be a signal coming Irom an external device, such as a limit switch, or
sensor, or a signal Irom internal logic.
Each time the counter instruction sees a Ialse-to-true rung transition; a count- up counters
accumulated value is incremented by one.
Each time a count-down counter instruction sees a Ialse-to-true rung transition; a count- up
counters accumulated value is decremented by one.
One important consideration when working with counters is the speed or Irequency with
which an input device is sending the Ialse -to-true signals to the processor. The speed oI the
processor scan must be taken into consideration. As an example, iI parts are passing an inductive
proximity sensor on a conveyor Iaster that the processor scan can see them, some parts will not be
counted. Counting range is the numerical range within which a counter can count. The SLC 500
counters can count within the range oI 32,768 to 32,767. This is the range oI a 16-bit signed
integer.

For more details visit us at :wwww.sapengineers.com/www.sapengineers.co.in 28
9.
OPERATING PROCEDURE FOR PROGRAMMABLE LOGIC
CONTROLLER TRAINER
1. Provide 230 VAC supply to PLC Panel.
2. Switch ON` the MAINS ON switch, PLC ON sw itch, CURRENT METER ON switch.
3. Make the proximity switch to sense the metal and observe the output lamp 1.
4. Make the optical switch to sense the object and observe the output lamp 2.
5. Operate the toggle switch 1 & 2 (NAND) and observe the output lamp 3.
6. Operate the toggle switch 3 & 4 (NOR) and observe the output lamp 4.
7. Operate the toggle switch 5 (Serial Switching) and observe the output lamp 5 & 6.
8. Operate the toggle switch 6 (Toggle to ON, Toggle to OFF) and observe the output lamp 7.
9. Operate the toggle switch 7 & 8 (X-NOR) and observe the output lamp 8.
10. Rotate the Pot. Above the current source and observe the current meter with lamps 9 & 10.
11. For more details reIer video 'PLC Trainer
OPERATING PROCEDURE FOR COMBINED PROGRAM
1) In the combined program the program Ior DC Motor Speed Control, Rotary Bottle Fill Plant,
& PLC Trainer is combined.
2) Although the programs have been combined , you can select the desired program by
operating TS10.By keeping the toggle switch in 'OFF(up position) the program oI PLC
trainer will operate, and by keeping the toggle switch in 'ON(down position) the program
oI Rotary bottle Iill plant and DC motor will operate.
3) Now, even iI the position oI the toggle switch is changed the earlier outputs (which are
active at time oI changing) will remain active, however the program wont operate Iurther.
4) The program oI Rotary bottle Iill plant trainer and DC motor speed control will operate
when appropriate connections are made by cables provided with trainer.
5) For more details reIer video 'Combined video oI DC Motor& Rotary Bottle Filling

For more details visit us at :wwww.sapengineers.com/www.sapengineers.co.in 29
10.
FAULTS THAT MAY OCCUR DURING OPERATION AND THEIR
SOLUTIONS
1) TRAINER DOES NOT OPERATE:
Solution: Check the power to trainer. Ensure proper power supply.
2) PROGRAM DOES NOT WORK PROPERLY :
Solution: Check the program downloaded in the PLC, whether program is correct according
to trainer.
3) LAMPS DO NOT GLOW :
Solution: Check weather wires are connected properly, iI wires are loose connect the wires
as per wiring diagram.
4) WIRING FAULTS :
Solution: ReIer to the wiring diagram given in the manual.

Вам также может понравиться