You are on page 1of 47

PLC hardware

components+ Numerical
system + Logic
Dr. Ihab Makki
Fall 2019-2020
Objectives


• Define the main components of the PLC
• Describe the basic circuitry and applications for
discrete and analog I/O modules, and interpret
typical I/O and CPU specifications
• Explain I/O addressing
• Describe the general classes and types of PLC
memory devices
• Identify the numerical systems used
• Fundamentals of logic

2
1
PLC hardware
components
The main components of the PLC, types, I/O
discrete and analog modules, memory types
Introduction
○ The main hardware components of a PLC are:
 I/O section
 CPU
 Memory
○ In this section we are going to present different
types of PLC components including the various
types of memory that are available, and we
describe the hardware of the input/output section
and the difference between the discrete and
analog types of modules.

4
I/O section

○ The input/output (I/O) section of a PLC is the section to


which all field devices are connected and provides the
interface between them and the CPU.
○ Input interface modules accept signals from the machine or
process devices and convert them into signals that can be
used by the controller.
○ Output interface modules convert controller signals into
external signals used to control the machine or process.
○ The input interface allows status information regarding
processes to be communicated to the CPU, and thus allows
the CPU to communicate operating signals through the
output interface to the process devices under its control.
5
I/O section
○ One benefit of a PLC system is the ability to
locate the I/O modules near the field devices in
order to minimize the amount of wiring required.
○ To communicate with the processor, the remote
rack uses a special communications network.
○ Each remote rack requires a unique station
number to distinguish one from another. The
remote racks are linked to the local rack through a
communications module.
○ To keep track of all information related to the
status of the inputs and outputs, PLC uses a
system called addressing.
6
I/O section
○ Different manufacturers use different addressing schemes.
○ Examples of addressing schemes include rack/slot-based, used in Allen-Bradley SLC 500
controllers, tag-based used in Allen-Bradley ControlLogix controllers.
○ In general, rack/slot-based addressing elements include:
Type—The type determines if an input or output is being addressed.
Slot—The slot number is the physical location of the I/O module. This may be a
combination of the rack number and the slot number when using expansion racks.
Word and Slot—The word and slot are used to identify the actual terminal connection in a
particular I/O module.

7
I/O section- rack/slot addressing
○ Every input and output device connected to a discrete I/O module is
addressed to a specific bit in the PLC’s memory.
○ Analog I/O modules use a word addressing format, which allows the
entire words to be addressed.

Not used in
case of word
(analog I/O)

8
I/O section- rack/slot addressing
○ a)Bit level and b)word level addressing as it applies to an SLC
500 controller.

9
I/O section- tag based addressing
○ Memory locations are defined by using base
and alias tags. A base tag defines a memory
location where data are stored. An alias tag
is used to create an alternate name (alias) for
a tag.
○ A base tag is identified ad following:
<Location: Slot.Type.member>
Ex:

10
I/O section- rack/slot addressing vs tag based
addressing

11
Discrete I/O modules

○ This type of interface connects field input devices of


the ON/OFF nature such as selector switches,
pushbuttons, and limit switches.
○ Likewise, output control is limited to devices such
as lights, relays, solenoids, and motor starters that
require simple ON/OFF switching.
○ The modules themselves receive their voltage and
current for proper operation from the backplane of
the rack enclosure into which they are inserted

12
Discrete I/O modules
○ Each discrete I/O module is powered by some fieldsupplied voltage
source. Since these voltages can be of different magnitude or type,
I/O modules are available at various AC and DC voltage ratings.

13
Discrete I/O modules-input module circuitry
○ Optical isolators are always used in order to have an electrical
isolation between field device and the PLC backplane.
For input module:

14
Discrete I/O modules-input module circuitry

15
Discrete I/O modules-input module circuitry

○ Discrete input modules perform four tasks in the PLC control system. They:

1. Sense when a signal is received from a field device.


2. Convert the input signal to the correct voltage level for the particular
PLC.
3. Isolate the PLC from fluctuations in the input signal’s voltage or
current.
4. Send a signal to the processor indicating which sensor originated the
signal.

16
Discrete I/O modules-output module circuitry
○ Like the input module, it is composed of two basic sections: the power section
and the logic section, coupled by an isolation circuit.
○ The output interface can be thought of as an electronic switch that turns the
output load device on and off. Logic circuits determine the output status. An
output LED indicates the status of the output signal.

17
Discrete I/O modules-output module circuitry

18
Discrete I/O modules-output module circuitry
○ Usually, the output current is limited by the TRIAC capability. In order to turn on
large load like motors, a standard control relay is connected to the output module.

19
Discrete I/O modules-output module circuitry

Depending on the output type, output modules can be purchased with transistor, triac,
or relay output.
○ Triac outputs can be used only for control of AC devices.
○ transistor outputs can be used only for control of DC devices.
○ The discrete relay contact output module uses electromechanical as the switching
element. These relay outputs can be used with AC or DC devices, but they
have a much slower switching time compared to solid-state outputs.

