14. Релей Relays
Удирдлагын үндсэн элемент Original control
elements
Одоо бол туслах элементээр ашиглаж байна.
Now used as auxiliary devices
The PLC is not designed to switch high currents or voltages
CR1-1
CR1
14
15. Manually Operated Switches
Даралтат товчлуур Pushbuttons
Хэвийн нээлттэй Normally open
Хэвийн хаалттай Normally closed
Selector switches
Maintained or spring return
15
34. PLC-ийн ангилал
(1) Compact
Monolithic construction
Monoprocessor
Fieldbus connection
Fixed casing
No process computer capabilities (no
MMC)
Fixed number of I/O (most of them binary)
(2) Modular PLC
Modular construction (backplane)
One- or multiprocessor system
Fieldbus and LAN connection
DIN-rail
Large variety of input/output boards
Connection to serial bus
34
35. Compact эсвэл modular ?
€
field bus
extension
compact PLC
(fixed number of I/Os)
modular PLC (variable number of I/Os
Limit of local I/O
# I/O modules
35
39. Давуу талууд:
Flexibility:
Correcting Errors:
Space efficient:
Low cost:
Testing:
Visual observation:
Number of contacts many:
Resistant character test :
Simplifies the control system components
Security :
Documentation:
Can make changes by reprogramming in seconds.
39
41. PLC:Location in the control architecture
Engineer
station
Operator
station
Supervisor
Station
Enterprise Network
gateway
direct I/O
Field Stations
data concentrators,
not programmable,
but configurable
41
CPU
I/O
COM 2
Sensor Bus (e.g. ASI)
gateway
COM
FB
gateway
small PLC
PLC
Field Bus
COM
CPU
COM
I/O
I/O
I/O
COM
CPU
Field Bus
COM
CPU
I/O
I/O
I/O
I/O
directly connected
I/O
Control Station
with Field Bus
COM1
PLC
CPU
COM1
COM 2
I/O
I/O
I/O
I/O
large
PLCs
CPU
COM1
I/O
I/O
I/O
I/O
I/O
Control Bus
(e.g. Ethernet)
Field Devices
58. Analogue I/O
Typical analogue signals from 0-10 VDC or 4-20 mA=
They are used to represent changing values such as
temperature, weight and level
58
speed,=
59. Instructions
:Standard instructions
.They are used in most programs
Examples: timer, counter, math, logical, incr., decr. and move
:Special instructions
They are used to manipulate data
.Shift, table, conversion, real time instruction
:High speed instructions
They allow for events and interrupts to occur independently of
.the PLC scan time
Examples: High speed counters and interrupts
59
60. Input Instructions
Bit Logic instruction
Normally Open contact
Normally Closed contact
Normally Open Immediate contact
Normally Closed Immediate contact
Positive Transition contact
Negative Transition contact
Not contact
60
70. On-Delay & Retentive On-Delay timers
They count time when the enabling input (IN) is
ON. When the current value (Txxx) is > the preset
.time (PT), the timer bit is ON
The On-Delay timer current value is cleared when
(IN) is OFF, while the current value of the Retentive
.On-Delay Timer is maintained
You can use the Retentive On-Delay Timer to
.accumulate time for multiple periods of the input ON
70
71. Off-Delay timer
The Off-Delay Timer is used to delay turning an output OFF for a
.fixed period of time after the input turns OFF
When (IN) turns ON, the timer bit turns ON immediately, and the
. current value is set to 0
When (IN) turns OFF, the timer counts till PT and the timer bit
.turns OFF and the current value stops counting
If the input is OFF for a time shorter than PT, the timer bit
.remains ON
71
78. Memory types
You can access data in many CPU memory areas
- process image input register
- process image output register
- variable memory area
- Bit memory area
- sequence control relay memory area
- special memory bits
- local memory area
- Timer memory area
- counter memory area
- Analog inputs
78
(I)
(Q)
(V)
(M)
(S)
(SM)
(L)
(T)
(C)
(AI)
80. Memory addressing
You can access data in many CPU memory areas (V, I, Q, M, S, L,
:and SM) as
.bytes, words, or double words by using the byte-address format
80
81. Memory types
Process-image input register (I)
: Format
Bit
I[byte address].[bit address] I0.1
Byte, Word, Double Word I[size][starting byte address] IB4
Process-image output register (Q)
:Format
Bit
Byte, Word, Double Word
Q[byte address].[bit address] Q1.1
Q[size][starting byte address] QB5
Variable memory area (V)
:You can use V memory to
. store intermediate results of the control logic operations •
. store other data pertaining to your process or task •
:Format
Bit
Byte, Word, Double Word
81
V[byte address].[bit address] V10.2
V[size][starting byte address] VW100
82. Memory types
Sequence control relay area (S)
They are used to organize machine operations or steps into equivalent
program segments. SCRs allow logical segmentation of the control
:Format
Bit
S[byte address].[bit address] S3.1
Byte, Word, Double Word S[size][starting byte address] SB4
Special memory bits (SM)
The SM bits provide a means for communicating information between the
CPU and your program. You can use these bits to select and control some
:of the special functions of the S7-200 CPU, such as
A bit that turns on for the first scan cycle•
Bits that toggle at fixed rates•
Bits that show the status of math or operational instructions •
:Format
Bit
SM[byte address].[bit address] SM0.1
Byte, Word, Double Word SM[size][starting byte address] SMB86
82
83. Memory types
Local memory area (L)
The S7-200 PLCs provide 64 bytes of local (L) memory of which 60 can be
used as scratchpad memory or for passing formal parameters to subroutines.
Format:
Bit
L [byte address].[bit address] L0.0
Byte, Word, Double Word
L [size] [starting byte address] LB33
83
84. Memory types
Analog inputs (AI)
The S7-200 converts a real-world, analog value (such as temperature
or voltage) into a word-length (16-bit) digital value. You access these
values by the area identifier (AI), size of the data (W), and the starting
byte address. Since analog inputs are words and always start on
even-number bytes (such as 0, 2, or 4), you access them with evennumber byte addresses (such as AIW0, AIW2, or AIW4),as shown in
Figure Analog input values are read-only values.
Format: AIW [starting byte address] AIW4
84
85. Memory types
•Analog outputs (AQ)
The S7-200 converts a word-length (16-bit) digital value into a current
or voltage, proportional to the digital value (such as for a current or
voltage). You write these values by the area identifier (AQ), size of the
data (W), and the starting by address. Since analog outputs are words
and always start on even-number bytes (such as 0, 2, or 4), you write
), them with even-number byte addresses (AQW0, AQW2, AQW4
Format: AQW [starting byte address] AQW4
85
86. Replacing Relay by PLC
First step- We have to translate all of the items
we're using into symbols the plc understands
A contact symbol
A coil symbol
86
87. Second step
- We must tell the plc where everything is
located. In other words we have to give all
the devices an address.
Final step
- We have to convert the schematic into a
logical sequence of events.
87
88. Ladder Diagram and Programming:
Load: The load (LD) instruction is a normally open contact
A Load (contact) symbol
LoadBar: The LoadBar instruction is a normally closed contact.
A LoadBar (normally closed contact) symbol
88
89. Out :The Out instruction is sometimes also called an Output Energize instruction.
The output instruction is like a relay coil
An OUT (coil) symbol
OutBar: The outbar instruction is like a normally closed relay coil
An OUTBar (normally closed coil) symbol
89
91. Programming a PLC :
In order to create or change a program, the
following items are needed:
PLC
Programming Device
Programming Software
Connector Cable
91
92. You can use a personal computer as a programming device
92
93. Testing a program
Once a program has been written it needs to be tested and debugged. One
way this can be done is to simulate the field inputs with an input simulator.
The program is first downloaded from
the PC to the CPU. The selector switch
is placed in the RUN position. The
simulator switches are operated and the
resulting indication is observed on the
output
93
97. Examples two
This Exam gives a complete understanding of input, output, OR and AND commands
in ladder diagram, and Timer. Here it is shown that if input I0.0 and I0.1 are on then
output Q0.0 will turn on and this part explains the AND command. Output Q0.0 can
also be activated if input I0.2 is on, which shows the OR command. In network two it
is shown that when input I0.3 is activated a timer will count 3 seconds
(300ms×10ms=3 s) and then this timer will activate the output Q0.1 .
97
98. Example three
In this assignment you are asked to imagine a parking lot. These are one entrance and
one exit in this parking garage. You are asked to draw the ladder diagram of this
system by considering the requirements mentioned here. Both the entrance and exit
gates are open with remote control and you can assume that there is a infrared sensor
to get the signal from the remote control and since this sensor is connected to PLC, as
it gets the signal it is processed in PLC and entrance or exit gate will open. There are
two infrared sensors one is placed toward the entrance and the other one is placed
toward the exit so they will not interfere. Since you need the system to keep the gate
open after someone presses the remote control button, you may need a latching switch
for both entrance and exit. In addition you need the gates to be open only for 20
second and the timing increment of your PLC is 10ms. Moreover since you do not
want the gate to damage your car if it takes more than 20 seconds to pass the gates,
there are 2 sensor placed at entrance and exit gate (one for entrance and one for exit)
to keep the gate open when a car is passing through.
98
101. Solution Description
In this example as I mentioned there should be a latching system to keep the
gate open and close it after a car passes through. Here I00 is the infrared
sensor that takes the command from the remote control. As it get the
command it opens the gate Q01 and at the same time it will activated the 20
second timer T33
I0.0
Q0.1
SET
101
I0.0
T33
2000 10ms
102. Solution Description Continued
After 20 second the timer activate the switch I01 which will reset the
output Q01, in other words it will close the gate. But this example does
not finish here. A sensor is required to keep the gate open if a car is
still in the gate way. So an other infrared sensor I02 is used here to
keep the gate open and it is connected to Q01.
I0.1
Q0.1
Reset
T33
102
M0.1
I0.2
Q0.1
103. Example four
Automatic water sprinkler system of a garden
This example is based on Automatic water
sprinkler system of a garden. It delivers water to
grass, flowers and trees. Watering of whole
garden depends upon humidity and temperature
conditions which are adjustable.
103
105. Example Continued
This example is one of the most complicated examples in this presentation. Here the
water sprinkler system (Q0.0) starts to work when either temperature sensor(I0.0) or
humidity sensor (I0.1) send a signal to it. In this scenario grass will be water first
(water the grass Q0.1) fro 4 second (it is assumed very small for simplicity) and then
flowers will be water (water the flowers Q0.2) for 10 second and at last trees will be
watered (water the trees Q0.3) for 18 seconds. Since it is required to avoid pressure
drop in the water line ,each section is separated and here the order to water this
garden is given: First grass, second flowers and third trees.
105
106. Example Continued
Here you can see that either temperature sensor I0.0 or humidity sensor I0.1 can turn
on the sprinkler system (Q0.0). If the humidity or temperature falls below a specific
point the system will start working.
106
108. Example Continued
In this Example it is needed to water the grass for 4 seconds. Since the increment is 10
ms, it is written 400ms in the timer. The input is assume to be the Q0.0 which was the
switch for sprinkler system. Here it is assumed that if the sprinkler is on, the output
Q0.1 will also become on and it will remain on for 4 seconds. If you take a look at the
ladder diagram you will see that the input Q0.0 turn the timer on and it will count 4
seconds until it breaks the second line.
108
110. Example Continued
Since the input switch Q0.0 turn on all the timers in this ladder diagram at the same
time it is required to add the time for watering of each section with the time elapsed
in the previous sequence. For example although it is required to water the flowers
for only 10 second but in the timer it is written 1400ms with the increment 10 ms
which will eventually be equal to 14 second. Now if you subtract 14 seconds from 4
second (the time required for the first section) you will get the required time which
is 10 seconds. There is one more important parameter here. In the ladder diagram it
is written if the first section is done start the second section. You can see this in the
second line of the ladder diagram. The output here is Q0.2 which is assumed for
watering flowers.
110
112. Example Continued
This part is like the second part. Watering the trees is started when previous section
are finished. The time for this section is 18 second which is added to 14 seconds
counted before and now it is written as 3200 ms with 10ms increment. You can see
when both Q0.1 and Q0.2 are off the third part (Q0.3) is started.
112
113. Example five
This example is based on a parking lot with a PLC which counts the
number of cars that enter and exit and if the parking lot is about to be full,
PLC sends a signal to a electronic board to say that the parking is full. The
system is also utilizing a infrared sensor to open the gates with remote
control.(The capacity of this parking lot is assumed to be 5 cars.)
113
115. Example Continued
In this example input I0.0 open the entrance gate and input I0.1 opens the exit
gate. I0.0 and I0.1 are both infrared sensors which will be activated by remote
control. In addition sensor I0.2 count the number of cars entering the parking lot
and sensor I0.3 counts the cars leaving . The switch I0.4 is used to reset the
system. If a total number of 5 cars enter this parking lot, counter C1 send a signal
to the electronic board Q0.2 to show that the parking is full.
115
116. Programmable logic control
A PLC has many "input" terminals, through which it interprets
"high" and "low" logical states from sensors and switches.
It also has many output terminals, through which it outputs "high"
and "low" signals to power lights, solenoids, contactors, small
motors, and other devices lending themselves to on/off control.
In an effort to make PLCs easy to program, their programming
language was designed to resemble ladder logic diagrams.
Thus, an industrial electrician or electrical engineer accustomed
to reading ladder logic schematics would feel comfortable
programming a PLC to perform the same control functions.
116
117. Program design of PLC
Design objective
PLC selection and resource allocation
I/O address assignment
Wiring
Programming
117