0% found this document useful (0 votes)
166 views

Chapter 4 Input Output Devices

The document discusses input/output devices for programmable logic controllers (PLCs). It describes electromagnetic control relays and contactors, which are used to control high-power loads that exceed a PLC's capabilities. Motor starters are introduced as contactors with overload relays attached to protect motors. Examples of manually operated switches for PLC systems are given. Finally, an example problem of writing a PLC ladder logic program to control a motor's direction is presented and solved.

Uploaded by

M A
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
166 views

Chapter 4 Input Output Devices

The document discusses input/output devices for programmable logic controllers (PLCs). It describes electromagnetic control relays and contactors, which are used to control high-power loads that exceed a PLC's capabilities. Motor starters are introduced as contactors with overload relays attached to protect motors. Examples of manually operated switches for PLC systems are given. Finally, an example problem of writing a PLC ladder logic program to control a motor's direction is presented and solved.

Uploaded by

M A
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 67

Department Of Mechatronics Engineering

Faculty Of Engineering And Information Technology

An-Najah National University

Programmable
Logic Controllers
(10651572)

Dr. Mohammad Abuabiah


[email protected]

Office: 11-4-130 1
Chapter 4*

Input/Output
Devices

* Chapter 6 in the book (Petruzella 2016) 2


Chapter Objectives 3
Dr. Mohammad Abuabiah

• Identify the functions of electromagnetic control relays, contactors,


and motor starters.
• Identify switches commonly found in PLC installations.
• Explain the operation of sensors commonly found in PLC installations.
• Explain the operation of output control devices commonly found in PLC
installations.
An-Najah National University

• Compare sequential and combination control processes.


• Convert fundamental relay ladder diagrams to PLC ladder logic
programs.
• Write PLC programs directly from a narrative description.
4.1 Electromagnetic Control Relays 4

• The PLC’s original purpose was the replacement of electromagnetic


Dr. Mohammad Abuabiah

relays with a solid-state switching system that could be programmed.


• An electrical relay is a magnetic switch. It uses electromagnetism to
switch contacts. A relay will usually have only one coil but may have
any number of different contacts.
An-Najah National University
4.1 Electromagnetic Control Relays 5

• The symbol used to represent a control relay is shown in Figure below.


Dr. Mohammad Abuabiah

The contacts are represented by a pair of short parallel lines and are
identified with the coil by means of the letters. The letter M frequently
indicates a motor starter, while CR is used for control relays.
An-Najah National University
4.1 Electromagnetic Control Relays 6

• A typical control relay used to control two


Dr. Mohammad Abuabiah

pilot lights is shown in the Figure. The


operation of the circuit can be summarized
as follows:
– With the switch open, coil CR is de-energized.
– The circuit to the green pilot light is completed
through the normally closed contact, so this light
will be on.
– At the same time, the circuit to the red pilot light
is opened through the normally open contact,
An-Najah National University

so this light will be off.


– With the switch closed, the coil is energized.
– The normally open contact closes to switch the
red pilot light on.
– At the same time, the normally closed contact
opens to switch the green pilot light off.
4.2 Contactors 7
Dr. Mohammad Abuabiah

• A contactor is a special type of


relay designed to handle heavy
power loads that are beyond
the capability of control relays
(5-10 Amp, 120 VAC).
• Programmable controllers
normally have an output
An-Najah National University

capacity capable of operating


a contactor coil, but not that
needed to operate heavy power
loads directly.
8
4.2 Contactors
Dr. Mohammad Abuabiah An-Najah National University
9
4.2 Contactors
Dr. Mohammad Abuabiah An-Najah National University
4.2 Contactors 10
Dr. Mohammad Abuabiah

• Another example, a PLC used in


conjunction with a contactor to
switch power on and off to a pump.
The output module is connected in
series with the coil to form a low-
current switching circuit.
• The contacts of the contactor are
An-Najah National University

connected in series with the pump


motor to form a high-current
switching circuit.
4.2 Contactors 11

Contactor Vs Relay:
Dr. Mohammad Abuabiah
An-Najah National University