20
Discrete I/O modules-sourcing/sinking

○ Certain DC I/O modules specify whether the module is designed for


interfacing with current-source or currentsink devices. If the module is a
current-sourcing module, then the input or output device must be a current-
sinking device and vice versa.

21
Analog I/O modules
○ Discrete inputs can have 2 states: On & OFF
○ Analog devices are used to represent physical quantities that can have an
infinite number of values. Typical analog inputs and outputs vary from 0 to 20
mA, 4 to 20 mA, or 0 to 10 V
○ The analog input interface module contains the circuitry necessary to accept
an analog voltage or current signal from the level transmitter field device. This
input is converted from an analog to a digital value for use by the processor.
○ The circuitry of the analog output module accepts the digital value from the
processor and converts it back to an analog signal that drives the field
tank level meter.

22
Analog I/O modules

○ All processors are digital. So when using an analog input module, the
received signal is amplified then converted to digital by means of an
Analog to digital converter (ADC) before being treated by the CPU.
○ Also digital output of the CPU is converted into an analog signal by
means of a Digital to analog converter (DAC) before it is supplied to
the field device.
○ Each input channel has a specific resolution which is the smallest
change in input signal value that can be sensed. It is based on the
number of bits used in the digital representation.

23
Analog I/O modules

○ Current input signals, which are not as sensitive to noise as voltage signals (that
are affected by the wire length), are typically not distance limited. Current
sensing input modules typically accept analog data over the range of 4 to 20mA.
○ A transducer converts a field device’s variable (e.g., pressure, temperature etc.)
into a very low-level electric signal (current or voltage) that can be amplified by a
transmitter and then input into the analog module.

24
Special I/O modules

○ In this part, we are going to mention some special type I/O


modules that can be added to the PLC according to the
application.
○ HIGH-SPEED COUNTER MODULE: is used to provide an
interface for applications requiring counter speeds that surpass
the capability of the PLC ladder program.
○ THUMBWHEEL MODULE: allows the use of thumbwheel
switches for feeding information to the PLC to be used in the
control program.

25
Special I/O modules

○ TTL MODULE: This module allows devices that


produce TTL-level signals to communicate with the
PLC’s processor.
○ ENCODER-COUNTER MODULE: allows the user to
read the signal from an encoder on a real-time basis.
○ STEPPER-MOTOR MODULE
○ PID MODULE

26
Special I/O modules

○ BCD-OUTPUT MODULE: enables a PLC to


operate devices that require BCD-coded signals
such as seven-segment displays
○ MOTION AND POSITION CONTROL
MODULE in applications involving accurate high-
speed machining and packaging operations.
○ COMMUNICATION MODULES used to establish
point-to-point connections with other intelligent
devices for the exchange of data.

27
I/O Specifications
○ I/O specifications provide information about how an interface is to be
connected to field devices in order to work properly and avoid damage
of both PLC and field device.
○ Typical discrete I/O module specifications are:
 Nominal Input Voltage: discrete input module voltage value
specifies the magnitude (e.g., 5, 24, 230 V) and type (AC or DC)
 Input Threshold Voltages that specifies two values: a minimum
ON-state voltage and a maximum OFF-state voltage which is the
voltage at which logic 0 is recognized as absolutely OFF.
 Nominal Current Per Input specifies the minimum input current
that the discrete input devices must be capable of driving to
operate the input circuit.
28
I/O Specifications- discrete I/O module
specifications
 Ambient Temperature Rating
 Input On/Off Delay also known as
response time  Short circuit current
 Output Voltage This AC or DC value  Leakage current
specifies the magnitude (e.g., 5 V,
115 V, 230 V) and type (AC or DC) of  Nb of points/module
user-supplied voltage at which a  Electrical isolation
discrete output module is designed to  Backplane current draw: This value
operate. indicates the amount of current the
 Output current module requires from the backplane.
 Inrush current =surge current during
starting
29
I/O Specifications- Analog I/O module
specifications
○ Typical analog I/O module specifications are:
 Channels Per Module
 Input Current/Voltage Range(s)
 Output Current/Voltage Range(s)
 Input protection
 Resolution
 Input impedance and capacitance
 Common mode rejection ratio: is the ability of differential inputs to
prevent noise

30
Central Processing Unit (CPU)

○ The CPU is the brain of the PLC. It is typically


supplied by a 5VDC by the power supply.
○ The processor module is divided in two sections:
 CPU section where the program is executed
 Memory section that electronically stores the
PLC program.
o The CPU executes the operating system, manages
memory, monitors inputs, evaluates the user logic
(ladder program), and turns on the appropriate
outputs.

31
Central Processing Unit (CPU)

The CPU may operate in the modes:


○ RUN Mode
• Executes the ladder program and energizes output devices
• Prevents you from performing online program editing in this position
• Prevents you from using a programmer/operator interface device to change the
processor mode
○ Program mode
• Prevents the processor from scanning or executing the ladder program, and the
controller outputs are de-energized
• Allows you to perform program entry and editing
• Prevents you from using a programmer/operator interface device to change the
processor mode
32
Central Processing Unit (CPU)

○ Remote mode
• Places the processor in the Remote mode: either
the REMote Run, REMote Program, or REMote Test
mode
• Allows you to change the processor mode from a
programmer/operator interface device
• Allows you to perform online program editing
○ The processor module also contains circuitry to
communicate with the programming device.
○ In addition to their control functions, PLCs can be
networked to do supervisory control and data
acquisition (SCADA).
33
Memory design
○ Memory is the element that stores information, programs, and data in a PLC.
○ The user memory of a PLC includes space for the user program as well as
addressable memory locations for storage of data.
○ The program is stored in the memory as 1s and 0s, which are typically
assembled in the form of 16-bit words.

34
Memory types
○ Memory can be placed into two general categories: volatile and nonvolatile.
○ Volatile memory will lose its stored information if all operating power is lost or
removed.
○ Nonvolatile memory has the ability to retain stored information when power is
removed accidentally or intentionally.
○ PLC allows the user to store the program in a programmable memory. This
memory is made nonvolatile so that if power is lost, the PLC holds
its programming.
○ Read Only Memory (ROM) is normally used to store the programs and data
that define the capabilities of the PLC. ROM memory is nonvolatile. ROM is
used by the PLC for the operating system.

35
Memory types
○ Random Access Memory (RAM) is designed so that information can
be written into or read from the memory. RAM is used as a temporary
storage area of data that may need to be quickly changed. RAM is
volatile.
○ Erasable Programmable Read-Only Memory (EPROM) provides
some level of security against unauthorized or unwanted changes in a
program. EPROMs are designed so that data stored in them can be
read, but not easily altered without special equipment.
○ Electrically erasable programmable read-only memory (EEPROM)
is a nonvolatile memory and can be electrically overwritten with new
data instead of being erased with ultraviolet light. Typically, an
EEPROM memory module is used to store, back up, or transfer PLC
programs.
○ Flash EEPROMs are similar to EEPROMs but they are extremely fast
36
at saving and retrieving files.
Programming Terminal Devices
○ A programming terminal device is needed to enter, modify, and
troubleshoot the PLC program.
○ We can use a handheld device or a Laptop with corresponding software

37
Human machines interface (HMIs)
Human machine interfaces give the ability to the operator and to
management to view the operation in real time. you can
configure display screens to:
 Replace hardwired pushbuttons and pilot lights with realistic-
looking icons.
 Show operations in graphic format for easier viewing.
 Allow the operator to change timer and counter presets by
touching the numeric keypad graphic on the touch screen.
 Show alarms, complete with time of occurrence and location.
 Display variables as they change over time.

38
2
Number systems
and codes
Decimal, binary, hecadecimal…
Decimal system
○ It is the most common numeric system we use. It has a base of 10.
○ The base defines the total number of digits used by the system (0 to 9)
Binary system
○ The binary system uses the number 2 as the base. The only allowable
digits are 0 and 1.
○ With digital circuits it is easy to distinguish between two voltage levels
(i.e., +5 V and 0 V), which can be related to the binary digits 1 and 0.
○ The decimal equivalent of a binary number can be determined in a
manner similar to that used for a decimal number. The weighted values
of the positions are 1, 2, 4, 8, 16, 32, 64, and so on.
The binary number 10101101 is converted to its decimal equivalent:
173

41
Binary system

○ To convert a decimal number to its binary equivalent, we must perform a


series of divisions by 2. After each division, we register the remainder
sequentially from the LSB to the MSB.
○ Example: convert 47 into binary

○ Each word is capable of storing data in the form of binary digits, or bits. The
number of bits that a word can store depends on the type of PLC system
used. Sixteen-bit and 32-bit words are the most common.

42
Binary system
○ Negative numbers can either be represented using a sign bit or using the 2’s
complement

43
Octal system, Hexadecimal and BCD

○ Octal system is the system of base 8 (0 to 7)


○ Hexadecimal system is of base 16: 0 to 9 & A to F
○ Binary coded decimal (BCD) is the representation of each decimal
digit (0 to 9) into 4 binary bits.
○ Example: complete the following table

Decimal Octal Hexadecimal Binary BCD


0
….
17

44
3
Programmed
logic
Hardwired vs programmed logic.
How to convert logical functions into circuits
Hardwired Logic versus Programmed Logic
○ Hardwired logic can be implemented using relays ladder
schematics.
○ PLC contact symbolism is a simple way of expressing the control
logic in terms of symbols. These symbols are basically the same
as those used for representing hardwired relay control circuits.

Ex: AND, OR, NOT, NAND,NOR, XOR (on papers)

46
Questions?

47

You might also like