0% found this document useful (0 votes)
88 views60 pages

LEC 5 (Autosaved)

The document discusses discrete and analog input/output systems used in programmable logic controllers (PLCs). Discrete I/O uses digital signals representing an ON/OFF state to connect field devices to the PLC. Analog I/O converts continuous signals like temperature and pressure into discrete values the PLC can understand using expansion modules. The document provides examples of using discrete and analog I/O to control motors and read sensors.

Uploaded by

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

LEC 5 (Autosaved)

The document discusses discrete and analog input/output systems used in programmable logic controllers (PLCs). Discrete I/O uses digital signals representing an ON/OFF state to connect field devices to the PLC. Analog I/O converts continuous signals like temperature and pressure into discrete values the PLC can understand using expansion modules. The document provides examples of using discrete and analog I/O to control motors and read sensors.

Uploaded by

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

DISCRETE I/O SYSTEMS

The discrete input/output (I/O) system provides the physical


connection between the central processing unit and field devices
that transmit and accept digital signals
Digital signals

Digital signals are noncontinuous signals that have only two


states—ON and OFF. Through various interface circuits and
field devices (limit switches, transducers, etc.), the controller
senses and measures physical quantities (e.g., proximity,
position, motion, level, temperature, pressure, current, and
voltage) associated with a machine or process
Discrete Inputs/Outputs

To understand discrete control of a programmable controller


the simple lamp circuit illustrated with forcing will be used.
This is only for instructional purposes as a circuit this simple
would not require a programmable controller. In this
example the lamp is off when the switch is open and on when
the switch is closed.
Wiring

To accomplish this task, a switch is wired to the input of the


PLC and an indicator light is wired to output terminal.
The following drawing illustrates the
sequence of events. A switch is wired to
the input module of the PLC. A lamp is
wired to the output module. The
program is in the CPU. The CPU scans
the inputs. When it finds the switch
open I0.0 receives a binary 0.
Wiring (con.)

This instructs Q 0.0 to send a binary 0 to the output module.