• High Current • Low Current


• High Voltage • Low Voltage
12
4.2 Contactors
Safety Feedback:
Dr. Mohammad Abuabiah An-Najah National University
13
4.2 Contactors
Safety Feedback:
Dr. Mohammad Abuabiah An-Najah National University
4.3 Motor Starters 14
Dr. Mohammad Abuabiah

• A motor starter is designed to provide power


to motors. The motor starter is made up of a
contactor with an overload relay (NC)
attached physically and electrically to it:
– Overload relays are designed to meet the special
protective needs of motor control circuits.
– They allow harmless temporary overloads that
occur when a motor starts.
An-Najah National University

– The overload relay will trip and disconnect power


to the motor if an overload condition persists.
– Overload relays can be reset after the overload
condition has been corrected.
4.3 Motor Starters 15
Dr. Mohammad Abuabiah

• An overload (OL) relay is


provided to protect the motor
against current overloads. The
normally closed relay contact
OL opens automatically when
an overload current is sensed
to de-energize the M coil and
stop the motor.
An-Najah National University
Example 4.1 CW and CCW Rotations PLC Program
16

• Write a PLC ladder program that if


Dr. Mohammad Abuabiah

you pressed the push button (PB1 –


I0.0) the motor (MOTOR - Q4.0)
should run in a clockwise (CW –
Q4.0) direction and if pressed push
button (PB2 – I0.1) it runs in counter-
clockwise (CCW – Q4.1) direction
and so on until the NC stop push
button (STOP – I0.2) is pressed.
An-Najah National University

• Write the PLC program using SIMATIC


S7-5.7 software and design an HMI
for this example using WinCC Flexible
2008, as shown in the Figure.
Example 4.1 CW and CCW Rotations PLC Program
17

• Solution: The ladder program is shown below:


Dr. Mohammad Abuabiah
An-Najah National University
4.4 Manually Operated Switches 18

• Manually operated switches are controlled by hand. These include


Dr. Mohammad Abuabiah

toggle switches, pushbutton switches, knife switches, and selector


switches. Pushbutton switches are the most common form of manual
control, which include three main types:
1) Normally open (NO) pushbutton, which makes a circuit when it is pressed and
returns to its open position when the button is released.
2) Normally closed (NC) pushbutton, which opens the circuit when it is pressed and
returns to the closed position when the button is released.
An-Najah National University

• National Electric Manufacturers Association (NEMA)


• International Electrotechnical Commission (IEC)
4.4 Manually Operated Switches 19

3) Break-before-make pushbutton in which the top section contacts are NC and


Dr. Mohammad Abuabiah

the bottom section contact are NO. When the button is pressed, the top contacts
open before the bottom contacts are closed.
An-Najah National University
Example 4.2 Momentary and Latched Modes 20

• Write a PLC ladder program to do the


Dr. Mohammad Abuabiah

following:
1) When the first start switch (Latched –
I0.0) is pressed, the motor (MOTOR –
Q4.0) will run continuously.
2) When the second start switch
(Momentary – I0.1) is pressed, the
motor will run momentarily.
An-Najah National University

3) When the NC stop switch (STOP – I0.2),


the motor will stop.
Example 4.2 Momentary and Latched Modes 21

• SOLUTION:
Dr. Mohammad Abuabiah
An-Najah National University
4.4 Manually Operated Switches 22

• The selector switch is another common manually operated switch. The


Dr. Mohammad Abuabiah

main difference between a pushbutton and selector switch is the


operator mechanism. A selector switch operator is rotated (instead of
pushed) to open and close contacts of the attached contact block.
An-Najah National University
4.4 Manually Operated Switches 23

• Dual in-line package (DIP) switches are small switch assemblies


Dr. Mohammad Abuabiah

designed for mounting on printed circuit board modules.. The individual


switches may be of the toggle, rocker, or slide kind. DIP switches use
binary (on/off) settings to set the parameters for a particular module.
An-Najah National University
4.5 Mechanically Operated Switches 24

• A mechanically operated switch is controlled automatically by factors


Dr. Mohammad Abuabiah

