PLC3
PLC3
b)Input module
Input devices include push buttons, sensors, potentiometers, pressure switches.
The function of
the input module is to covert high voltages from input devices to low level logic
voltages that the
CPU uses internally for processing.
Input module can process both analog input and digital input. Digital inputs are
more preferred in
Industry.
Digital `is used to convert signal digital input to 5V digital signals that CPU uses
internally to
execute a user program.
f) Software
PLC consists of two parts: Operating systems and user program. The PLC
operating system
provides effective support ranging from the creation of project structure to the
creation of user
programs. The OS system is accessed through a graphical user interface window
( also known as
Main window). The main window contains all the functions needed to set up a
project , configure
the hardware , write and test programs. User program can be written in any
standard PLC
programming language like ladder diagram or statement list.
While processing a PLC program, the CPU scans and executes the main
program cyclically;A
program scan cycle consists of sequential operations that include input scan,
program scan, and
output scan. In the input scan, the CPU updates the process image input table, in
the output scan;
the CPU updates the process image output table.
After the completion of each scan cycle, the CPU returns to the beginning of the
next cycle and again repeats the cycle. The time taken to scan one program is
called scan –cycle time.
Instrumentation Tools
PLC Programming Tutorials | Ladder Logics | InstrumentationTools
PLC Programming Tutorials, PLC Theory, PLC Ladder Logic, PLC Interview Questions and
Answers, PLC MCQ, Programmable Logic Controllers Study Materials.
0
WELCOME TO
THE INDUSTRIAL WIKI
RESEARCH CONTENT IN GREATER DETAIL
Enter th
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
WIKI Talk Page
MEN
U PROGRAMMABLE LOGIC CONTROLLER
WIKI (PLC)
HOM
E Talk Page
RAND Programmable Logic Controllers (PLCs) have become an integral part of the industrial
OM environment. As a technician involved with the processes controlled by PLCs, it is important
PAGE to understand their basic functionalities and capabilities.
MY Menu
SAVE
1 PLC Overview
D
ARTI 1.1 What is a Programmable Logic Controller?
CLES 1.2 History of the PLC
1.2.1 Advantages of PLCs
1.2.2 Components of a PLC
SITE 1.2.2.1 Input/Output Modules
MEN 1.2.2.2 Power Supply
U 1.2.2.3 Central Processing Unit CPU
STOR 1.2.2.4 Co-processor Modules
E 1.2.2.5 Software
VIDE 1.2.2.6 Peripheral Device
O
1.3 Basic Operation of a PLC
ARC
HIVE 1.3.1 Ladder Logic of a Hardwired System
EVEN 1.3.2 Simple Ladder Diagram of a Hardwired Circuit
T 2 PLC Operations
CENT 2.1 Basic Operation
ER 2.1.1 Operational Sequence
FORU 2.1.2 The Scan Cycle
M 2.2 Logic Scan
3 PLC Hardware
3.1 PLC Components
3.2 Power Supply
3.3 Input/Output Modules
3.3.1 Input Modules
3.3.2 Input Module Wiring
3.3.3 Input Indicators
3.4 Output Module
3.4.1 Output Module Wiring
3.5 Discrete Modules
3.5.1 Discrete Module Wiring
3.6 Numerical Data Modules
3.7 AC/DC Input Modules
3.7.1 AC Input Modules
3.7.2 DC Input Discrete Modules
3.7.3 DC Input Analog Modules
3.8 AC/DC Output Modules
3.8.1 AC Output Modules
3.8.2 DC Output Modules Discrete
3.8.3 DC Output Modules Analog
3.8.4 Proportional Integral and Derivative PID Processor Module
3.9 Controls and Indicators
3.10 Scanning
3.11 User Program
4 Addressing and Number Systems
4.1 Number Systems
4.2 Types of Number Systems
4.2.1 Binary
4.3 Octal
4.3.1 Decimal to Octal/Octal to Decimal Conversion
4.3.2 Binary to Octal/Octal to Binary Conversion
4.4 Hexadecimal
4.4.1 Binary Coded Decimal
4.5 Addressing
4.5.1 Addressing Terminology
4.5.1.1 Chassis
4.5.1.2 Group
4.5.1.3 Rack
4.5.1.4 Slot
4.5.1.5 Elements
4.5.1.6 Words
4.5.1.7 Bit
4.5.1.8 Bytes
4.5.2 Rack Addressing Rules
4.5.3 Addressing Examples
5 PLC Communications
5.1 PLC Communication Description
5.2 PLC Communication Protocols
5.3 PLC Networking
5.3.1 Device Net
5.3.2 Control Net
5.3.3 Ethernet
5.3.4 Data Highway Plus DH+
5.3.5 PLC Terms
5.3.5.1 ASCII
5.3.5.2 ASCII Module
5.3.5.3 Bus Topology
5.3.5.4 CPU
5.3.5.5 Daisy Chain
5.3.5.6 Distributed Control
5.3.5.7 Host Computer
5.3.5.8 Intelligent Device
5.3.5.9 I/O
5.3.5.10 Kbps
5.3.5.11 Mbps
5.3.5.12 Node
5.3.5.13 Protocol
5.3.5.14 Ring Topology
5.3.5.15 RS232
5.3.5.16 Serial
5.3.5.17 Serial Port
5.3.5.18 Star Topology
5.3.5.19 Topology
5.3.5.20 Transparent
5.4 Remote I/O Configurations
5.5 Peer-to-Peer Configurations
5.6 Host Computer
6 PLC Software
6.1 Software vs. Firmware
6.2 HMI Human Machine Interface
6.3 Ladder Logic Diagrams
6.4 Logic Instructions
6.5 Relays
6.5.1 Examine If Closed XIC
6.5.2 Examine If Open XIO
6.5.3 Output Energized OTE
6.5.4 Output Latched OTL
6.5.5 Output Unlatched OTU
6.6 Timers
6.6.1 Timer On Delay TON
6.6.2 Timer Off Delay TOF
6.6.3 Retentive Timer On RTO
6.7 Counters
6.7.1 Count Up Counter CTU
6.7.2 Count Up Counter CTD
6.8 Reset Command RES
6.9 Data Transfer Instructions
6.10 Arithmetic Commands
6.11 Data Manipulation Instructions
6.11.1 Master Control Reset
6.12 Program Control Instructions
6.12.1 Subroutines
Talk Page
PLC Overview
Talk Page
Advantages of PLCs
There are six major advantages of using PLCs over relay systems as follows:
Flexibility
Ease of troubleshooting
Space efficiency
Low cost
Testing
Visual operation
Components of a PLC
All PLCs have the same basic components. These components work together to bring
information into the PLC from the field, evaluate that information, and send information
back out to various field. Without any of these major components, the PLC will fail to
function properly.
The basic components include a power supply, central processing unit (CPU or processor),
co-processor modules, input and output modules (I/O), and a peripheral device.
Figure 3: PLC Components
Talk Page
Input/Output Modules
The type of input modules used by a PLC depends on the type of input device. For example,
some respond to digital inputs, which are eitheronoroffwhile others respond to analog
signals. In this case, analog signals represent machine or process conditions as a range of
voltage or current values. The PLC input circuitry converts signals into logic signals that the
CPU can use. The CPU evaluates the status of inputs, outputs, and other variables as it
executes a stored program. The CPU then sends signals to update the status of outputs.
Output modules convert control signals from the CPU into digital or analog values that can
be used to control various output devices. The programming device is used to enter or
change the PLCs program or to monitor or change stored values. Once entered, the program
and associated variables are stored in the CPU. In addition to these basic elements, a PLC
system may also incorporate an operator interface device to simplify monitoring of the
machine or process.
Talk Page
Power Supply
The function of the power supply is to provide the DC power to operate the PLC. It is
supplied by single-phase 120 or 240 VAC line power that powers the PLC system. See
Figure x.
Figure 4:PLC Power Supply
The Power Supply is a module located in the PLC system module rack. The DC power
(voltage and current) it provides power the other modules in the rack, such as the CPU, Co-
processor Modules, and I/O Modules.
The line power provided to the PLC system also powers the I/O Field Devices. The PLC
system is protected against PLC module or field device malfunctions. The Fuse in Figure 4
provides this protection.
Talk Page
Talk Page
Co-processor Modules
Co-Processor Modules are programmable general-purpose microcomputers that expand the
capability and functionality of a PLC system. A Co-Processor Module is controlled by the
CPU, and interfaces with the CPU as shown above.
Co-Processor Modules monitor and control peripheral systems such as the following:
Alphanumeric Displays
Video Graphics Displays
Communication Networks
Talk Page
Software
The function of Software is to provide instructions to the CPU and Co-Processor Modules.
Physically, software is a large group of logic ones and zeros stored in the memory of the
CPU.
Talk Page
Peripheral Device
The function of the peripheral device is to input data and monitor the equipment operation. It
may be a personal computer, handheld programmer, or an operator touch screen.
Talk Page
The coil or output of a rung, may represent a physical output, which operates some device
connected to the PLC, or may represent an internal storage bit for use elsewhere in the
program.
Figure 7: Simple Ladder Diagram
Ladder logic is typically read left to right and top to bottom. As each of the lines or rungs are
evaluated, the output coil of a rung may feed into the next stage of the ladder as an input. In a
complex system there will be many rungs on a ladder, which are numbered in order of
evaluation.
Talk Page
PLC Operations
Talk Page
Basic Operation
The operation of a PLC is very simple. The processor makes decisions based on a ladder
logic program written by the user (see Topic I). In order to use the program properly, the
PLC must communicate with the various field devices it is tasked with monitoring and
controlling. It then compares the actual conditions of the field devices with what the program
instructs them to do, and updates the output devices accordingly.
Talk Page
Operational Sequence
The operational sequence shown in Figure 6 is as follows:
Logic Scan
Ladder logic programs are modeled after relay logic. In relay logic, each element in the
ladder will switch as quickly as possible. Program elements can only be examined one at a
time in a fixed sequence. The ladder logic graphic in Figure 8 is interpreted left-to-right, top-
to-bottom. The ladder logic scan begins at the top rung. At the end of the rung, it interprets
the top output first, then the output branched below it. On the second rung, it solves
branches, before moving along the ladder logic rung.
PLC Hardware
Talk Page
PLC Components
PLCs have grown throughout industrial control applications because of the ease they bring to
creating a controller: ease of programming, ease of wiring, ease of installation, and ease of
changing. All PLCs have the same basic components. These components work together to
bring information into the PLC from the field, evaluate that information, and send
information back out to various field. Without any of these major components, the PLC will
fail to function properly. PLCs span a wide range of sizes, but all contain six basic
components as shown in Figure 9 and Figure 10:
1. Power supply
2. Input module
3. Output module
4. Processor (CPU)
5. Rack or mounting assembly
6. Programming unit (software)
Power Supply
The power supply, as shown in Figure 13, provides power for the PLC system. The power
supply provides internal DC current to operate the processor logic circuitry and input/output
assemblies. Common power levels used are 24V DC or 120 VAC.
I/O modules are available with various numbers of field device points, such as 4, 8, 16 and
32 point. Optocouplers in the modules are used to electrically isolate the module from the
CPU.
Talk Page
Input Modules
Input modules provide the electrical connection between field devices (pushbuttons, limit
switches, photoeyes) and internal process of the PLC. They differ in voltages and types of
signals produced such ason,offor a variable voltage. Figure 14 shows an example of a
generic input module.
Figure 14: PLC Input Module
Talk Page
Input Indicators
Indicator lights are located on the digital input modules. These lights indicate the status of
the input point on the module. The active light indicates whether or not the module is active
and communicating with the processor.
The indicator lights are numbered in two rows, 00-7 and 10-17 (I/O addressing will be
discussed later). These numbers represent each of the input points on the module. If an input
point has power applied to it, the associated light illuminates. The lights are very useful in
verifying that field devices, such as switches and photoeyes, are properly operating.
Figure 15 shows the common layout for indicator lights on an input module. Note that these
lights ONLY show the user that power is getting to this point on the module. They do NOT
indicate whether or not the processor is actually receiving that indication.
Output Module
Outputs are the devices that the PLC uses to send changes out to the world. These are the
actuator the PLC can change to adjust or control the process - motors, lights, relays, pumps,
etc. Figure 16 shows an example of an output module.
Discrete Modules
The term refers to an Off switching output. One type of PLC module that produces discrete
signals is a relay module. It has physical relay that opens (Figure 17) or closes (Figure 18)
to make or break a circuit connected to its terminals. Relay modules have several pairs; each
of which are connected to internal relay contacts.
AC Input Modules
AC input modules detect the presence or absence of AC voltage, and convert that voltage to
a low level for input to the CPU. The AC voltage indicates the field device status. The
voltage level is commonly 24, 115 or 220 VAC. Modules are available for up to 1,000 VAC.
An AC Input module schematic diagram is shown in Figure X. When the field device
completes the input circuit, a path for AC exists. An LED on the front of the module,
indicates the input is present.
Figure 23: AC Input Module Schematic
A rectifier converts the AC to DC. The optocoupler isolates the input module from the CPU
and effectively drops the DC voltage level to a level safe for CPU operations.
Most AC input modules use an external AC power supply for "interrogation" of the field
devices. On-board AC power supplies increase the size of the module and require additional
heat dissipation considerations.
AC inputs may use a common neutral connection for several points or there may be an
"isolated" neutral for each point for additional fault protection. The input module shown in
Figure 7 uses neutral C1 for points 00-07 and neutral C2 for points 10-17. Analog AC input
modules are not commonly used because there are no standardized analog AC voltage or
current signals.
Talk Page
AC Output Modules
AC output modules control the ON/OFF states of AC output field devices such as relays,
coils, and solenoids. They do not normally supply power to the field devices. Figure X is a
schematic diagram of the module.
Scanning
The processor module controls the PLC by executing the software program. During program
execution, the processor reads all the inputs and uses the values, in accordance with the
control logic, to energize or de-energize the outputs, thus solving the ladder network. Once
all the logic is solved, the processor updates all outputs. The process of reading the inputs,
executing the program, and updating the outputs is known as a scan. The time required to
make a single scan varies from 1 msec to 100 msec.
The scan is normally a continuous and sequential process of reading the status of inputs,
evaluating the control logic, and updating outputs. The common scan method of monitoring
the inputs at the end of each scan is inadequate for reading certain rapid inputs. Some PLCs
provide software instructions that will allow the interruption of the continuous program scan
to immediately receive an input or update an output. These immediate instructions are very
useful when the PLC must instantaneously react to a critical input or output.
Talk Page
User Program
The user program memory is an area reserved in the application memory for the storage of
the control logic. All the PLC instructions that control the machine or process are stored
here. The addresses of inputs and outputs, whether real or internal, are specified in this
section of memory.
When the processor is in the run mode and the program is executed, the processor interprets
the user program memory locations and controls the bits of the data table that correspond to
real or internal outputs. The interpretation of the user program is accomplished by the
processors execution of the executive program.
The maximum amount of available user program memory is normally a function of the
processor size (i.e., I/O capacity). In medium and large controllers, the user program area is
normally flexible by altering the size of the data table so that it meets the minimum data
storage requirements. In small processors, however, the user program area is normally fixed.
Talk Page
Binary
The simplest possible number system is the binary, or base 2, system. Since the binary
number system is a base 2 system, only two symbols, 0 and 1, are used.
The binary system is also a positional notation system. While the decimal system uses
powers of 10 to determine the value of a position, the binary system uses powers of 2 to
determine the value of a position. A bar graph showing the positions and the powers of the
base is shown below:
Table 1 provides a comparison of decimal and binary numbers. Notice each time the total
number of binary symbol positions increases, the binary number indicates the next higher
power of 2. The table also shows that more symbol positions are necessary in the binary
system to represent equivalent values in the decimal system.
Talk Page
Octal
The octal, or base 8, number system is a common system used with computers. Because of
its relationship with the binary system, it is useful in programming some types of computers.
As with the other systems, the base, or radix, is the number of symbols used in the system.
The octal system uses eight symbols, 0 through 7. The base is indicated by the subscript 8.
Table 2 compares the binary, octal, and decimal number systems and shows that one octal
digit is the equivalent value of three binary digits.
Similar to the decimal and binary systems, the octal system is a positional notation system.
The octal system uses powers of 8. The following bar graph shows the positions and the
power of the base:
Here the power, orexponent, indicates the number of times the base is multiplied by itself.
The value of thismultiplicationis expressed in base 10 as shown below:
Talk Page
By performing the calculation above in the familiar decimal system we see why 112 in octal
is equal to 64 + 8 + 2 = 74 in decimal.
Talk Page
Talk Page
Hexadecimal
The hexadecimal, or hex, number system is a more complex system in use with computers.
The name is derived from the fact that the system uses 16 symbols. It is beneficial in
computer programming because of its relationship to the binary system. Since 16 in the
decimal system is the 2 to the fourth power (or 24), one hex digit has a value equal to four
binary digits. Table 2 compares the binary and hexadecimal number systems.
As in each of the previous number systems, a unit stands for a single object. A number in the
hex system is the symbol used to represent a unit or quantity. The Arabic numerals 0 through
9 are used with the first six letters of the alphabet. Letters are sometimes used in math
problems to represent unknown quantities but in the hex system, A, B, C, D, E, and F each
have a definite value as shown below:
The base, or radix, of the hex system is 16, which represents the number of symbols used in
the system. A quantity expressed in hex is annotated by the subscript 16, as shown below:
Like the binary, octal, and decimal systems, the hex system is a positional notation system.
Powers of 16 are used for the positional values of a number. The following bar graph shows
the positions:
Multiplying the base times itself the number of times indicated by the exponent will show
the equivalent decimal value:
As seen by the positional values, usually fewer symbol positions are required to express a
number in hex than in decimal. The following example shows this comparison:
Talk Page
Addressing
Addressing is the most important concept to understand when learning PLCs. Addressing is
how we make a correlation between the field devices controlled by the PLC, and the data
that is stored in the PLCs memory. If you cannot address a point or group of points in the
PLCs memory, then you cannnot control the field device associated with that point.
The easiest way to approach understanding the addressing used in the Allen Bradley PLC-5
is to view all addresses from the processors point of view. By this, we mean that in order for
a real device in the field, such as a relay, to be operated by the PLC, the PLC must first have
a record of that point in its memory. That point can then be accessed by the PLC. The Allen
Bradley PLC-5 stores the information regarding all of the points it can address in areas
called Data Tables as shown in figure 29. The data tables are divided up by function.
Figure 29: Data Table Files
Talk Page
Addressing Terminology
There are seven terms one must know in order to understand addressing as defined below.
Talk Page
Chassis
Hardware assembly (physical rack) that houses devices such as I/O modules, adapter
modules, processor modules, and power supplies. Chassis are available in six sizes: 4-, 8-,
12-, and 16-slot.
Talk Page
Group
An I/O addressing unit consisting of one input and one output word (16 bits each) of the data
table. Depending on the density of the I/O module and the addressing mode used, some of
the bits in a group may be unused. The group number is included in I/O addresses in the
position represented with agin the format: I:rrg/xx.
Talk Page
Rack
An I/O addressing unit that corresponds to eight input image table words and eight output
image table words (8 groups). A rack is a logical entity not to be confused with the physical
chassis. 8 groups = 1 full rack, 6 groups = rack, 4 groups = rack, 2 groups = rack. The rack
number is included in I/O addresses in the position represented with an "rr" in the format:
I:rrg/xx.
Talk Page
Slot
A location in a chassis for installing a module. The number of physical slots per group
determines the addressing mode.
Talk Page
Elements
Data files are made up of individual data blocks called "Elements" or "Structures". Each
element is composed of "words", and each word is composed of "bits". Elements are
comprised of from 1 to 56 words, depending on the instruction. Most instructions you will
encounter will have from one to three words to an element.
An example of an element level address is T4:0
T4:0 indicates the first timer (0) in the default timer file (T4). Each timer is comprised of
three (3) 16 bit words. When you say T4:0, you are referring to all three of these words as a
group.
Figure 30: Elements
Another example, illustrated on the right, is the address N7:15. This identifies element 15 in
the integer file N7. Since integer files have one word elements, the element number and
word number will match in this case as shown in Figure X and Figure Y.
Figure 31: Element Address
Talk Page
Words
Words are the next level of identification down from elements. Each "word" in the PLC is
comprised of 16 bits as shown in Figure 32.
When an instruction is addressed to the word level, it is looking at all 16 bits of a particular
word in an element. When an element is comprised of more than one word, the 0 word
contains status data in bit form, and the other words contain data which must be stored in
more than one bit.
A good example is a timer file. Timers elements are comprised of three words. The 0 word
contains status information which can be stored in individual bits. For example, the 17 bit in
the 0 word is the done bit, indicating that the timer has timed out.
The one and two words contain information which require a full word to contain. In the
timer, the one word contains the value of the preset (PRE) of the timer, and the two word
contains the information about the Accumulator (ACC). These words are addressed by their
symbols, PRE and ACC. When accessing an element to the word level, the period (.) is used
to delimit instead of the slash (/).
Figure 32: Word Address
Talk Page
Bit
The smallest unit of data in a PLC is the bit. Bits make up words, which in turn make up
elements. Many instructions must be specified down to the bit level. For example, if you
want to know the status of the Done bit on a timer, you must specify the address down to the
bit level. The address would be:
T4:0/DN
T4:0 is the element we are addressing. Since we are addressing a single bit, we put the "/"
sign as a bit delimiter, and then specify the bit. In this case the Done bit. Figure 33 shows the
element B3:63 and the bit 15. Note that in this case, the individual bits are identified by
numbers, not names (as in the done bit in the timer). This is true of bits in all files except
those having more than one word in an element.
Bytes
A group of bits forming a piece of data. Usually a subset of a word consisting of eight bits.
Talk Page
A rack is a logical term that defines 8 words in the processor input data table and 8
words in the processor output data table.
These words are numbered 0-7.
Each logical rack can store 128 bits of information in its input rack and 128 bits in
its output rack. (8 words per rack x 16 bits per word=128 bits of data storage)
In single slot addressing, each physical slot is addressed to one input word and also
to one output word. This makes it possible to put either an input module or an output
module in any slot.
The number of logical racks determines how many points a particular model of PLC
can address. This number is fixed for any particular processor and cannot be
changed.
Rack addressing is always in the format shown in Figure 34 below.
Addressing Examples
Each type of device has its own table in which to store data. In order to specify exactly
which piece of data is to be accessed, an addressing format is used which makes use of this
data structure.
In Figure 35, addresses for input and output addresses are shown. Reading from the left to
the right, the addresses tell the following:
Note that a colon separates the file identifier from the rest of the address. This is constant
for ALL addresses.
PLC Communications
Talk Page
Talk Page
PLC Networking
Talk Page
Device Net
Device Net is one of the most widely supported networks. It is an open standard, so
components from a variety of manufacturers can be used together in the same control
system. It is supported and promoted by the Open Device Net Vendors Association (ODVA).
This group includes members from all of the major controls manufacturers. The network is
noise-resistant and robust. One major change for the control engineer is that the PLC chassis
can be eliminated and the network can be directly connected to the sensors and actuators.
This reduces the total amount of system wiring by moving I/O points closer to the
application point. Two-way communication inputs and outputs allow diagnosis of network
problems from the main controller.
Device Net covers all seven layers of the Open Systems Interconnection (OSI) standard. The
protocol has a limited number of network addresses with very small data packets. This helps
limit network traffic and ensures responsiveness. The length of the network cables limits the
maximum speed of the network. The basic features include:
Talk Page
Control Net
Control Net is complimentary to Device Net. The standard is designed for communication
among controllers and it permits more complex messages than Device Net. It is not suitable
for communication with individual sensors and actuators, or with devices off the factory
floor. Control Net is a more complicated protocol method than Device Net. Control Net
features include:
The network is unique because it supports a real-time messaging scheme called Concurrent
Time Domain Multiple Access (CTDMA). The network has scheduled, high priority and
unscheduled, low priority updates. When collisions are detected, the system waits at least
2ms for unscheduled messages. However, scheduled messages will be passed sooner, during
a special time window.
Talk Page
Ethernet
Ethernet is the predominate networking format. The first version was released in 1980 by a
consortium of companies, and various versions of Ethernet frames were released in the
subsequent years. These include Version II and Novell Networking (IEEE 802.3). Most
modern Ethernet cards support different types of frames.
The Ethernet frame is shown in Figure 36. The first six bytes make up the destination
address for the message. If all of the bits in the bytes are set, then any computer that receives
the message will read it. The first three bytes of the address are specific to the card
manufacturer, and the remaining bytes specify the remote address. The address is common
for all versions of Ethernet. The source address specifies the message sender. The Ethernet
type identifies the frame as a Version II Ethernet packet if the value is greater than 05DChex.
Other Ethernet types use these two bytes to indicate the data length. The data can be from 46
to 1,500 bytes in length. The frame concludes with a checksum that is used to verify data is
correctly transmitted. When the end of the transmission is detected, the last four bytes are
used to verify the frame is correctly received.
Talk Page
Talk Page
PLC Terms
Talk Page
ASCII
Stands for "American Standard Code for Information Interchange." For example, when the
letter "A" is transmitted it is automatically coded as "65" by the sending equipment. The
receiving equipment translates the "65" back to the letter "A." Thus, different devices can
communicate with each other as long as both use ASCII code.
Talk Page
ASCII Module
This intelligent PLC module is used for connecting PLCs to other devices also capable of
communicating using ASCII code as a vehicle.
Talk Page
Bus Topology
This is a linear local area network (LAN) arrangement in which individual nodes are tapped
into a main communications cable at a single point and broadcast messages. These messages
travel in both directions on the bus from the point of connection until terminators at each end
of the bus dissipate them.
CPU
Stands for "central processing unit," which is that part of a computer, PLC, or other
intelligent device where arithmetic and logical operations are performed and instructions are
decoded and executed.
Talk Page
Daisy Chain
This is a description of the connection of individual devices in a PLC network, where each
device is connected to the next and communications signals pass from one unit to the next in
a sequential fashion.
Talk Page
Distributed Control
This is an automation concept in which portions of an automated system are controlled by
separate controllers, which are located in close proximity to their area of direct control
(control is decentralized and spread out over the system).
Talk Page
Host Computer
A computer used to transfer data to, or receive data from, a PLC in a PLC/computer network.
Talk Page
Intelligent Device
Any device equipped with its own CPU.
I/O
Abbreviation for Inputs and Outputs, which are modules that handle data to the PLC (inputs)
or signals from the PLC (outputs) to an external device.
Talk Page
Kbps
This stands for "kilobits (thousand) bits per second," a rate of measure for electronic data
transfer.
Talk Page
Mbps
Abbreviation for "million bits per second."
Talk Page
Node
This term is applied to any one of the positions or stations in a network. Each node
incorporates a device that can communicate with all other devices on the network.
Talk Page
Protocol
Manner in which data is arranged and coded for transmission on a network.
Talk Page
Ring Topology
This is a LAN arrangement in which each node is connected to two other nodes, resulting in
a continuous, closed, circular path or loop for messages to circulate, usually in one direction
(Figure X). Some ring topologies have a special "loop back" feature that allows them to
continue functioning even if the main cable is severed.
RS232
An IEEE standard for serial communications that describes specific wiring connections,
voltage levels, and other operating parameters for electronic data communications. There
also are several other RS standards defined.
Talk Page
Serial
Electronic data transfer scheme in which information is transmitted one bit at a time.
Talk Page
Serial Port
Communication access point, shown in Figure 38, on a device that is set up for serial
communications.
Star Topology
A LAN arrangement in which nodes are connected to one another through a central hub,
which can be active or passive (Figure 39). An active hub performs network duties such as
message routing and maintenance. A passive central hub simply passes the message along to
all the nodes connected to it.
Figure 39: Star Topology
Talk Page
Topology
This relates to a specific arrangement of nodes in a LAN in relation to one another. See
Figure 40 for the most commonly used types topologies.
Talk Page
Peer-to-Peer Configurations
Peer-to-peer networks, as shown in Figure 40, enhance reliability by decentralizing the
control functions without sacrificing coordinated control. In this type of network, numerous
PLCs are connected to one another in a daisy-chain fashion, and a common memory table is
duplicated in the memory of each. In this way, when any PLC writes data to this memory
area, the information is automatically transferred to all other PLCs in the network. They then
can use this information in their own operating programs.
With peer-to-peer networks, each PLC in the network is responsible for its own control site
and only needs to be programmed for its own area of responsibility. This aspect of the
network significantly reduces programming and debugging complexity; because all
communications occur transparently to the user, communications programming is reduced to
simple read-and-write statements.
In a peer-to-peer system, theres no master PLC. However, its possible to designate one of the
PLCs as a master for use as a type of group controller. This PLC then can be used to accept
input information from an operator input terminal, for example, sending all the necessary
parameters to other PLCs and coordinating the sequencing of various events.
Talk Page
Host Computer
PLCs also can be connected with computers or other intelligent devices. In fact, most PLCs,
from the small to the very large, can be directly connected to a computer or part of a multi-
drop host computer network via RS232C or RS422 ports. This combination of computer and
controller maximizes the capabilities of the PLC, for control and data acquisition, as well as
the computer, for data processing, documentation, and operator interface.
In a PLC/computer network, as shown in Fig. 4C, all communications are initiated by the
host computer, which is connected to all the PLCs in a daisy-chain fashion. This computer
individually addresses each of its networked PLCs and asks for specific information. The
addressed PLC then sends this information to the computer for storage and further analysis.
This cycle occurs hundreds of times per second.
Host computers also can aid in programming PLCs; powerful programming and
documentation software is available for program development. Programs then can be written
on the computer in relay ladder logic and downloaded into the PLC. In this way, you can
create, modify, debug, and monitor PLC programs via a computer terminal.
In addition to host computers, PLCs often must interface with other devices, such as operator
interface terminals for large security and building management systems. Although many
intelligent devices can communicate directly with PLCs via conventional RS232C ports and
serial ASCII code, some do not have the software ability to interface with individual PLC
models. Instead, they typically send and receive data in fixed formats. It is the PLC
programmers responsibility to provide the necessary software interface.
The easiest way to provide such an interface to fixed-format intelligent devices is to use an
ASCII/BASIC module on the PLC. This module is essentially a small computer that plugs
into the bus of the PLC. Equipped with RS232 ports and programmed in BASIC, the module
easily can handle ASCII communications with peripheral devices, data acquisition functions,
programming sequences, "number crunching," report and display generation, and other
requirements.
Talk Page
PLC Software
Talk Page
Talk Page
Logic Instructions
In order to use the PLC and make simple edits, it is necessary to understand some basic
commands. The commands are all entered in ladder logic format, and many of them are
based on nomenclature used in relay logic. There are timers, counters, coils, and contacts,
among other commands.
Talk Page
Relays
Talk Page
Examine If Closed XIC
This command functions as the input or storage bit (Figure 43). The command is addressed
to the bit level. If the corresponding memory bit is 1 (true), the instruction allows rung
continuity and outputs are energized (other factors may affect rung continuity). If the
corresponding memory bit is 0 (false), the instruction does not allow rung continuity (it
assumes its normally open state) and outputs on the rung are de-energized (other factors can
influence rung continuity).
Timers
Talk Page
The processor resets the accumulated value when the rung conditions are false, regardless of
whether or not the timer has timed out. When the rung conditions go True, the timer is on
and the Enable (EN) bit is set. When the timer reaches its preset count and times out, the
Done (DN) bit is set to true.
Talk Page
The processor resets the accumulated value when the rung conditions are true, regardless of
whether or not the timer has timed out.
Talk Page
When the processor resumes operation or the rung goes true, timing continues from the
retained accumulated value. By retaining its accumulated value, retentive timers measure the
cumulative period during which its rung is true. The RTO command is reset using the RES
command.
Talk Page
Counters
Talk Page
Arithmetic Commands
Subroutines
Subroutines are an important part of a PLC program. By using them, the programmer can
make a program much more logical and faster to execute.
Basically, a subroutine is a ladder that is only executed when it is called from the main
program. File number 2 is always the first ladder in a program and, as such, is the main
ladder. When the processor scans its ladder programs, it only scans ladder number 2 unless
ladder number 2 commands it to go to another subroutine. If no other ladders are called by
a JSR, then the ONLY ladder executed is file 2. When a JSR is encountered, the program
jumps out of that ladder (in this case ladder 2), and goes to the ladder called for in the
subroutine jump command. When the end of the file is reached, the program jumps back to
the file that has the JSR, in this case file 2, and continues executing. It also returns if a
Return (RET) command is encountered in the ladder.
In order to call a subroutine, a command, such as the one shown in Figure 57, is used. It is
called a JSR (Jump To Subroutine) command. Notice that in this case, the subroutine being
called is ladder file number U: 3. The "U" indicates the file is for a user. All ladder files are
for users.
TECHNOLOGY TRANSFER SERVICES PRIVACY POLICY TERMS OF USE ODESIE LICENSE HELP SITEMAP
WELCOME TO
THE INDUSTRIAL WIKI
RESEARCH CONTENT IN GREATER DETAIL
Enter th
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
WIKI Talk Page
MEN
U PROGRAMMABLE LOGIC CONTROLLER
WIKI (PLC)
HOM
E Talk Page
RAND Programmable Logic Controllers (PLCs) have become an integral part of the industrial
OM environment. As a technician involved with the processes controlled by PLCs, it is important
PAGE to understand their basic functionalities and capabilities.
MY Menu
SAVE
1 PLC Overview
D
ARTI 1.1 What is a Programmable Logic Controller?
CLES 1.2 History of the PLC
1.2.1 Advantages of PLCs
SITE 1.2.2 Components of a PLC
MEN 1.2.2.1 Input/Output Modules
U 1.2.2.2 Power Supply
STOR 1.2.2.3 Central Processing Unit CPU
E 1.2.2.4 Co-processor Modules
VIDE 1.2.2.5 Software
O 1.2.2.6 Peripheral Device
ARC 1.3 Basic Operation of a PLC
HIVE
1.3.1 Ladder Logic of a Hardwired System
EVEN
T 1.3.2 Simple Ladder Diagram of a Hardwired Circuit
CENT 2 PLC Operations
ER 2.1 Basic Operation
FORU 2.1.1 Operational Sequence
M 2.1.2 The Scan Cycle
2.2 Logic Scan
3 PLC Hardware
3.1 PLC Components
3.2 Power Supply
3.3 Input/Output Modules
3.3.1 Input Modules
3.3.2 Input Module Wiring
3.3.3 Input Indicators
3.4 Output Module
3.4.1 Output Module Wiring
3.5 Discrete Modules
3.5.1 Discrete Module Wiring
3.6 Numerical Data Modules
3.7 AC/DC Input Modules
3.7.1 AC Input Modules
3.7.2 DC Input Discrete Modules
3.7.3 DC Input Analog Modules
3.8 AC/DC Output Modules
3.8.1 AC Output Modules
3.8.2 DC Output Modules Discrete
3.8.3 DC Output Modules Analog
3.8.4 Proportional Integral and Derivative PID Processor Module
3.9 Controls and Indicators
3.10 Scanning
3.11 User Program
4 Addressing and Number Systems
4.1 Number Systems
4.2 Types of Number Systems
4.2.1 Binary
4.3 Octal
4.3.1 Decimal to Octal/Octal to Decimal Conversion
4.3.2 Binary to Octal/Octal to Binary Conversion
4.4 Hexadecimal
4.4.1 Binary Coded Decimal
4.5 Addressing
4.5.1 Addressing Terminology
4.5.1.1 Chassis
4.5.1.2 Group
4.5.1.3 Rack
4.5.1.4 Slot
4.5.1.5 Elements
4.5.1.6 Words
4.5.1.7 Bit
4.5.1.8 Bytes
4.5.2 Rack Addressing Rules
4.5.3 Addressing Examples
5 PLC Communications
5.1 PLC Communication Description
5.2 PLC Communication Protocols
5.3 PLC Networking
5.3.1 Device Net
5.3.2 Control Net
5.3.3 Ethernet
5.3.4 Data Highway Plus DH+
5.3.5 PLC Terms
5.3.5.1 ASCII
5.3.5.2 ASCII Module
5.3.5.3 Bus Topology
5.3.5.4 CPU
5.3.5.5 Daisy Chain
5.3.5.6 Distributed Control
5.3.5.7 Host Computer
5.3.5.8 Intelligent Device
5.3.5.9 I/O
5.3.5.10 Kbps
5.3.5.11 Mbps
5.3.5.12 Node
5.3.5.13 Protocol
5.3.5.14 Ring Topology
5.3.5.15 RS232
5.3.5.16 Serial
5.3.5.17 Serial Port
5.3.5.18 Star Topology
5.3.5.19 Topology
5.3.5.20 Transparent
5.4 Remote I/O Configurations
5.5 Peer-to-Peer Configurations
5.6 Host Computer
6 PLC Software
6.1 Software vs. Firmware
6.2 HMI Human Machine Interface
6.3 Ladder Logic Diagrams
6.4 Logic Instructions
6.5 Relays
6.5.1 Examine If Closed XIC
6.5.2 Examine If Open XIO
6.5.3 Output Energized OTE
6.5.4 Output Latched OTL
6.5.5 Output Unlatched OTU
6.6 Timers
6.6.1 Timer On Delay TON
6.6.2 Timer Off Delay TOF
6.6.3 Retentive Timer On RTO
6.7 Counters
6.7.1 Count Up Counter CTU
6.7.2 Count Up Counter CTD
6.8 Reset Command RES
6.9 Data Transfer Instructions
6.10 Arithmetic Commands
6.11 Data Manipulation Instructions
6.11.1 Master Control Reset
6.12 Program Control Instructions
6.12.1 Subroutines
Talk Page
PLC Overview
Talk Page
Advantages of PLCs
There are six major advantages of using PLCs over relay systems as follows:
Flexibility
Ease of troubleshooting
Space efficiency
Low cost
Testing
Visual operation
Components of a PLC
All PLCs have the same basic components. These components work together to bring
information into the PLC from the field, evaluate that information, and send information
back out to various field. Without any of these major components, the PLC will fail to
function properly.
The basic components include a power supply, central processing unit (CPU or processor),
co-processor modules, input and output modules (I/O), and a peripheral device.
Figure 3: PLC Components
Talk Page
Input/Output Modules
The type of input modules used by a PLC depends on the type of input device. For example,
some respond to digital inputs, which are eitheronoroffwhile others respond to analog
signals. In this case, analog signals represent machine or process conditions as a range of
voltage or current values. The PLC input circuitry converts signals into logic signals that the
CPU can use. The CPU evaluates the status of inputs, outputs, and other variables as it
executes a stored program. The CPU then sends signals to update the status of outputs.
Output modules convert control signals from the CPU into digital or analog values that can
be used to control various output devices. The programming device is used to enter or
change the PLCs program or to monitor or change stored values. Once entered, the program
and associated variables are stored in the CPU. In addition to these basic elements, a PLC
system may also incorporate an operator interface device to simplify monitoring of the
machine or process.
Talk Page
Power Supply
The function of the power supply is to provide the DC power to operate the PLC. It is
supplied by single-phase 120 or 240 VAC line power that powers the PLC system. See
Figure x.
Figure 4:PLC Power Supply
The Power Supply is a module located in the PLC system module rack. The DC power
(voltage and current) it provides power the other modules in the rack, such as the CPU, Co-
processor Modules, and I/O Modules.
The line power provided to the PLC system also powers the I/O Field Devices. The PLC
system is protected against PLC module or field device malfunctions. The Fuse in Figure 4
provides this protection.
Talk Page
Talk Page
Co-processor Modules
Co-Processor Modules are programmable general-purpose microcomputers that expand the
capability and functionality of a PLC system. A Co-Processor Module is controlled by the
CPU, and interfaces with the CPU as shown above.
Co-Processor Modules monitor and control peripheral systems such as the following:
Alphanumeric Displays
Video Graphics Displays
Communication Networks
Talk Page
Software
The function of Software is to provide instructions to the CPU and Co-Processor Modules.
Physically, software is a large group of logic ones and zeros stored in the memory of the
CPU.
Talk Page
Peripheral Device
The function of the peripheral device is to input data and monitor the equipment operation. It
may be a personal computer, handheld programmer, or an operator touch screen.
Talk Page
The coil or output of a rung, may represent a physical output, which operates some device
connected to the PLC, or may represent an internal storage bit for use elsewhere in the
program.
Figure 7: Simple Ladder Diagram
Ladder logic is typically read left to right and top to bottom. As each of the lines or rungs are
evaluated, the output coil of a rung may feed into the next stage of the ladder as an input. In a
complex system there will be many rungs on a ladder, which are numbered in order of
evaluation.
Talk Page
PLC Operations
Talk Page
Basic Operation
The operation of a PLC is very simple. The processor makes decisions based on a ladder
logic program written by the user (see Topic I). In order to use the program properly, the
PLC must communicate with the various field devices it is tasked with monitoring and
controlling. It then compares the actual conditions of the field devices with what the program
instructs them to do, and updates the output devices accordingly.
Talk Page
Operational Sequence
The operational sequence shown in Figure 6 is as follows:
Logic Scan
Ladder logic programs are modeled after relay logic. In relay logic, each element in the
ladder will switch as quickly as possible. Program elements can only be examined one at a
time in a fixed sequence. The ladder logic graphic in Figure 8 is interpreted left-to-right, top-
to-bottom. The ladder logic scan begins at the top rung. At the end of the rung, it interprets
the top output first, then the output branched below it. On the second rung, it solves
branches, before moving along the ladder logic rung.
PLC Hardware
Talk Page
PLC Components
PLCs have grown throughout industrial control applications because of the ease they bring to
creating a controller: ease of programming, ease of wiring, ease of installation, and ease of
changing. All PLCs have the same basic components. These components work together to
bring information into the PLC from the field, evaluate that information, and send
information back out to various field. Without any of these major components, the PLC will
fail to function properly. PLCs span a wide range of sizes, but all contain six basic
components as shown in Figure 9 and Figure 10:
1. Power supply
2. Input module
3. Output module
4. Processor (CPU)
5. Rack or mounting assembly
6. Programming unit (software)
Power Supply
The power supply, as shown in Figure 13, provides power for the PLC system. The power
supply provides internal DC current to operate the processor logic circuitry and input/output
assemblies. Common power levels used are 24V DC or 120 VAC.
I/O modules are available with various numbers of field device points, such as 4, 8, 16 and
32 point. Optocouplers in the modules are used to electrically isolate the module from the
CPU.
Talk Page
Input Modules
Input modules provide the electrical connection between field devices (pushbuttons, limit
switches, photoeyes) and internal process of the PLC. They differ in voltages and types of
signals produced such ason,offor a variable voltage. Figure 14 shows an example of a
generic input module.
Figure 14: PLC Input Module
Talk Page
Input Indicators
Indicator lights are located on the digital input modules. These lights indicate the status of
the input point on the module. The active light indicates whether or not the module is active
and communicating with the processor.
The indicator lights are numbered in two rows, 00-7 and 10-17 (I/O addressing will be
discussed later). These numbers represent each of the input points on the module. If an input
point has power applied to it, the associated light illuminates. The lights are very useful in
verifying that field devices, such as switches and photoeyes, are properly operating.
Figure 15 shows the common layout for indicator lights on an input module. Note that these
lights ONLY show the user that power is getting to this point on the module. They do NOT
indicate whether or not the processor is actually receiving that indication.
Output Module
Outputs are the devices that the PLC uses to send changes out to the world. These are the
actuator the PLC can change to adjust or control the process - motors, lights, relays, pumps,
etc. Figure 16 shows an example of an output module.
Discrete Modules
The term refers to an Off switching output. One type of PLC module that produces discrete
signals is a relay module. It has physical relay that opens (Figure 17) or closes (Figure 18)
to make or break a circuit connected to its terminals. Relay modules have several pairs; each
of which are connected to internal relay contacts.
AC Input Modules
AC input modules detect the presence or absence of AC voltage, and convert that voltage to
a low level for input to the CPU. The AC voltage indicates the field device status. The
voltage level is commonly 24, 115 or 220 VAC. Modules are available for up to 1,000 VAC.
An AC Input module schematic diagram is shown in Figure X. When the field device
completes the input circuit, a path for AC exists. An LED on the front of the module,
indicates the input is present.
Figure 23: AC Input Module Schematic
A rectifier converts the AC to DC. The optocoupler isolates the input module from the CPU
and effectively drops the DC voltage level to a level safe for CPU operations.
Most AC input modules use an external AC power supply for "interrogation" of the field
devices. On-board AC power supplies increase the size of the module and require additional
heat dissipation considerations.
AC inputs may use a common neutral connection for several points or there may be an
"isolated" neutral for each point for additional fault protection. The input module shown in
Figure 7 uses neutral C1 for points 00-07 and neutral C2 for points 10-17. Analog AC input
modules are not commonly used because there are no standardized analog AC voltage or
current signals.
Talk Page
AC Output Modules
AC output modules control the ON/OFF states of AC output field devices such as relays,
coils, and solenoids. They do not normally supply power to the field devices. Figure X is a
schematic diagram of the module.
Scanning
The processor module controls the PLC by executing the software program. During program
execution, the processor reads all the inputs and uses the values, in accordance with the
control logic, to energize or de-energize the outputs, thus solving the ladder network. Once
all the logic is solved, the processor updates all outputs. The process of reading the inputs,
executing the program, and updating the outputs is known as a scan. The time required to
make a single scan varies from 1 msec to 100 msec.
The scan is normally a continuous and sequential process of reading the status of inputs,
evaluating the control logic, and updating outputs. The common scan method of monitoring
the inputs at the end of each scan is inadequate for reading certain rapid inputs. Some PLCs
provide software instructions that will allow the interruption of the continuous program scan
to immediately receive an input or update an output. These immediate instructions are very
useful when the PLC must instantaneously react to a critical input or output.
Talk Page
User Program
The user program memory is an area reserved in the application memory for the storage of
the control logic. All the PLC instructions that control the machine or process are stored
here. The addresses of inputs and outputs, whether real or internal, are specified in this
section of memory.
When the processor is in the run mode and the program is executed, the processor interprets
the user program memory locations and controls the bits of the data table that correspond to
real or internal outputs. The interpretation of the user program is accomplished by the
processors execution of the executive program.
The maximum amount of available user program memory is normally a function of the
processor size (i.e., I/O capacity). In medium and large controllers, the user program area is
normally flexible by altering the size of the data table so that it meets the minimum data
storage requirements. In small processors, however, the user program area is normally fixed.
Talk Page
Binary
The simplest possible number system is the binary, or base 2, system. Since the binary
number system is a base 2 system, only two symbols, 0 and 1, are used.
The binary system is also a positional notation system. While the decimal system uses
powers of 10 to determine the value of a position, the binary system uses powers of 2 to
determine the value of a position. A bar graph showing the positions and the powers of the
base is shown below:
Table 1 provides a comparison of decimal and binary numbers. Notice each time the total
number of binary symbol positions increases, the binary number indicates the next higher
power of 2. The table also shows that more symbol positions are necessary in the binary
system to represent equivalent values in the decimal system.
Talk Page
Octal
The octal, or base 8, number system is a common system used with computers. Because of
its relationship with the binary system, it is useful in programming some types of computers.
As with the other systems, the base, or radix, is the number of symbols used in the system.
The octal system uses eight symbols, 0 through 7. The base is indicated by the subscript 8.
Table 2 compares the binary, octal, and decimal number systems and shows that one octal
digit is the equivalent value of three binary digits.
Similar to the decimal and binary systems, the octal system is a positional notation system.
The octal system uses powers of 8. The following bar graph shows the positions and the
power of the base:
Here the power, orexponent, indicates the number of times the base is multiplied by itself.
The value of thismultiplicationis expressed in base 10 as shown below:
Talk Page
By performing the calculation above in the familiar decimal system we see why 112 in octal
is equal to 64 + 8 + 2 = 74 in decimal.
Talk Page
Talk Page
Hexadecimal
The hexadecimal, or hex, number system is a more complex system in use with computers.
The name is derived from the fact that the system uses 16 symbols. It is beneficial in
computer programming because of its relationship to the binary system. Since 16 in the
decimal system is the 2 to the fourth power (or 24), one hex digit has a value equal to four
binary digits. Table 2 compares the binary and hexadecimal number systems.
As in each of the previous number systems, a unit stands for a single object. A number in the
hex system is the symbol used to represent a unit or quantity. The Arabic numerals 0 through
9 are used with the first six letters of the alphabet. Letters are sometimes used in math
problems to represent unknown quantities but in the hex system, A, B, C, D, E, and F each
have a definite value as shown below:
The base, or radix, of the hex system is 16, which represents the number of symbols used in
the system. A quantity expressed in hex is annotated by the subscript 16, as shown below:
Like the binary, octal, and decimal systems, the hex system is a positional notation system.
Powers of 16 are used for the positional values of a number. The following bar graph shows
the positions:
Multiplying the base times itself the number of times indicated by the exponent will show
the equivalent decimal value:
As seen by the positional values, usually fewer symbol positions are required to express a
number in hex than in decimal. The following example shows this comparison:
Talk Page
Addressing
Addressing is the most important concept to understand when learning PLCs. Addressing is
how we make a correlation between the field devices controlled by the PLC, and the data
that is stored in the PLCs memory. If you cannot address a point or group of points in the
PLCs memory, then you cannnot control the field device associated with that point.
The easiest way to approach understanding the addressing used in the Allen Bradley PLC-5
is to view all addresses from the processors point of view. By this, we mean that in order for
a real device in the field, such as a relay, to be operated by the PLC, the PLC must first have
a record of that point in its memory. That point can then be accessed by the PLC. The Allen
Bradley PLC-5 stores the information regarding all of the points it can address in areas
called Data Tables as shown in figure 29. The data tables are divided up by function.
Figure 29: Data Table Files
Talk Page
Addressing Terminology
There are seven terms one must know in order to understand addressing as defined below.
Talk Page
Chassis
Hardware assembly (physical rack) that houses devices such as I/O modules, adapter
modules, processor modules, and power supplies. Chassis are available in six sizes: 4-, 8-,
12-, and 16-slot.
Talk Page
Group
An I/O addressing unit consisting of one input and one output word (16 bits each) of the data
table. Depending on the density of the I/O module and the addressing mode used, some of
the bits in a group may be unused. The group number is included in I/O addresses in the
position represented with agin the format: I:rrg/xx.
Talk Page
Rack
An I/O addressing unit that corresponds to eight input image table words and eight output
image table words (8 groups). A rack is a logical entity not to be confused with the physical
chassis. 8 groups = 1 full rack, 6 groups = rack, 4 groups = rack, 2 groups = rack. The rack
number is included in I/O addresses in the position represented with an "rr" in the format:
I:rrg/xx.
Talk Page
Slot
A location in a chassis for installing a module. The number of physical slots per group
determines the addressing mode.
Talk Page
Elements
Data files are made up of individual data blocks called "Elements" or "Structures". Each
element is composed of "words", and each word is composed of "bits". Elements are
comprised of from 1 to 56 words, depending on the instruction. Most instructions you will
encounter will have from one to three words to an element.
An example of an element level address is T4:0
T4:0 indicates the first timer (0) in the default timer file (T4). Each timer is comprised of
three (3) 16 bit words. When you say T4:0, you are referring to all three of these words as a
group.
Figure 30: Elements
Another example, illustrated on the right, is the address N7:15. This identifies element 15 in
the integer file N7. Since integer files have one word elements, the element number and
word number will match in this case as shown in Figure X and Figure Y.
Figure 31: Element Address
Talk Page
Words
Words are the next level of identification down from elements. Each "word" in the PLC is
comprised of 16 bits as shown in Figure 32.
When an instruction is addressed to the word level, it is looking at all 16 bits of a particular
word in an element. When an element is comprised of more than one word, the 0 word
contains status data in bit form, and the other words contain data which must be stored in
more than one bit.
A good example is a timer file. Timers elements are comprised of three words. The 0 word
contains status information which can be stored in individual bits. For example, the 17 bit in
the 0 word is the done bit, indicating that the timer has timed out.
The one and two words contain information which require a full word to contain. In the
timer, the one word contains the value of the preset (PRE) of the timer, and the two word
contains the information about the Accumulator (ACC). These words are addressed by their
symbols, PRE and ACC. When accessing an element to the word level, the period (.) is used
to delimit instead of the slash (/).
Figure 32: Word Address
Talk Page
Bit
The smallest unit of data in a PLC is the bit. Bits make up words, which in turn make up
elements. Many instructions must be specified down to the bit level. For example, if you
want to know the status of the Done bit on a timer, you must specify the address down to the
bit level. The address would be:
T4:0/DN
T4:0 is the element we are addressing. Since we are addressing a single bit, we put the "/"
sign as a bit delimiter, and then specify the bit. In this case the Done bit. Figure 33 shows the
element B3:63 and the bit 15. Note that in this case, the individual bits are identified by
numbers, not names (as in the done bit in the timer). This is true of bits in all files except
those having more than one word in an element.
Bytes
A group of bits forming a piece of data. Usually a subset of a word consisting of eight bits.
Talk Page
A rack is a logical term that defines 8 words in the processor input data table and 8
words in the processor output data table.
These words are numbered 0-7.
Each logical rack can store 128 bits of information in its input rack and 128 bits in
its output rack. (8 words per rack x 16 bits per word=128 bits of data storage)
In single slot addressing, each physical slot is addressed to one input word and also
to one output word. This makes it possible to put either an input module or an output
module in any slot.
The number of logical racks determines how many points a particular model of PLC
can address. This number is fixed for any particular processor and cannot be
changed.
Rack addressing is always in the format shown in Figure 34 below.
Addressing Examples
Each type of device has its own table in which to store data. In order to specify exactly
which piece of data is to be accessed, an addressing format is used which makes use of this
data structure.
In Figure 35, addresses for input and output addresses are shown. Reading from the left to
the right, the addresses tell the following:
Note that a colon separates the file identifier from the rest of the address. This is constant
for ALL addresses.
PLC Communications
Talk Page
Talk Page
PLC Networking
Talk Page
Device Net
Device Net is one of the most widely supported networks. It is an open standard, so
components from a variety of manufacturers can be used together in the same control
system. It is supported and promoted by the Open Device Net Vendors Association (ODVA).
This group includes members from all of the major controls manufacturers. The network is
noise-resistant and robust. One major change for the control engineer is that the PLC chassis
can be eliminated and the network can be directly connected to the sensors and actuators.
This reduces the total amount of system wiring by moving I/O points closer to the
application point. Two-way communication inputs and outputs allow diagnosis of network
problems from the main controller.
Device Net covers all seven layers of the Open Systems Interconnection (OSI) standard. The
protocol has a limited number of network addresses with very small data packets. This helps
limit network traffic and ensures responsiveness. The length of the network cables limits the
maximum speed of the network. The basic features include:
Talk Page
Control Net
Control Net is complimentary to Device Net. The standard is designed for communication
among controllers and it permits more complex messages than Device Net. It is not suitable
for communication with individual sensors and actuators, or with devices off the factory
floor. Control Net is a more complicated protocol method than Device Net. Control Net
features include:
The network is unique because it supports a real-time messaging scheme called Concurrent
Time Domain Multiple Access (CTDMA). The network has scheduled, high priority and
unscheduled, low priority updates. When collisions are detected, the system waits at least
2ms for unscheduled messages. However, scheduled messages will be passed sooner, during
a special time window.
Talk Page
Ethernet
Ethernet is the predominate networking format. The first version was released in 1980 by a
consortium of companies, and various versions of Ethernet frames were released in the
subsequent years. These include Version II and Novell Networking (IEEE 802.3). Most
modern Ethernet cards support different types of frames.
The Ethernet frame is shown in Figure 36. The first six bytes make up the destination
address for the message. If all of the bits in the bytes are set, then any computer that receives
the message will read it. The first three bytes of the address are specific to the card
manufacturer, and the remaining bytes specify the remote address. The address is common
for all versions of Ethernet. The source address specifies the message sender. The Ethernet
type identifies the frame as a Version II Ethernet packet if the value is greater than 05DChex.
Other Ethernet types use these two bytes to indicate the data length. The data can be from 46
to 1,500 bytes in length. The frame concludes with a checksum that is used to verify data is
correctly transmitted. When the end of the transmission is detected, the last four bytes are
used to verify the frame is correctly received.
Talk Page
Talk Page
PLC Terms
Talk Page
ASCII
Stands for "American Standard Code for Information Interchange." For example, when the
letter "A" is transmitted it is automatically coded as "65" by the sending equipment. The
receiving equipment translates the "65" back to the letter "A." Thus, different devices can
communicate with each other as long as both use ASCII code.
Talk Page
ASCII Module
This intelligent PLC module is used for connecting PLCs to other devices also capable of
communicating using ASCII code as a vehicle.
Talk Page
Bus Topology
This is a linear local area network (LAN) arrangement in which individual nodes are tapped
into a main communications cable at a single point and broadcast messages. These messages
travel in both directions on the bus from the point of connection until terminators at each end
of the bus dissipate them.
CPU
Stands for "central processing unit," which is that part of a computer, PLC, or other
intelligent device where arithmetic and logical operations are performed and instructions are
decoded and executed.
Talk Page
Daisy Chain
This is a description of the connection of individual devices in a PLC network, where each
device is connected to the next and communications signals pass from one unit to the next in
a sequential fashion.
Talk Page
Distributed Control
This is an automation concept in which portions of an automated system are controlled by
separate controllers, which are located in close proximity to their area of direct control
(control is decentralized and spread out over the system).
Talk Page
Host Computer
A computer used to transfer data to, or receive data from, a PLC in a PLC/computer network.
Talk Page
Intelligent Device
Any device equipped with its own CPU.
I/O
Abbreviation for Inputs and Outputs, which are modules that handle data to the PLC (inputs)
or signals from the PLC (outputs) to an external device.
Talk Page
Kbps
This stands for "kilobits (thousand) bits per second," a rate of measure for electronic data
transfer.
Talk Page
Mbps
Abbreviation for "million bits per second."
Talk Page
Node
This term is applied to any one of the positions or stations in a network. Each node
incorporates a device that can communicate with all other devices on the network.
Talk Page
Protocol
Manner in which data is arranged and coded for transmission on a network.
Talk Page
Ring Topology
This is a LAN arrangement in which each node is connected to two other nodes, resulting in
a continuous, closed, circular path or loop for messages to circulate, usually in one direction
(Figure X). Some ring topologies have a special "loop back" feature that allows them to
continue functioning even if the main cable is severed.
RS232
An IEEE standard for serial communications that describes specific wiring connections,
voltage levels, and other operating parameters for electronic data communications. There
also are several other RS standards defined.
Talk Page
Serial
Electronic data transfer scheme in which information is transmitted one bit at a time.
Talk Page
Serial Port
Communication access point, shown in Figure 38, on a device that is set up for serial
communications.
Star Topology
A LAN arrangement in which nodes are connected to one another through a central hub,
which can be active or passive (Figure 39). An active hub performs network duties such as
message routing and maintenance. A passive central hub simply passes the message along to
all the nodes connected to it.
Figure 39: Star Topology
Talk Page
Topology
This relates to a specific arrangement of nodes in a LAN in relation to one another. See
Figure 40 for the most commonly used types topologies.
Talk Page
Peer-to-Peer Configurations
Peer-to-peer networks, as shown in Figure 40, enhance reliability by decentralizing the
control functions without sacrificing coordinated control. In this type of network, numerous
PLCs are connected to one another in a daisy-chain fashion, and a common memory table is
duplicated in the memory of each. In this way, when any PLC writes data to this memory
area, the information is automatically transferred to all other PLCs in the network. They then
can use this information in their own operating programs.
With peer-to-peer networks, each PLC in the network is responsible for its own control site
and only needs to be programmed for its own area of responsibility. This aspect of the
network significantly reduces programming and debugging complexity; because all
communications occur transparently to the user, communications programming is reduced to
simple read-and-write statements.
In a peer-to-peer system, theres no master PLC. However, its possible to designate one of the
PLCs as a master for use as a type of group controller. This PLC then can be used to accept
input information from an operator input terminal, for example, sending all the necessary
parameters to other PLCs and coordinating the sequencing of various events.
Talk Page
Host Computer
PLCs also can be connected with computers or other intelligent devices. In fact, most PLCs,
from the small to the very large, can be directly connected to a computer or part of a multi-
drop host computer network via RS232C or RS422 ports. This combination of computer and
controller maximizes the capabilities of the PLC, for control and data acquisition, as well as
the computer, for data processing, documentation, and operator interface.
In a PLC/computer network, as shown in Fig. 4C, all communications are initiated by the
host computer, which is connected to all the PLCs in a daisy-chain fashion. This computer
individually addresses each of its networked PLCs and asks for specific information. The
addressed PLC then sends this information to the computer for storage and further analysis.
This cycle occurs hundreds of times per second.
Host computers also can aid in programming PLCs; powerful programming and
documentation software is available for program development. Programs then can be written
on the computer in relay ladder logic and downloaded into the PLC. In this way, you can
create, modify, debug, and monitor PLC programs via a computer terminal.
In addition to host computers, PLCs often must interface with other devices, such as operator
interface terminals for large security and building management systems. Although many
intelligent devices can communicate directly with PLCs via conventional RS232C ports and
serial ASCII code, some do not have the software ability to interface with individual PLC
models. Instead, they typically send and receive data in fixed formats. It is the PLC
programmers responsibility to provide the necessary software interface.
The easiest way to provide such an interface to fixed-format intelligent devices is to use an
ASCII/BASIC module on the PLC. This module is essentially a small computer that plugs
into the bus of the PLC. Equipped with RS232 ports and programmed in BASIC, the module
easily can handle ASCII communications with peripheral devices, data acquisition functions,
programming sequences, "number crunching," report and display generation, and other
requirements.
Talk Page
PLC Software
Talk Page
Talk Page
Logic Instructions
In order to use the PLC and make simple edits, it is necessary to understand some basic
commands. The commands are all entered in ladder logic format, and many of them are
based on nomenclature used in relay logic. There are timers, counters, coils, and contacts,
among other commands.
Talk Page
Relays
Talk Page
Examine If Closed XIC
This command functions as the input or storage bit (Figure 43). The command is addressed
to the bit level. If the corresponding memory bit is 1 (true), the instruction allows rung
continuity and outputs are energized (other factors may affect rung continuity). If the
corresponding memory bit is 0 (false), the instruction does not allow rung continuity (it
assumes its normally open state) and outputs on the rung are de-energized (other factors can
influence rung continuity).
Timers
Talk Page
The processor resets the accumulated value when the rung conditions are false, regardless of
whether or not the timer has timed out. When the rung conditions go True, the timer is on
and the Enable (EN) bit is set. When the timer reaches its preset count and times out, the
Done (DN) bit is set to true.
Talk Page
The processor resets the accumulated value when the rung conditions are true, regardless of
whether or not the timer has timed out.
Talk Page
When the processor resumes operation or the rung goes true, timing continues from the
retained accumulated value. By retaining its accumulated value, retentive timers measure the
cumulative period during which its rung is true. The RTO command is reset using the RES
command.
Talk Page
Counters
Talk Page
Arithmetic Commands
Subroutines
Subroutines are an important part of a PLC program. By using them, the programmer can
make a program much more logical and faster to execute.
Basically, a subroutine is a ladder that is only executed when it is called from the main
program. File number 2 is always the first ladder in a program and, as such, is the main
ladder. When the processor scans its ladder programs, it only scans ladder number 2 unless
ladder number 2 commands it to go to another subroutine. If no other ladders are called by
a JSR, then the ONLY ladder executed is file 2. When a JSR is encountered, the program
jumps out of that ladder (in this case ladder 2), and goes to the ladder called for in the
subroutine jump command. When the end of the file is reached, the program jumps back to
the file that has the JSR, in this case file 2, and continues executing. It also returns if a
Return (RET) command is encountered in the ladder.
In order to call a subroutine, a command, such as the one shown in Figure 57, is used. It is
called a JSR (Jump To Subroutine) command. Notice that in this case, the subroutine being
called is ladder file number U: 3. The "U" indicates the file is for a user. All ladder files are
for users.
TECHNOLOGY TRANSFER SERVICES PRIVACY POLICY TERMS OF USE ODESIE LICENSE HELP SITEMAP
Discrete I/O
The most common type of PLC I/O is discrete I/O. Sometimes discrete I/O is referred to as
digital I/O. The concept is simple, discrete I/O are signals that are either on or off. Some
examples of discrete input devices would be things like light switches, push-buttons and
proximity switches.
Examples of discrete output devices are lights, relays and motor starters. From our dishwasher
example in Part 1, some of the discrete inputs would the start button, the door switch and the
water level switch. Some of the discrete outputs would be the water fill valve, the water drain
valve and the heating element.
Some specific real-world examples of discrete inputs to a PLC would be open or closed circuit
breakers, running or stopped generators, a conveyor belt position sensor, or a water tank level
sensor. Some specific applications of discrete outputs would be closing or opening circuit
breakers, starting or stopping generators, opening or closing water valves, or turning on and off
alarm lights.
Again, this concept is really simple so I won’t belabor it. Just think of discrete I/O as always
either on or off.There’s no in between. Because of this, discrete signals are simple to process
for a computer or PLC. Other ways you can describe a discrete signal are to say it is either true
or false, 1 or 0, open or closed.
NOTE: Many people have questions about sinking versus sourcing discrete I/O. Unfortunately
this topic causes a lot of confusion. However, the concept is fairly simple. Basic electrical theory
says that DC current must flow from DC+ through a load to DC-. You have to have a complete
circuit for current to flow, right? Sinking and sourcing just has to with which side of the circuit
you are completing to detect your input or activate your output. The sinking device is the device
that’s connected to the DC- and the sourcing device is the device that’s connected to the DC+
side of the circuit. In the U.S., most PLC/PAC system are designed with sinking input modules
and sourcing output modules. This seems intuitive to me; sinking in, sourcing out. If you want to
read more about this topic, check out this graphical lesson here.
Analog I/O
The other common form of PLC I/O is analog I/O. Analog I/O refers to signals that have a range
of values much greater than just 1 or 0. For instance, an analog signal could produce a voltage
anywhere in the range of 0 – 10 VDC. The signal could be 2 V, 3 V, 8.5 V, etc. In the PLC
world, analog input modules usually measure analog inputs in one of the following forms: -10 to
10 VDC, 0 – 10 VDC, 1 to 5 VDC, 0 to 1 mA, or 4 – 20 mA. Basically the analog input module
either measures voltage or current from the input device. There are other types of analog
signals but these are definitely the most common. Similarly, the analog output module can
supply voltage or current signals in one of the ranges I mentioned previously.
An analog signal that most of us are familiar with is the light dimmer. As you adjust the dimmer
knob or slider, the light will get either dimmer or brighter depending on the direction of the
adjustment. Similarly an analog input into the PLC can increase or decrease in very small
increments and the PLC can produce an analog output that acts the same way.
Some real-world examples of analog inputs in a industrial environment would include engine
temperature sensors (RTDs, thermocouples, etc.), oil pressure sensors and weight scales. A
temperature sensor might report a temperature range of -50 to 150 degrees C corresponding
to 4-20 mA. A weight scale might report a range of 0 to 1000 lb corresponding to 0 to 10V. And
so on and so forth. Analog outputs can be used to control the power output on a generator, the
position of a needle on an analog pressure meter, and much more. A 0-3 VDC analog output
might be used to drive a generator from 0 – 2000 kW or a 4-20 mA analog output could be used
to drive temperature gauge from -20 to 200 degrees F. As you can see there are many
possibilities for applications of analog inputs and outputs!
The term PLC inputs refers to the devices and transducers which are entrusted with taking in
information about the physical world to the PLC. Keep in mind that it also refers to the PLC
hardware that connects to those devices, sensors and transducers. The PLC uses this input
information to make decisions based upon its program whether to energize and de-energize
the outputs controlled by the PLC. It very important to know about the different input
types discussed below.
The two types of PLC inputs are commonly referred to DI and AI (Digital and Analog). Analog
inputs are those like temperature and pressure which span over a range of values. Digital inputs
are simply two states, like those of a switch position indicating as On or Off.
Analog Inputs include temperature sensors/transmitters, current sensors, voltage sensors and
others that can convert a physical quantity to a electrical signal. These electrical signals used for
PLC input are typically 4-20ma or 1-5vdc.
Digital Inputs include push-buttons, limit switches, relay contacts, proximity switches, photo
sensors (On/Off), pressure switches and more. Digital inputs devices are available in both DC as
well as AC and some are voltage independent such as a switch contact.
A less common PLC input is the High Speed Counter (HSC). It is very similar to the digital input
type, but the hardware is capable of detecting rapid ON/OFF inputs. It is common that 10KHz or
10,000 on/off transitions per second are within the abilities of these input types. A photo optic
eye counting parts on an high speed assembly line would be example of when a HSC module
would be needed.
A HSC PLC input module may also have quadrature capable inputs. This would be used with an
rotary encoder to sense speed and direction of a motor for instance.
Depending on the particular PLC, the different inputs discussed above will require a separate
hardware module for each type. However mixed I/O (input/output) modules or cards are
available and some smaller integrated PLC models have some I/O included.
PLC Digital Inputs have a LED indicator on the module itself for setup and troubleshooting.
Simply, if the LED is ON the input is ON.
If the LED is ON and it should not be, then you need to look at your wiring, the input sensor
position or adjustment, or the possibility that the input device may be defective.The same
applies if the LED is OFF and you expect to to be ON, with the addition of checking input
protecting fuses.
PLC Analog Inputs generally don't have a display on the module (I know that Automation
Direct's newest top of the line PLC does!) to aid in troubleshooting. In this case you are going to
need your multimeter or other suitable measurement tool.
The PLC input module itself would generally would be considered the last step in
troubleshooting the problem.
Now that you understand the differences and uses of Digital and Analog inputs, be aware that
the PLC input hardware is part of a system made of several different components that
comprise a PLC. These components consist of the CPU or the central processing unit, the input
and output modules, memory and power supply.
PLC Outputs are the control circuits of the PLC and also refers to the devices controlled by the
PLC. Be aware when talking about PLCs the devices like motors and lights are also referred to
as PLC Outputs. Devices called actuators convert the electrical signal of the PLC to a physical
movement for instance a valve solenoid stoke or a motor contactor. With regards to the
variable output, the I/P (current to pneumatic) actuator, is an example.
There are two types, the ON/OFF output and the variable output. Digital output (DO) are for
the ON/OFF in your control scheme. Some examples are motors that need just be ON or OFF,
Lighting, solenoid valves, door locks. Analog output (AO) are for variable level or range of
output between OFF or stopped and ON or full speed as for an electric motor for instance.
Examples of analog outputs are a VFD (Variable Frequency Drive), a valve position actuator, and
a industrial variable power supply.
Now lets touch on the types of control circuits within the PLC Output Module. PLCs have four
typical output types. Three are DO and the other is AO.
For the Digital Outputs they are transistor, relay, and the triac. Relay dry contacts are the
quick choice since they are voltage independent and they are a easy interface to a customer's
system. Relays generally have a higher current rating than transistors, but have a mechanical
life span that has to be considered.
Transistor types are for DC applications. They are smaller and thus offer higher I/O count per
unit of circuit board real estate. You may also choose them for faster switching speeds and
longevity over relays.
Triacs are the solid state choice for AC and may require additional circuity called snubbers. Also
keep in mind to check the leakage current spec of the transistor or triac to make sure it will not
have the the possibility of turning on your output when it is OFF!
The PLC Analog Output is usually configurable for loop or internally powered and externally
powered, a voltage (typically 0 to 10VDC) or current (typically 4-20ma). In this case the PLC uses
a DAC (Digital to Analog Convertor) to drive the output. Other available Analog outputs supply
these typical ranges: -5 to 5 vdc, -10 to 10 vdc, or 0-5 vdc.
You must be aware of the inductive loads that are switched by the PLC outputs. These
include, motor starters, solenoids, and relays. If these devices are too large for direct
connection a interposing relay will be be required. These inductive loads will produce a sizable
reverse voltage, known as Back EMF. This Back EMF and corresponding current can damage the
PLC outputs and therefore has to be redirected.
For protection, devices like MOVs (metal Oxide Varistors) and diodes are installed as close to
the inductive device as possible to suppress or divert these voltages. Without surge suppression
relay contacts can pit from arching, generate electrical noise and may weld closed!
Manufacturers often provide guidelines for choosing and even supplying suppression devices,
but others may already have the suppression built-in and will not need a separate component.
As I mentioned above, inductive devices produce voltage spikes and snubbers are used for
thyristor (Triac ) PLC outputs. Snubbers for this use are RC circuits that reduce the voltage rate
of change as not to falsely trigger the triac .However, most industrial applications have low
enough voltage and current ratings they can be connected directly to the PLC outputs and some
have built-in protection anyway. Most industrial solenoids are energized by 24Vdc and
consume only about two to three hundred mA.
Finally, we must talk about sinking and source outputs. A source output will connect the
voltage to the load, its return or ground is always connected. A sinking output will connect the
load to its return or ground, it is always connected to its voltage source. Okay, do you see a
potential problem?! What happens in this case if the circuit is made complete by a short to
ground?! That is right! Unintentional turning on of the output! For this reason and the fact that
I just consider connecting a circuit to power to energize more logical, I prefer sourcing outputs.
Remember that outputs come in two main flavors, DO and AO. You have to consider what you
are going to control and to choose the right combination of PLC output module and supporting
components such as interposing relays. Oh, one more tip, create a spreadsheet of all your
inputs and outputs and all their requirements before you buy anything!