The lamp is off. When it finds the switch closed I0.0 receives
a binary 1. This instructs Q0.0 to send a binary 1 to the
output module, turning on the lamp.
Wiring ).con(
Program Instruction

When the switch is open the CPU receives a logic 0 from


input I0.0. The CPU sends a logic 0 to output Q0.0 and the
light is off.
Program Instruction

When the switch is closed the CPU receives a logic 1 from


input I0.0. The CPU sends a logic 1 to output Q0.0, thus
activating Q0.0. The light turns on.
Motor Starter Example
The following example involves a
motor start and stop circuit.
The line diagram illustrates how
a normally open and a normally
closed pushbutton might be used
in a control circuit.
In this example a motor started
(M) is wired in series with a
normally open momentary
pushbutton (Start), a normally
closed momentary pushbutton
(Stop), and the normally closed
contacts of an overload relay
(OL).
Motor Starter Example

Momentarily depressing the Start pushbutton completes the


path of current flow and energizes the motor starter (M).
Motor Starter Example

This closes the associated M and Ma (auxiliary contact


located in the motor starter) contacts. When the Start button
is released a holding circuit exists to the M contactor through
the auxiliary contacts Ma. The motor will run until the
normally closed Stop button is depressed, or the overload
relay opens the OL contacts, breaking the path of current
flow to the motor starter and opening the associated M and
Ma contacts.
Motor Starter Example
Motor Starter Example

This control task can also be accomplished with a PLC.


Program Instruction

A normally open Start pushbutton is wired to the first input


(I0.0), a normally closed Stop pushbutton is wired to the
second input (I0.1), and normally closed overload relay
contacts (part of the motor starter) are connected to the
third input (I0.2).
The first input (I0.0), second input (I0.1), and third input
(I0.2) form an AND circuit and are used to control normally
open programming function contacts on Network 1. I0.1
status bit is a logic 1 because the normally closed (NC) Stop
Program Instruction
Program Instruction

I0.2 status bit is a logic 1 because the normally closed (NC)


overload relay (OL) contacts are closed. Output Q0.0 is also
programmed on Network 1. In addition, a normally open set
of contacts associated with Q0.0 is programmed on Network 1
to form an OR circuit. A motor starter is connected to output
Q0.0.
Program Instruction
Program Instruction

When the Start pushbutton is depressed the CPU


receives a logic 1 from input I0.0. This causes the I0.0
contact to close. All three inputs are now a logic 1. The
CPU sends a logic 1 to output Q0.0. The motor starter
is energized and the motor starts.
Program Instruction

When the Start pushbutton is pressed, output Q0.0 is now


true and on the next scan, when normally open contact Q0.0
is solved, the contact will close and output Q0.0 will stay on
even if the Start pushbutton has been released.
Program Instruction

The motor will continue to run until the Stop pushbutton is


depressed. Input I0.1 will now be a logic 0 (false). The CPU
will send a binary 0 to output Q0.0. The motor will turn off.
Program Instruction

When the Stop pushbutton is released I0.1 logic function will


again be true and the program ready for the next time the
Start pushbutton is pressed.
Expanding the Application

The application can


be easily expanded to
include indicator
lights for RUN and
STOP conditions. In
this example a RUN
indicator light is
connected to output
Q0.1 and a STOP
indicator light is
connected to output
Q0.2.
Expanding the Application

It can be seen from the ladder logic that a normally open


output Q0.0 is connected on Network 2 to output Q0.1 and a
normally closed Q0.0 contact is connected to output Q0.2 on
network 3. In a stopped condition output Q0.0 is off. The
normally open Q0.0 contacts on Network 2 are open and the
RUN indicator, connected to output Q0.1 light is off. The
normally closed Q0.0 on Network 3 lights are closed and the
STOP indicator light, connected to output Q0.2 is on.
Expanding the Application
Expanding the Application

When the PLC starts the motor output Q0.0 is now a logic
high (On). The normally open Q0.0 contacts on Network 2
now switch to a logic 1 (closed) and output Q0.1 turns the
RUN indicator on. The normally closed Q0.0 contacts on
Network 3 switch to a logic 0 (open) and the STOP indicator
light connected to output Q0.2 is now off.
Expanding the Application
Adding a Limit Switch

The application can be further expanded by adding a limit


switch with normally open contacts to input I0.3.
Adding a Limit Switch

A limit switch could be used to stop the motor or prevent the


motor from being started. An access door to the motor, or its
associated equipment, is one example of a limit switch’s use.
If the access door is open, the normally open contacts of LS1
connected to input I0.3 are open and the motor will not start.
Adding a Limit Switch
Adding a Limit Switch

When the access door is closed, the normally open contacts


on the limit switch (LS1) are closed. Input I0.3 is now on
(logic 1), and the motor will start when the Start pushbutton
is pressed.
Adding a Limit Switch
Expansion

The PLC program can be expanded to accommodate many


commercial and industrial applications. Additional
Start/Stop pushbuttons and indicator lights can be added for
remote operation, or control of a second motor starter and
motor. Over travel limit switches can be added along with
proximity switches for sensing object position. In addition,
expansion modules can be added to further increase the I/O
capability. The applications are only limited by the number of
I/Os and amount of memory available on the PLC.
Review

1. Identify the following symbols:


a. ____________ b. ____________

c. ____________

2. Complete the following tables:


Review

3. In the following instruction Q0.0 will be true (logic 1)


when ____________when ____________ or
____________ is true, and when ____________ is true.
Analog Inputs and Outputs

PLCs must also work with continuous or analog signals.


Typical analog signals are 0 - 10 VDC or 4 - 20 mA. Analog
signals are used to represent changing values such as speed,
temperature, weight, and level. A PLC cannot process these
signals in an analog form. The PLC must convert the analog
signal into a digital representation. An expansion module,
capable of converting the analog signal, must be used.. The
digital values are transferred to the PLC for use in register or
word locations
Analog signals

Unlike discrete signals, which possess only two states (ON


and OFF), analog signals have an infinite number of states.
Temperature, for example, is an analog signal because it
continuously changes by infinitesimal amounts.
Consequently, a change from 70°F to 71°F is not just one
change of 1°F, but rather an infinite number of smaller
changes of a fraction of a degree.
ANALOG SIGNALS

PLCs, like other digital computers, are discrete systems that


only understand 1s and 0s. Therefore, they cannot interpret
analog signals in their continuous form. Analog input
interfaces translate continuous analog signals into discrete
values that can be interpreted by PLC processors. These
discrete values are subsequently used in the control program.
analog Inputs
Devices Flow transducers
used with Humidity transducers
analog Load cell transducers
input Potentiometers
interfaces Pressure transducers
Vibration transducers
Temperature transducers
Analog Inputs and Outputs

In addition, analog modules are available for use with


thermocouple and RTD type sensors used in to achieve
a high level of accuracy in temperature measurement.
Application Example

A field device that measures a varying value is typically


connected to a transducer. In the following example a scale is
connected to a load cell. A load cell is a device that takes a
varying value and converts it to a variable voltage or current
output. In this example the load cell is converting a value of
weight into a 0 - 10 VDC output. The output value depends
entirely on the manufactured specifications for the device.
Application Example

This load cell outputs 0 - 10 VDC for a 0 - 500 Lbs


input. The 0 – 10 VDC load cell output is connected to
the input of an analog expansion module.
Application Example
The example application can be expanded to include a
conveyor system with a gate to direct packages of
varying weight. As packages move along the conveyor
they are weighed. A package that weighs at or greater
than a specified value is routed along one conveyor
path. A package that weights less than a specified
value is routed along another conveyor path, where it
will later be inspected for missing contents.
Analog Outputs
Analog outputs are used in applications requiring
control capability of field devices which respond to
continuous voltage or current levels. Analog outputs
may be used as a variable reference for control valves,
chart recorders, electric motor drives, analog meters,
and pressure transducers. Like analog inputs, analog
outputs are generally connected to a controlling device
through a transducer.
Analog Outputs

The transducer takes the voltage signal and,


depending on the requirement, amplifies, reduces, or
changes it into another signal which controls the
device.
In the following example a 0 - 10 VDC signal controls a
0 - 500 Lbs. scale analog meter
Timers

Timers are devices that count increments of time.


Traffic lights are one example where timers are used.
In this example timers are used to control the length of
time between signal changes.
Timers
Timers are represented by boxes in ladder logic. When
a timer receives an enable, the timer starts to time. The
timer compares its current time with the preset time.
The output of the timer is a logic 0 as long as the
current time is less than the preset time. When the
current time is greater than the preset time the timer
output is a logic 1. S7-200 uses three types of timers:
On- Delay (TON), Retentive On-Delay (TONR), and Off-
Delay (TOF).
Hard-Wired Timing Circuit

Timers used with PLCs can be compared to timing


circuits used in hard-wired control line diagrams. In the
following example, a normally open (NO) switch (S1) is
used with a timer (TR1). For this example the timer has
been set for 5 seconds. When S1 is closed, TR1 begins
timing. When 5 seconds have elapsed, TR1 will close
its associated normally open TR1 contacts, illuminating
pilot light PL1. When S1 is open, deenergizing TR1, the
TR1 contacts open, immediately extinguishing PL1.
This type of timer is referred to as ON delay.
Hard-Wired Timing Circuit

ON delay indicates that once a timer receives an enable


signal, a predetermined amount of time (set by the
timer) must pass before the timer’s contacts change
state.
On-Delay (TON)

When the On-Delay timer (TON) receives an enable


(logic 1) at its input (IN), a predetermined amount of
time (preset time - PT) passes before the timer bit (T-
bit) turns on. The T-bit is a logic function internal to the
timer and is not shown on the symbol. The timer resets
to the starting time when the enabling input goes to a
logic 0.
On-Delay (TON)

In the following simple timer example, a switch is


connected to input I0.3, and a light is connected to
output Q0.1.
On-Delay (TON)
When the switch is closed input 4 becomes a logic 1, which
is loaded into timer T37. T37 has a time base of 100 ms (.100
seconds). The preset time (PT) value has been set to 150.
This is equivalent to 15 seconds (.100 x 150 ). The light will
turn on 15 seconds after the input switch is closed. If the
switch were opened before 15 seconds had passed, then
reclosed, the timer would again begin timing at 0.
On-Delay (TON)

A small sample of the flexibility of PLCs is shown in the


following program logic. By reprogramming the T37
contact as a normally closed contact, the function of
the circuit is changed to cause the indicator light to
turn off only when the timer times out. This function
change was accomplished without changing or
rewiring I/O devices.
Retentive On-Delay (TONR)

The Retentive On-Delay timer


(TONR) functions in a similar
manner to the On-Delay timer (TON).
There is one difference.
The Retentive On-Delay timer times
as long as the enabling input is on,
but does not reset when the input
goes off. The timer must be reset
with a RESET (R) instruction.
The same example used with the On-Delay timer will be
used with the Retentive On-Delay timer. When the switch
is closed at input I0.3, timer T5 (Retentive timer) begins
timing. If, for example, after 10 seconds input I0.3 is
opened the timer stops.
Retentive On-Delay (TONR)
When input I0.3 is closed
the timer will begin
timing at 10 seconds.
The light will turn on 5
seconds after input I0.3
has been closed the
second time. A RESET
(R) instruction can be
added. Here a
pushbutton is connected
to input I0.2. If after 10
seconds input I0.3 were
opened, T5 can be reset
by momentarily closing
input I0.2. T5 will be
reset to 0 and begin
timing from 0 when input
I0.3 is closed again.
Off-Delay (TOF)

The Off-Delay timer is used to delay an output off for a


fixed period of time after the input turns off. When the
enabling bit turns on the timer bit turns on immediately
and the value is set to 0. When the input turns off, the
timer counts until the preset time has elapsed before
the timer bit turns off.
S7-200 Timers

The S7-200s have 256 timers. The specific T number


chosen for the timer determines its time base and
whether it is TON,
TONR, or TOF.
Timer Example

In the following example a tank will be filled with two


chemicals, mixed, and then drained. When the Start
Button is pressed at input I0.0, the program starts
pump 1 controlled by output Q0.0. Pump 1 runs for 5
seconds, filling the tank with the first chemical, then
shuts off. The program then starts pump 2, controlled
by output Q0.1. Pump 2 runs for 3 seconds filling the
tank with the second chemical. After 3 seconds pump 2
shuts off.
Timer Example

The program starts the mixer motor, connected to


output Q0.2 and mixes the two chemicals for 60
seconds. The program then opens the drain valve
controlled by output Q0.3, and starts pump 3
controlled by output Q0.4. Pump 3 shuts off after 8
seconds and the process stops. A manual Stop switch
is also provided at input I0.1
Timer Example
Review

1. Analog signals are converted into a ____________


format by the PLC.
2. Three types of timers available in the S7-200 are On-
Delay, ____________ On-Delay, and ____________-
Delay.
3. The maximum time available on a 100 millisecond
time base timer is ____________ seconds.
4. A count of 25 on a 10 millisecond time base timer
represents a time of __________ milliseconds.
5. There are ____________ timers in the S7-200.

You might also like