such as pressure, position, or temperature.


• The limit switch, shown in Figure below, is a very common industrial
control device. Limit switches are designed to operate only when a
predetermined limit is reached, and they are usually actuated by
contact with an object such as a cam.
An-Najah National University
4.5 Mechanically Operated Switches 25

• The temperature switch, or thermostat, is used to sense temperature


Dr. Mohammad Abuabiah

changes. Although there are many types available, they are all
actuated by some specific environmental temperature change.
An-Najah National University
4.5 Mechanically Operated Switches 26

• Pressure switches, are used to control


Dr. Mohammad Abuabiah

the pressure of liquids and gases.


Although many different types are
available, they are all basically
designed to actuate (open or close)
their contacts when a specified
pressure is reached.
• Pressure switches can be
An-Najah National University

pneumatically (air) or hydraulically


(liquid) operated switches. Generally,
bellows or a diaphragm presses up
against a small microswitch and
causes it to open or close.
4.5 Mechanically Operated Switches 27

• Level switches are used to sense liquid levels in vessels and provide
Dr. Mohammad Abuabiah

automatic control for motors that transfer liquids from sumps or into
tanks. They are also used to open or close piping solenoid valves to
control fluids. The float switch is a type of level switch. This switch is
weighted so that as the liquid rises the switch floats and turns upside
down, actuating its internal contacts.
An-Najah National University
4.6 Sensors 28

• Sensors are used for detecting, and often measuring, the magnitude of
Dr. Mohammad Abuabiah

something. They convert mechanical, magnetic, thermal, optical, and


chemical variations into electric voltages and currents.
• Sensors are usually categorized by what they measure, and they play
an important role in modern manufacturing process control.
An-Najah National University
4.6 Sensors 29

• Proximity sensors or switches, are pilot devices that detect the


Dr. Mohammad Abuabiah

presence of an object (usually called the target) without physical


contact. Proximity sensors are used when:
– The object being detected is too small, lightweight, or soft to operate a
mechanical switch.
– Rapid response and high switching rates are required, as in counting or ejection
control applications.
– An object has to be sensed through nonmetallic barriers such as glass, plastic,
and paper cartons.
An-Najah National University
4.6 Sensors 30

• Most sensor applications operate either at 24V DC or at 120V AC. The method of
Dr. Mohammad Abuabiah

connecting a proximity sensor varies with the type of sensor and its application.

• In order to connect a “two-wire” discrete sensor device to the PLC, we will need to
identify whether the device is “polarized” or “non-polarized”. For a “polarized”
device, the two wires will be labelled: one wire is labelled “positive”, and one wire is
labelled “negative”.
An-Najah National University
4.6 Sensors 31

• In practice, the PLC input card channel connections, terminals 2–9 and
Dr. Mohammad Abuabiah

12–19, will be brought out to a terminal block. These marshalling


connections, as they are called, allow the field wires to be more easily
terminated in the control panel. The eight marshalling terminals A-H, are
wired to Channels 0–7, and are the negative terminals in discrete circuits.
An-Najah National University
4.6 Sensors 32

• Allen-Bradley and Siemens delineates between the various digital DC


Dr. Mohammad Abuabiah

modules by sorting them into two categories: Sinking and Sourcing.


• These terms are used to describe a current signal flow relationship between
field input and output devices. If a device provides current when it is ON, it is
said to be sourcing current. Conversely, if a device receives current when it is
ON, it is said to be sinking current.
An-Najah National University

PNP NPN
4.6 Sensors 33

• Figure below shows a typical three-wire DC sensor connection. The


Dr. Mohammad Abuabiah

three-wire DC proximity sensor has the positive and negative line leads
connected directly to it.
An-Najah National University
4.6 Sensors 34
Dr. Mohammad Abuabiah

• For many PLC manufacturers,


connection of NPN sensors
requires a specific model
number for the digital input
card.
• Because NPN sensors are
“sinking”, they require a
An-Najah National University

“sourcing” type PLC input


card.
4.6 Sensors 35

• A PNP sensor is referred to as


Dr. Mohammad Abuabiah

a “sourcing” switch. This


means that the “load”, which
is the PLC input, is wired as
shown in the diagram.
• Notice that the blue
“common” wire is connected
to the PLC module’s common
An-Najah National University

terminal. In other words,


when the switch changes
state, it “sources” or supplies
+24 Volts DC to the PLC input.
36
4.6 Sensors
Dr. Mohammad Abuabiah An-Najah National University
4.6 Sensors 37

• Proximity sensors operate on different principles, depending on the


Dr. Mohammad Abuabiah

type of matter being detected.


• When an application calls for noncontact metallic target sensing, an
inductive-type proximity sensor is used.
An-Najah National University
4.6 Sensors 38

• Capacitive proximity sensors are similar to inductive proximity sensors.


Dr. Mohammad Abuabiah

The main differences between the two types are that capacitive
proximity sensors produce an electrostatic field instead of an
electromagnetic field and are actuated by both conductive and
nonconductive materials.
An-Najah National University
4.6 Sensors 39

• Figure below shows the proximity sensor


Dr. Mohammad Abuabiah

sensing range. Hysteresis is the distance


between the operating point when the target
approaches the proximity sensor face and
the release point when the target is moving
away from the sensor face. Most proximity
sensors come equipped with an LED status
indicator to verify the output switching action.
An-Najah National University

• The object must be closer to turn the sensor


on rather than to turn it off. If the target is
moving toward the sensor, it will have to
move to a closer point. Once the sensor turns
on, it will remain on until the target moves to
the release point.
4.6 Sensors 40

• Capacitive proximity sensors will sense metal objects as well as


Dr. Mohammad Abuabiah

nonmetallic materials such as paper, glass, liquids, and cloth. The


larger the dielectric constant of a target, the easier it is for the
capacitive sensor to detect. This makes possible the detection of
materials inside nonmetallic containers.
• In this example, the liquid has a much higher dielectric constant than
the cardboard container, which gives the sensor the ability to see
through the container and detect the liquid.
An-Najah National University
4.6 Sensors 41

• A magnetic reed switch is composed of two flat contact tabs that are
Dr. Mohammad Abuabiah

hermetically sealed (airtight) in a glass tube filled with protective gas.


• One practical application for a magnetic reed switch is its use in a float
switch. The reed switch opens or closes a circuit as the level of a liquid
rises or falls.
An-Najah National University
4.6 Sensors 42

• The photovoltaic cell and the photoconductive cell are two examples
Dr. Mohammad Abuabiah

of light sensors. The photovoltaic or solar cell reacts to light by


converting the light energy directly into electric energy. The
photoconductive cell (also called a photoresistive cell) reacts to light
by change in the resistance of the cell.
An-Najah National University
4.6 Sensors 43

• A photoelectric sensor is an optical control device that operates by


Dr. Mohammad Abuabiah

detecting a visible or invisible beam of light and responding to a


change in the received light intensity. Photoelectric sensors are
composed of two basic components: a transmitter (light source) and a
receiver (sensor).
An-Najah National University
4.6 Sensors 44

• The scan technique refers to the method used by photoelectric sensors


Dr. Mohammad Abuabiah

to detect an object. The through-beam scan technique (also called


direct scan) places the transmitter and receiver in direct line with each
other.
An-Najah National University
4.6 Sensors 45

• In a retroreflective scan, the transmitter and receiver are housed in the


Dr. Mohammad Abuabiah

same enclosure. This arrangement requires the use of a separate


reflector or reflective tape mounted across from the sensor to return
light back to the receiver.
An-Najah National University
4.6 Sensors 46

• Fiber optic sensors use a flexible cable containing tiny fibers that
Dr. Mohammad Abuabiah

channel light from emitter to receiver. Fiber optic sensor systems are
completely immune to all forms of electrical interference.
An-Najah National University
4.6 Sensors 47

• Bar code scanners are the eyes of the data collection system. A light
Dr. Mohammad Abuabiah

source within the scanner illuminates the bar code symbol; those bars
absorb light, and spaces reflect light.
An-Najah National University
4.6 Sensors 48
Dr. Mohammad Abuabiah

• An ultrasonic sensor operates by


sending high-frequency sound waves
toward the target and measuring the
time it takes for the pulses to bounce
back.
• The time taken for this echo to return
to the sensor is directly proportional to
An-Najah National University

the distance or height of the object


because sound has a constant
velocity.
4.6 Sensors 49

• A strain gauge converts a mechanical


Dr. Mohammad Abuabiah

strain into an electric signal. Strain


gauges are based on the principle
that the resistance of a conductor
varies with length and cross-sectional
area. The force applied to the gauge
causes the gauge to bend.
• This bending action also distorts the
An-Najah National University

physical size of the gauge, which in


turn changes its resistance. This
resistance change is fed to a bridge
circuit that detects small changes in
the gauge’s resistance.
4.6 Sensors 50

• The thermocouple is the most widely used temperature sensor.


Dr. Mohammad Abuabiah

Thermocouples operate on the principle that when two dissimilar


metals are joined, a predictable DC voltage will be generated that
relates to the difference in temperature between the hot junction and
the cold junction.
An-Najah National University
4.6 Sensors 51

• Resistance temperature detectors (RTDs) are wire wound temperature-


Dr. Mohammad Abuabiah

sensing devices that operate on the principle of the positive


temperature coefficient (PTC) of metals (most precise temperature
sensors). That means the electrical resistance of metals is directly
proportional to temperature. The hotter they become, the larger or
higher the value of their electrical resistance.
An-Najah National University
4.6 Sensors 52

• Turbine-type flowmeters are a popular means of measurement and


Dr. Mohammad Abuabiah

control of liquid products in industrial, chemical, and petroleum


operations. Turbine flowmeters, like windmills, utilize their angular
velocity (rotation speed) to indicate the flow velocity.
An-Najah National University
4.6 Sensors 53

• Tachometer generators provide a


Dr. Mohammad Abuabiah

convenient means of converting


rotational speed into an analog
voltage signal that can be used
for motor speed indication and
control applications.
• A tachometer generator is a small
AC or DC generator that develops
An-Najah National University

an output voltage (proportional to


its rpm) whose phase or polarity
depends on the rotor’s direction
of rotation.
4.6 Sensors 54

• An encoder is used to convert linear


Dr. Mohammad Abuabiah

or rotary motion into a binary digital


signal. Encoders are used in
applications where positions have to
be precisely determined. The optical
encoder uses a light source shining
on an optical disk with lines or slots
that interrupt the beam of light to an
optical sensor. An electronic circuit
An-Najah National University

counts the interruptions of the beam


and generates the encoder’s digital
output pulses.
Example 4.3 Continuous Filling Operation 55

• Figure shows the sketch of a continuous filling operation.


Dr. Mohammad Abuabiah

This process requires that boxes moving on a conveyor be


automatically positioned and filled. Start the conveyor
when the start button is momentarily pressed.
1) Stop the conveyor when the stop button is momentarily
pressed (NC).
2) Energize the run status light when the process is operating.
3) Energize the standby status light when the process is
stopped.
4) Stop the conveyor when the right edge of the box is first
An-Najah National University

sensed by the photosensor.


5) With the box in position and the conveyor stopped, open
the solenoid valve and allow the box to fill. Filling should
stop when the level sensor goes true.
6) Energize the full light when the box is full. The full light
should remain energized until the box is moved clear of
the photosensor.
Example 4.3 Continuous Filling Operation 56

• SOLUTION:
Dr. Mohammad Abuabiah
An-Najah National University
4.7 Output Control Devices 57

• A variety of output control devices can be


Dr. Mohammad Abuabiah

operated by the PLC output to control


traditional industrial processes.
• These devices include pilot lights, control
relays, motor starters, alarms, heaters,
solenoids, solenoid valves, small motors, and
horns.
• Similar electrical symbols are used to represent
An-Najah National University

these devices both on relay schematics and


PLC output connection diagrams.
4.7 Output Control Devices 58

• An actuator, in the electrical sense, is any device that converts an


Dr. Mohammad Abuabiah

electrical signal into mechanical movement. An electromechanical


solenoid is an actuator that uses electrical energy to magnetically
cause mechanical control action. A solenoid consists of a coil, frame,
and plunger (or armature, as it is sometimes called).
An-Najah National University
4.7 Output Control Devices 59

• Solenoid valves are


Dr. Mohammad Abuabiah

electromechanical devices that


work by passing an electrical
current through a solenoid, thereby
changing the state of the valve.
Normally, there is a mechanical
element, which is often a spring, that
holds the valve in its default position.
An-Najah National University

• A solenoid valve is a combination of


a solenoid coil operator and valve,
which controls the flow of liquids,
gases, steam, and other media.
4.7 Output Control Devices 60

• Stepper motors operate differently than


Dr. Mohammad Abuabiah

standard types, which rotate


continuously when voltage is applied to
their terminals. The shaft of a stepper
motor rotates in discrete increments
when electrical command pulses are
applied to it in the proper sequence.
• Every revolution is divided into a
An-Najah National University

number of steps, and the motor must


be sent a voltage pulse for each step.
The amount of rotation is directly
proportional to the number of pulses,
and the speed of rotation is relative to
the frequency of those pulses.
4.7 Output Control Devices 61

• All servo motors operate in closed-loop mode, whereas most stepper


Dr. Mohammad Abuabiah

motors operate in open-loop mode. Closed-loop and open-loop


control schemes. Generally, stepper motors produce less than 1 hp and
are therefore frequently used in low-power position control
applications.
An-Najah National University
4.8 Positive and Negative Edge Detection 62
Dr. Mohammad Abuabiah

• Positive Edge Instruction detects and waits till


the Monitored signal is changing from “false
to true” then this instruction fires a bit to be Positive Edge Detection
true for just one scan cycle and returns to
zero again.
• Negative Edge Instruction detects and waits
till the Monitored signal is changing from
An-Najah National University

Negative Edge Detection


“true to false” then this instruction fires a bit
to be true for just one scan cycle and returns
to zero again.
63
4.8 Positive and Negative Edge Detection
Dr. Mohammad Abuabiah An-Najah National University
4.8 Positive and Negative Edge Detection 64

• Address Positive edge Detection (POS)


Dr. Mohammad Abuabiah

compares the signal state of address 1 with


the signal state from the previous scan,
which stored in address 2. If the current RLO
state is “1” and the previous state was “0”
(detection of rising edge), the RLO bit will be
“1” after this instruction.
• Address Negative Edge Detection (NEG)
An-Najah National University

compares the signal state of address 1 with


a signal state from the previous scan, which
is stored in address 2. If the current RLO state
is “1” and the previous state was “0” the RLO
bit will be “1” after this instruction.
Example 4.4 Drill Press Machine 65

• Design a PLC ladder program using SIMATIC S7-5.7 program to operate


Dr. Mohammad Abuabiah

the Drilling Press machine, using Positive Edge Diction instruction:


– Inputs:
• Start Push-Button (START): I0.0 --------- NO
• Stop Push-Button (STOP): I0.2 ---------- NC
– Outputs:
• Drilling (DRILL) : Q4.0
• Oil Pump (PUMP): Q4.1
An-Najah National University

• Start PB starts both the drill and then


pump in two separate actions.
• Stop PB stop both the pump and then
drill in two separate actions.
Example 4.5 Use a Single Switch Both as Start and Stop Switch
67

• Write a PLC ladder program using SIMATIC S7-5.7 program to Start and
Dr. Mohammad Abuabiah

Stop a fan and a motor using one single switch, as shown in the Figure
below:
An-Najah National University
4.9 Midline Instruction 70

• Many times, in industrial PLC programming we have to use the same


Dr. Mohammad Abuabiah

rung condition with additional input. Now, to write that same logic,
again and again, become tedious and consume more time.
• In siemens PLC software, allow using midline (#) instruction to replace
that whole rung with this midline instruction. For Example:
An-Najah National University

You might also like