Sei sulla pagina 1di 283

U Soe Tint Siemens PLC S7-200

pma&;ol&JU trSmpum;
pma&;olu PLC tajccHtqifhukdom 'DpmtkyfrSm a&;om;az:jyxm;ygw,f/ PLC
&JU tajccHoabmw&m; concept ukd rSefrSefuefuef oabmaygufem;vnfxm;&if a&SU
wqifhwufNyD; avYvm&mrSm rsm;pGmtaxmuftuljzpfapygw,f/
xda&mufwJY avYvmoif,lrIrSm vufawGUavYusifYrIyg0ifygw,f/ Computer ay:rSm
program a&;NyD; PLC eJY vufawGY RUN Munfh&rSmjzpfygw,f/ vlwkdif;twGuf 'Dvkdvkyf
MunfhEkdifrSmr[kwfvkdY PLC rygyJeJY Simulate vkyfMunfhEkdifatmif yxrOD;qkH;a&;cJYwJY
PLC vrf;nTef pmtkyfrSm Simulate vkyfvkdY&wJY Software a&m vkyfykHvkyfenf;ukdyg xnfh
ay;xm;ygw,f/
,aeYacwf Control Technology rSm tokH;jyKaeMuwJY logic u 2-rsKd;&Sdygw,f/ 'Dpm
tkyfrSm a&;om;az:jywJY Logic u Boolean Logic jzpfygw,f/ aemufwpfrsKd;u Fuzzy
Logic jzpfygw,f/
Boolean Logic u &SdwmeJYr&Sdwm? rSefwmeJYrSm;wm? tajctae 2-rsKd;ukd jywfjywf
om;om; ykdif;jcm;jyygw,f/ rSefw,f True vkdYajym&if vkH;0rrSm;bl;? trSm;wpufrSr&Sdbl;?
vkdY qkdvkdygw,f/ False vkdY az:jycJY&ifvnf; vkH;0rSm;w,f? wpufrSrrSefbl;? vkdY qkdvkdyg
w,f/
Fuzzy Logic u awmh True eJY False ukd jywfjywfom;om; rykdif;jcm;yJeJY eJeJrSefNyD;?
rsm;rsm;rSm;w,f? rsm;rsm;rSefNyD;? eJeJrSm;w,f? vkdY trSm;eJYtrSefukd bufESpfbufpvkH;&JU
tajctaeukd xnfhoGif;az:jyygw,f/ Oyrm? rsm;rsm;rSefwmukd 80% rSefNyD; 20% rSm;
w,fvkdY trSef? trSm;? &JU yrmPukdyg az:jyygw,f/ 100% rSm;w,fvkdY ajymrSom
vkH;0rrSefbl;qkdwJY t"dyg,f&ygw,f/ a'gufwmcifarmif0if; jrefrmvkda&;xm;wJY Fuzzy
Logic pmtkyfukd vGefcJYwJY 10-ESpfavmufu zwfzl;ygw,f/ tJ'D pmtkyfukd &SmzwfzkdY
wkdufwGef;ygw,f/
,aeYacwf PLC awGrSm PID Control ukda&m Fuzzy Control ukdyg tokH;jyKaeMuNyD
jzpfygw,f/ qufvufavYvmp&mawGuawmh tNrJ&SdaerSmjzpfygw,f/ OEM &JU manual
awGukd avYvmzwf&IwJYtcg taxmuftuljzpfapzkdY &nf&G,fNyD; t*Fvdyfpm? jrefrmpm? eJY
&kyfykHawGukd olYae&meJYol cGif0ifatmif xnfhoGif;az:jywJY a&;enf; Hybrid enf;ukd
'DpmtkyfrSm tokH;jyKNyD;a&;xm;ygw,f/
odvkdwm&Sd&if pma&;ar;jref;Ekdifygw,f/



U Soe Tint
Instrumentation Engineer
AGTI (EC) Mandalay 1969
soetintengineer@gmail.com
The more you learn about PLCs, the more you will be able to solve other control problems.
U Soe Tint Siemens PLC S7-200

pmrsufESmtTef;
taMumif;t&m pmrsufES m
Introductions 2
PLC Overview 4
I/O Memory & I/O Terminals 10
PLC Hardware 11
PLC Specification 16
Password Level 4-rsKd; 18
PART 1 Hardware & Software Installation 19
Installing an S7-200 PLC 20
Removable Terminal Block Connector 22
Guidelines for AC Power Supply Installation 23
I/O expansion 26
Sample I/O Addresses for Local and Expansion I/O (CPU 224) 28
Input Devices 30
Output Devices 34
Programmable Logic Controller I/O connection diagram 36
Output terminal & Input terminal 37
Programming Software Installation 39
Program Writing on Computer 50
PART 2 Program Reading 52
Logic AND 56
Logic OR 57
Example (1) Examine_ON instruction 58
Example (2) Examine_OFF instruction 59
Example (3, 4, 5) AND conditions 60
Example (6, 7, 8) OR conditions 63
Example (9, 10) AND before OR conditions 66
Example (11, 12) OR before AND conditions 68
Example (13) Self-holding program 70
Example (14) Interlock Control program 71
Example (15) AND_block, OR_block 72
Example (16) NOT instruction 73

The more you learn about PLCs, the more you will be able to solve other control problems.
U Soe Tint Siemens PLC S7-200

Example (17) P instruction 74


Example (18) N instruction 75
Example (19) Immediate instruction 76
PLC tvkyfvkyfykHtwkdcsKyf&Sif;vif;csuf 77
Example (20) S and R instructions Reset Dominant 83
Example (21) S and R instructions Set Dominant 85
Example (22) SR Set-Dominant Bistable Instruction 87
Example (23) RS Reset-Dominant Bistable Instruction 88
Example (24) Toggle Flip-Flop Program 89
Example (25) INC_B Increment Byte Instruction 90
Example (26) DEC_B Decrement Byte Instruction 92
Example (27) INC_W Increment Word Instruction 93
Memory in the PLC 97
Input image memory I 99
Output image memory Q 100
Internal memory M 101
Special Memory SM 109
Example (28) ON-delay Timer Program using SMB28 111
Variable memory V 112
Using Your Program to Save V Memory to the EEPROM 113
Copying V Memory to the EEPROM 114
Storing your Program on a Memory Cartridge 117
Restoring the Program and Memory with a Memory Cartridge 119
Accumulators AC 120
Timer Memory Area (T) 122
Function of ON-Delay Timer 125
Example (29) ON-delay Timer Program 128
Example (30) OFF-delay Timer Program 129
Example (31) ON-delay/OFF-delay Timer Program 131
Example (32) Self-Resetting ON-Delay Timer Program 133
Example (33) TONR Retentive On-Delay Timer Program 136
Example (34) One Shot Timer Program 138
Example (35) Re-triggerable One Shot Timer Program 139
Example (36) Multi-Vibrator Program 141

The more you learn about PLCs, the more you will be able to solve other control problems.
U Soe Tint Siemens PLC S7-200

Counter Memory Area (C) 142


Example (37) CTU Up counter 144
Example (38) CTD down counter 146
Example (39) CTUD Up_Down counter 148
Example (40) 4-Bit Asynchronous Binary Counter Program 150
PART 3 Programming 156
Project (1, 2) Push Button (N.O) 159
Project (3, 4) Push Button (N.C) 170
P.B1 (N.O) t"dyg,f&Sif;vif;csuf 173
P.B1 (N.C) t"dyg,f&Sif;vif;csuf 174
Project (5, 7) Logic AND 175
Project (6, 8) Logic OR 178
Project (9, 10) Self Holding 189
Project (11) TON ON-Delay 193
Project (12) TOF OFF-Delay 196
Project (13) Same function either using TON or TOF 199
Project (14) Sequential Delay Output Program 201
Project (15) CTU Up Counter 210
Project (16) CTD Down Counter 212
Project (17) CTUD Up_Down Counter 214
Project (18) TONR Retentive ON-Delay 219
Project (19) Motor Forward_Reverse Control Program 225
Project (20) Motor Sequence Run Program 237
Project (21) Auto_Manual Draining Process 241
Project (22) Continuous Filling System 248
Project (23) Fire Water Tank Level Alarm System 255
Project (24) Liquid Mixing Tank Control 264
Project (25) Mixing Tank Semi-Auto Control 269
Terminology 274
Reference 278

The more you learn about PLCs, the more you will be able to solve other control problems.
U Soe Tint Siemens PLC S7-200

Siemens PLC
S7-200 CPU 224

100 to 230 V AC/24 V DC/ relays


S7-200 CPU224 AC/DC/RLY

(Order No. 6ES7 214-1BD23-0XB0)


The more you learn about PLCs, the more you will be able to solve other control problems.
-1-
U Soe Tint Siemens PLC S7-200

Introductions
,aeYacwfoHk; PLC awG[m control relay awG vkyfwJhtvkyfudk udk,fpm;jyKaqmif
&GufwJh vkyfief;omruawmhyJ computer wpfvHk;vdk aqmif&GufEdkifpGrf;&SdMuygw,f/ pufHk
tvkyfHk&JUywf0ef;usifeJU o[Zmwjzpfatmif I/O eJU programming language awGukd
toHk;jyKxm;Muygw,f/ 'gaMumifh PLC udk industrial computer vdkYvnf; ac:ygw,f/
PLC udk computer wnfaqmufovdkyJ microprocessor udk tajccHNyD; wnfaqmuf
xm;ygw,f/ Microprocessor udk intelligence device vdkY todtrSwf jyKMuygw,f/
Microprocessor [m vlUOmPfudk wkyNyD;aqmif&GufEdkifpGrf;&SdwJh electronic ypnf;wpfrsdK;
jzpfygw,f/ Computer wdkif;rSm microprocessor yg&Sdygw,f/ PLC [mvnf; industrial
computer wpfrsdK; jzpfvdkY PLC udk avhvmwJhtcgrSm computer wpfvHk;udk avhvmovdkrsdK;
avhvmoifhygw,f/ 'grSom topftopfxGufay:vmwJh PLC &JU vkyfaqmifcsuf
function awGudk avhvmwJhtcg vG,fulaprSm jzpfygw,f/
Relay logic eJY vkyfEdkifwmrSeforQ PLC u vkyfaqmifEdkif&kHru *Pef;aygif;wm?
EIwfwm? ajrmufwm? pm;wmawGukdvnf; Computer vdkyJ aqmif&GufEdkifygw,f/ BuD;wm?
i,fwm? nDwm pwJh EdIif;,SOfrIawGvnf; vkyfEdkifygw,f/ Analog Signal awGudkvnf;
vufcHaqmif&Gufay;Edkifygw,f/ Computer vdkyJ PLC awGuvnf; wpfvHk; eJU wpfvHk;
pum;ajymqufoG,fvdkY &aeygNyD/ PLC u pufjzpfaeawmh pufpum;eJU ajymMuwm
jzpfygw,f/ pufpum; machine language udk binary eJU a&;&ygw,f/ vQyfppftcsufjy
jzpfwJh voltage &SdwmeJU r&Sdwm (vQyfppf pD;wmeJU rpD;wm) tajctae ESpfrsdK;yJ&SdvdkU
binary vdkY ac:wmjzpfygw,f/
vlawG twGuf binary eJU program a&;&wm cufcJvdkY high level language vdkY
ac:wJh vlawGtwGuf oif,l&vG,fulwJh programming language awGudk wDxGifxm;yg
w,f/ tckpmtkyfrSm high level language wpfrsdK; jzpfwJh Ladder Diagram (LD)
programming language eJU program b,fvdka&;&w,f qdkwmudk tajccHupNyD; oabm
aygufem;vnfatmif &Sif;jyxm;ygw,f/
1968 ckESpfrSm armfawmfum; xkwfvkyfwJh General Motors ukrPDu PLC udk pwif
tokH;jyKcJhygw,f/ 1977 ckESpfrSm Allen-Bradley ukrPDu 8080 microprocessor udk toHk;
jyKNyD; xkwfvkyfxm;wJh PLC [m aps;uGufxJudk a&muf&SdvmcJhygw,f/ pm;aomufukef
vkyfief;? owKvkyfief;? ukefxkwfvkyfief;? puLxkwfvkyfrI pwmawGrSmyg PLC udk us,f
us,fjyefYjyefY toHk;jyKvmMuygw,f/
Siemens AG u Simatic S5 PLC ukd 1979 ckESpfrSmpwif xkwfvkyfokH;pGJcJYygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
-2-
U Soe Tint Siemens PLC S7-200

PLC rSm trsKd;tpm; type ESpfrsdK;&Sdygw,f/


1 / Modular PLC trsdK;tpm;eJY
2 / Compact PLC trsdK;tpm;wkdY jzpfMuygw,f/
1 / Modular PLC qkdwmu Power supply module u wpfck? memory yg0ifwJh
CPU module u wpfck? Input module u wpfck? Output module u wpfck? tJ'D wpfck
csif;pDjzpfwJh module awGudk atmufcHjym; backplane ay:rSm wwfqifvkdufawmhrS PLC
wpfvHk; jzpfvmygw,f/
2 / Compact PLC qkdwmuawmh tJ'D module wpfckcsif;pD&JUvkyfaqmifcsuf
function awGtm;vHk;yg0ifatmif pkpnf;NyD; yHk;cGH enclosure wpfckwnf;rSm xnhfoGif;wnf
aqmufxm;wJh PLC rsdK;jzpfygw,f/ Compact PLC ukd Integrated PLC, Micro PLC,
Monolithic PLC, All in one PLC vkdYvnf; ac:Muygw,f/
PLC rSmyg&SdwJh Input eJY Output ukd aygif;NyD; I/O vkdY ac:ygw,f/ PLC &JU size
tBuD; tao;ukd I/O ta&twGufeJY owfrSwfygw,f/ PLC taMumif; a&;om;azmfjywJh
catalog pmtkyfawGrSm input (I) eJY output (O) ukd waygif;wnf;a&wGufxm;wJh I/O ta&
twGufudk azmfjyavh&Sdygw,f/ Oyrm? input 8-ckeJY? output 6-ckygwJh PLC ukd I/O 14-ck
vkdY PLC &JU size ukd a&;om;azmfjyygw,f/
Size of PLC
PLC &JU t&G,ftpm; tBuD;tao;udk Input eJY Output ESpfckaygif;ta&twGufeJY
cGJjcm;owfrSwfMuygw,f/
I/O ta&twGuf 15 ck txdukd Nano PLC
I/O ta&twGuf 32 ck txdukd Micro PLC
I/O ta&twGuf 128 ck txdudk Small PLC
I/O ta&twGuf 1024 ck txdudk Medium PLC
I/O ta&twGuf 4096 ck txdukd Large PLC
I/O ta&twGuf 8192 ck txdudk Very Large PLC vkdY ac:Muygw,f/
'DaeY acwfrSmawmh Large PLC eJY Very Large PLC awGukd toHk;rjyKMuawmhygbl;/
Medium size PLC txdukdom Process Control System awGrSm DCS pepf Distributed
Control System eJY wGJzufNyD; network csdwfquf toHk;jyKMuygw,f/ toHk;trsm;qHk;
uawmh Micro PLC vkdY ac:wJY Compact PLC awGjzpfMuygw,f/ I/O ukd vkdovkd wkd;csJU
wwfqifvkdY&wJh Micro PLC awGukd Machine Control rSma&m? Process Control rSmyg
toHk;jyKMuwmukd awGU&ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
-3-
U Soe Tint Siemens PLC S7-200

PLC Overview
PLC Program udk zwfwwfwm[m PLC eJY ywfoufwJhjyem problem awGudk
ajz&Sif;&mrSm taxmuftul BuD;BuD;rm;rm; jzpfapygw,f/ PLC eJY ywfoufwJh jyem
problem awGudk ajz&Sif;zdkYtwGuf PLC Program udk zwfwwf&kHeJYawmh rjynfhpkHao;ygbl;/
PLC wiring diagram udkyg zwfwwf&ygr,f/ PLC eJY qufoG,fxm;wJh Input device
awG? Output device awGtaMumif; aumif;aumif; odxm;&ygr,f/ PLC eJY ywfoufNyD;
odxm; oifhwmawGudk 'Dae&mrSm tusOf;tm;jzifh az:jyygr,f/ PLC [m Industrial
Computer wpfrsKd; jzpfwmrkdYvkdY Hardware ykdif;eJY Software ykdif;qkdNyD; ESpfykdif;&Sdygw,f/
PLC wpfvkH;udk awGUwJhtcg? Hardware ydkif;udk pwifavYvm&ygw,f/ NyD;rS
Software ydkif;jzpfwJh PLC Program udk avhvm&rSmjzpfygw,f/
S7-200 wGif S7-200 CPU221, S7-200 CPU222, S7-200 CPU224, S7-200 CPU226,
eJY S7-200 CPU226XM [l Model 4-rsKd;&Sdygw,f/
4if;wkdY&JU CPU trsKd;tpm;? power supply trsKd;tpm;eJYyrmP? input trsKd;tpm;eJY
ta&twGuf? output trsKd;tpm;eJY ta&twGuf? wkdYukd atmufygZ,m;wGif az:jyxm;yg
w,f/

S7-200 CPU224 AC/DC/RLY vkdY PLC ay:rSma&;om;xm;wJYpm&JU t"dyg,fu 'D


PLC twGufay;oGif;&r,fh Power Supply u AC, Input u DC jzpfNyD;? Output u Relay
trsKd;tpm; jzpfaMumif;ukd az:jyxm;wmjzpfygw,f/
Power Supply Input Output
{
{
{

S7-200 CPU224 AC / DC / RLY

The more you learn about PLCs, the more you will be able to solve other control problems.
-4-
U Soe Tint Siemens PLC S7-200

S7-200 CPU224 AC/DC/RLY


Communication Port ukd Programming Port vkdYvnf; ac:ygw,f/ PLC xJukd
program a&;oGif;wJYtcg tokH;jyKygw,f/

PLC &JU vkyfaqmifrItajctaeukd tvif;a&mifeJY az:jywJY CPU status indicator,


Input status indicator eJY Output status indicator [l Status Indicator 3-rsKd;yg&Sdygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
-5-
U Soe Tint Siemens PLC S7-200

Output Signal

Input Signal


ykHrSmaz:jyxm;ovkd PLC &JU Input device awGu PLC ukd signal ay;oGif;&wJY
Sensor awG jzpfMuNyD;? PLC &JU Output device awGu PLC ckdif;wmukd vkyfaqmifay;&wJY
Actuator awG jzpfMuygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
-6-
U Soe Tint Siemens PLC S7-200

PLC &JU Input device (Sensor) awGuay;ykdYvmwJY Electric Signal ukd CPU em;vnf
vufcHEkdifwJY data awGjzpfatmif Input Interface u ajymif;ay;ygw,f/ CPU u xkwfay;
wJY data awGukd Electric Signal jzpfatmif PLC &JU Output Interface u ajymif;ay;yg
w,f/

PLC ukd pufrIvkyfief;cGif Industrial rSm tMurf;cHatmif &nf&G,fwnfaqmuf


xm;wmjzpfvkdY 220VAC supply ay;&r,fh PLC ukd rSm;,Gif;NyD; 400VAC supply ay;
oGif;rdcJY&if PLC xJrSmygwJY Power supply ykdif;omysufpD;NyD;? usefwJYtpdwftykdif;awG
jzpfwJY CPU wkdY? Memory wkdY? I/O interface wkdY rysufpD;ygbl;/ 24VDC input signal ay;
oGif;&wJY PLC ukd rSm;,Gif;NyD; 220VAC input signal ay;oGif;rd&ifvnf; Input interface
om ysufpD;NyD;? usefwJYtpdwftykdif;awGjzpfwJY CPU wkdY? Memory wkdY? Power supply wkYd?
Output interface wkdY rysufpD;ygbl;/

The more you learn about PLCs, the more you will be able to solve other control problems.
-7-
U Soe Tint Siemens PLC S7-200

S7-200 u Compact PLC jzpfwJYtwGuf tpdwftykdif;wpfck ysufwmeJY PLC wpfck


vkH; topfvJvS,f&ygw,f/ Program ukd topfa&;xnfh&ygw,f/
S7-300 eJY S7-400 wkdYu Modular PLC jzpfvkdY ysufpD;oGm;wJY tpdwftykdif; Module
wpfckcsif;pDukd topfvJvS,fvkdY &ygw,f/ CPU module rysufpD;&if program topfa&;
xnfhp&m rvkdyg/

PLC ukd Power Supply, CPU, Memory, Input Interface, Output Interface wkdYeJY
zGJUpnf;xm;ygw,f/
Compact PLC jzpfwJY S7-200 CPU224 AC/DC/RLY rSm tJ'D tpdwftykdif;awGukd
circuit jym;wpfckwnf;ay:rSm pkaygif;wwfqifwnfaqmufxm;ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
-8-
U Soe Tint Siemens PLC S7-200

PLC ukd pwifavYvmwJYolawGtwGuf tajccHodxm;&r,fh memory 3-rsKd; &Sdygw,f/


1/ Input image memory
2/ Output image memory eJY
3/ Internal memory wkdY jzpfMuygw,f/
Memory taBumif;udk ajym&&if RAM (Random Access memory) eJU EEPROM
(Electrically Errasible Programmable Read Only Memory) qdkNyD; ESpfrsdK;&Sdygw,f/ RAM
csnf;omygwJY PLC rSmqdk&if "gwfcJ backup battery xnfhay;xm;&ygw,f/ 'grSom PLC
&JU power supply jywfawmufoGm;wJYtcgrsKd;rSm user program udk qufvufodrf;qnf;
xm;Edkifygw,f/ 'DvkdrSr[kwfcJY&ifawmh user program wckvHk; aysmufqHk;oGm;ygw,f/
EEPROM udk oHk;xm;wJY PLC jzpfcJY&if "gwfcJryg&Sdygbl;/ RAM udk volatile memory vdkY
ac:NyD; olYxJrSmrSwfxm;wJY data awG[m power supply &Sdaeoa&GUom wnfNrJaeEdkifyg
w,f/ EEPROM udkawmh non-volatile memory vdkY ac:ygw,f/ Data awGudk power
supply r&Sd&ifvnf; rSwfom;odrf;qnf;xm;Edkifygw,f/
Sensor awGuay;ykdYwJY signal ukd PLC em;vnfvufcHEkdifwJY data jzpfatmif Input
interface u aqmif&Gufygw,f/ Input terminal rSm signal r&Sd&if Input image memory
rSm 0 vkdY a&;rSwfNyD;? Input terminal rSm signal &Sd&if Input image memory rSm 1 vkdY a&;
rSwfygw,f/ Input terminal u input memory ukd update vkyfygw,f/
Input terminal 0.0 rSm signal &Sdae&if input image memory I0.0 rSm 1 (ON) jzpfae
ygw,f/ Input terminal 1.5 rSm signal &Sdae&if input image memory I1.5 rSm 1 (ON) jzpf
aeygw,f/
Output image memory Q0.0 [m 1 jzpfae&if output terminal 0.0 rSm ON condition
(contact closed) jzpfygw,f/ Output image memory Q1.1 [m 1 jzpfae&if output
terminal 1.1 rSm ON condition (contact closed) jzpfygw,f/
PLC ukd RUN vkduf&if user program ukd execute vkyfNyD;? &vmwJY result awGukd
oufqkdif&m memory awGrSm a&;rSwfygw,f/ PLC u program ukd execute vkyfNyD;
output memory rSm a&;rSwfxm;wJY bit &JU condition awGukd ON signal, OFF signal
jzpfatmif Output Interface u aqmif&Gufygw,f/ Output image memory rSm 0 vkdY a&;
xm;&if Output terminal ukd OFF signal xkwfay;ygw,f/ Output image memory rSm 1
vkdY a&;rSwfxm;&if Output terminal ukd ON signal xkwfay;ygw,f/
S7-200 CPU224 AC/DC/RLY [m Relay output jzpfwJYtwGuf contact output
xkwfay;ygw,f/ ON signal qkd&if contact closed jzpfapygw,f/ OFF signal jzpfae&if
contact open jzpfapygw,f/ Output memory u output terminal ukd update vkyfwmjzpf
ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
-9-
U Soe Tint Siemens PLC S7-200

I/O Memory & I/O Terminals

I0.0, I0.1, I1.0, I1.1 ponfjzifY I ukd Input Memory rSmxnfha&;ygw,f/ Input
Terminal ukdawmh 0.0, 0.1, 1.0, 1.1 vkdY I rygyJa&;ygw,f/
Q0.0, Q0.1, Q1.0, Q1.1 ponfjzifY Q ukd Output Memory rSmxnfha&;ygw,f/
Output Terminal ukdawmh 0.0, 0.1, 1.0, 1.1 vkdY Q rygyJa&;ygw,f/
S7-200 CPU224 AC/DC/RLY rSm Input Image Memory ukd Process-image input
register vkdY ac:a0:NyD; 8-bits ygwJY Byte tjzpf zGJUpnf;xm;ygw,f/ I0.0 to I0.7 rS I15.0
to I15.7 txd 16 Bytes yg&Sdygw,f/ wu,fokH;xm;wmu Input Terminal 14-ck (0.0 to
0.7, 1.0 to 1.5) twGuf I0.0 to I0.7 rS I1.0 to I1.5 txd Byte 0, Byte 1 2-ckom jzpfyg
w,f/ usefwJY Input Memory Byte awGu aemufxyfwkd;vmr,fh Input Terminal
twGuf jzpfygw,f/
S7-200 CPU224 AC/DC/RLY rSm Output Image Memory ukd Process-image
output register vkdY ac:NyD; Byte awGeJY zGJUpnf;xm;ygw,f/ Q0.0 to Q0.7 rS Q15.0 to
Q15.7 txd 16 Bytes yg&Sdygw,f/ wu,fokH;xm;wmu Output Terminal 10-ck (0.0 to
0.7, 1.0 and 1.1) twGuf Q0.0 to Q0.7 rS Q1.0 to Q1.1 txd Byte 0, Byte 1 2-ckom
jzpfygw,f/ usefwJY Output Memory Byte awGu aemufxyfwkd;vmr,fh Output
Terminal awGtwGufjzpfygw,f/
S7-200 CPU224 u trsm;qkH; I/O module 7-ck txd xyfwkd;vkdY &ygw,f/ xyfwkd;
Terminal awGtwGuf Memory Address ay;ykHay;enf;ukd pmrsufESm (28) wGifMunfhyg/
PLC wpfvkH;udk awGUwJhtcg? PLC ukd zGJYpnf;wnfaqmufxm;ykH Hardware ydkif;udk
pwifavYvm&ygw,f/ NyD;rS PLC u vkyfaqmif&r,fhvkyfief;wm0efawGjzpfwJh Software
ydkif; PLC Program udk avhvmzwf&I&rSmjzpfygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 10 -
U Soe Tint Siemens PLC S7-200

PLC Hardware

PLC rSm trsdK;tpm; ajrmufjrm;pGm &SdMuygw,f/ b,f PLC rSmyJjzpfjzpf wire quf
vdkY&wJh ikwf terminal awG yg&SdMuygw,f/ tJ'gawGuawmh Power supply terminal, Input
terminal, Output terminal eJY Programming Port wdkY jzpfMuygw,f/ Terminal qkdwm
signal tqkH;owfwJYae&m? signal tpjyKwJYae&mukd ac:wmjzpfNyD;? Port qkdwmuawmh
signal t0if? txGuf? vkyfwJYae&mukd ac:wmjzpfygw,f/
PLC wpfvHk;udk awGUwJhtcg yxrqHk; avhvm&rSmuawmh Power Supply and I/O
wkdY&JU Type and Size ukd odatmifvkyf&rSmjzpfygw,f/ I/O qkdwmu Input / Output jzpfyg
w,f/
Power supply &JU type qdkwmu tJ'D PLC udk AC power supply ay;&rSmvm;? DC
power supply ay;&rSmvm;? qdkwmudk cGJjcm;odzdkY jzpfygw,f/ S7-200 CPU224
AC/DC/RLY &JU power supply u 85 to 264VAC jzpfygw,f/ S7-200 CPU224
DC/DC/DC &JU power supply u 24VDC jzpfygw,f/
Power supply &JU size qkdwm tckaz:jycJYwJY DC24V wdkY AC 240V wkdYukd ajymwm
jzpfygw,f/
Input &JU type qkdwmu d.c signal vm;? a.c signal vm;? analog vm;? discrete vm;
qkdwm cGJjcm;odxm;zkdYjzpfygw,f/
PLC u vufcHwJY discrete signal (digital signal) rSm DC 24V signal eJY AC 110V or
AC 220V signal qkdNyD; AC eJY DC ESpfrsKd; &Sdygw,f/


AC 110V signal input type

The more you learn about PLCs, the more you will be able to solve other control problems.
- 11 -
U Soe Tint Siemens PLC S7-200


DC 24V signal input type

Input &JU size qkdwmu input signal &JU yrmP jzpfygw,f/ S7-200 CPU224
AC/DC/RLY &JU input signal u 24VDC jzpfygw,f/

Output &JU type qkdwmu Relay output or Transistor output ukdajymwmjzpfygw,f/


Output &JU size qkkdwmu Output signal u xrf;aqmifEkdifwJY0ef Load current jzpfyg
w,f/ S7-200 CPU224 AC/DC/RLY u Relay output jzpfNyD;? xrf;aqmifEkdifwJY0ef Load
current u 2A jzpfygw,f/
S7-200 CPU224 DC/DC/DC u Transitor output jzpfNyD;? xrf;aqmifEkdifwJY0ef Load
current u 0.75A jzpfygw,f/
PS & I/O, Type & Size ukd odatmift&ifvkyf&r,fvkdY twkkdcsKyfrSwfxm;yg/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 12 -
U Soe Tint Siemens PLC S7-200

PLC ukd tckrSpwifavhvmr,hf olawGtwGuf &nf&G,fNyD; Siemens u xkwfvkyfwJY


Compact PLC jzpfwJY Simatic S7-200 CPU224 AC/DC/RLY taMumif;ukd em;vnf&
vG,fulatmif? ykHawGukdyg xnfhoGif;az:jyxm;ygw,f/ Siemens PLC S7-200 CPU224
ukd Input, Output, Power supply, CPU eJY Memory wkdYtm;vkH;ukd wpfwkH;wpfcJxJ jzpf
atmifaygif;pkNyD; wnfaqmuf xm;ygw,f/ Simatic S7-200 CPU224 rSm CPU224
AC/DC/RLY eJY CPU224 DC/DC/DC qkdNyD; ESpfrsKd;&Sdygw,f/
CPU224 AC/DC/RLY rSm ygwJY AC/DC/RLY &JU t"dyg,fu tJ'D PLC ukd ay;oGif;
&r,fh Power supply u AC jzpfNyD; 85V to 264V jzpfygw,f/ PLC ukd ay;oGif;&r,fh
Input signal u DC jzpfNyD; 24V discrete signal jzpfygw,f/ PLC u xkwfay;wJY Output
signal uvnf; discrete signal jzpfNyD; Relay output jzpfygw,f/ Discrete signal udk
digital signal vkdYvnf; ac:Muygw,f/
(Discrete signal qdkwmu signal yrmPukd az:jyjcif;r&SdyJ? signal &Sdwm? r&Sdwm
ukdom cGJjcm;az:jyygw,f/ Signal &SdwJYtaetxm; ON state (1) eJY signal r&SdwJhtae
txm; OFF state (0) qkdwJh tajctae ESpfrsdK;ukdom az:jywJh signal trsdK;tpm;jzpfyg
w,f/)
PLC ukd power supply ay;oGif;wJYtcg
L1 ukd live wire eJY qufoG,f&rSmjzpfygw,f/
N ukd neutral wire eJY quf&rSmjzpfygw,f/
(PE) ukd ground wire eJY qufoG,f&rSmjzpfygw,f/

eJY N ukd vGJrSm;NyD;qufxm;&if? ground csrxm;


L1
&if? bmjzpfrvJ/ PLC twGufuawmh bmrSrjzpfygbl;/
ykHrSeftwkdif;yJ tvkyfvkyfygw,f/ PLC ukd ukdifwG,fokH;pGJ
ol twGuf safety rjzpfvkdY owfrSwfxm;wJYtwkdif; quf
oG,f&ygw,f/ L1 eJY N ukd trSeftwkdif; qufxm;NyD;
PLC ukd ground csxm;rSom PLC ukd ukdifwG,ftokH;jyK
oltwGuf ab;uif;vkHNcKHrI safety &SdrSmjzpfvkdY owfrSwf
xm;wJYtwkdif; ground csxm;&ygw,f/ tE&m,fuif;&Sif;
a&; pHowfrSwfcsuf safety regulation ukd vkdufem&ygw,f/ PLC ukd ground csxm;cJY&if
signal eJYtwl a&mygvmwJY noise ukdvnf; avsmhusoGm;apygw,f/
Program a&;oGif;xm;wJY PLC ukd RUN xm;rSom PLC u tvkyf vkyfwmjzpfyg
w,f/ PLC xJukd program a&;oGif;zkdYtwGuf programming port yg&Sdygw,f/ S7-200
twGuf programming cable ukd PLC a&mif;wJYqkdifawGrSm 0,f,lvkdY&ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 13 -
U Soe Tint Siemens PLC S7-200

24V
24V

Sensor uay;ykdYwJY signal ukd PLC u vufcH&,lwJY Input terminal (0.0, 0.1, 0.2,
0.3, 0.4, 0.5, 0.6, 0.7; 1.0, 1.1, 1.2, 1.3, 1.4, 1.5) 14-ckeJY Common terminal (1M, 2M)
2-ckwkdY yg&Sdygw,f/ Sensor twGuf DC 24V xkwfay;wJY terminal (M, L+) yg&Sdygw,f/
M u negative terminal (ve) jzpfNyD; L+ u positive terminal (+ve) jzpfygw,f/ 1M
ukd +ve eJY qufxm;NyD;? 2M ukd ve eJY qufjyxm;ygw,f/ ve eJYquf xm;&if sink
input jzpfNyD; +ve eJY qufxm;&if source input jzpfygw,f/

PLC u signal xkwfay;wJY Output terminal (0.0, 0.1, 0.2, 0.3; 0.4, 0.5, 0.6; 0.7;
1.0, 1.1) 10-ckeJY Common terminal (1L, 2L, 3L) 3-ckwkdY yg&Sdygw,f/ u PLC xJrSm
qufoG,frIr&SdwJY (no connection) terminal tvGwfjzpfygw,f/

Mode Selector Switch


STOP, TERM, RUN
Expansion Port

Analog Potentiometer
0&1

I/O ukd xyfrHwkd;csif&if wkd;vkdY&atmif Expansion Port yg&Sdygw,f/


Analog potentiometer 0 eJY Analog potentiometer 1 2-ck yg&Sdygw,f/
Mode selector switch yg&SdNyD; PLC ukd RUN eJY STOP ajymif;ay;vkdY &ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 14 -
U Soe Tint Siemens PLC S7-200

SIMATIC S7-200 CPU224 AC/DC/RLY

Output Terminals Power Supply

Expansion Port
Mode Selector Switch
STOP, TERM, RUN

Analog Potentiometer
0&1

Programming Port Input Terminals Supply for Sensors


PPI DC 24V / 280mA
24V
24V

The more you learn about PLCs, the more you will be able to solve other control problems.
- 15 -
U Soe Tint Siemens PLC S7-200

PLC Specification

The more you learn about PLCs, the more you will be able to solve other control problems.
- 16 -
U Soe Tint Siemens PLC S7-200

S7-200 CPU224 wGif program a&;EkdifwJY memory area u 4096 words jzpfNyD;?
tJ'DrSm a&;xm;wJY user program ukd EEPROM xJrSm odrf;qnf;xm;ygw,f/ RAM
xJu data awGukd 7-&ufcefY raysmufrysufyJ xdef;odrf;xm;EkdifzkdYtwGuf super capacitor
yg&Sd ygw,f/
Internal relays vkdYac:wJY internal memory bits aygif; (MB0 to MB31) 256 bits,
Counter aygif; (C0 to C255) 265 words eJY Timer aygif; (T0 to T255) 256 words wkdY
yg&Sdygw,f/
Real-time clock (RTC) vkdYac:wJY jyu'def yg&SdNyD;? rdrd program ukd wyg;olMunfhvkdY
r&atmifvnf; password eJY ydwfxm;vkdY &ygw,f/
Password level 4-rsKd; &Sdygw,f/ Password eJY ydwfrxm;wmukd Level 1 vkdY ac:yg
w,f/ Level 2 eJY ydwfxm;&if PLC xJu program ukd ,lMunfhvkdY &ygw,f/ PLC xJukd
program a&;xnfhvkdYawmh r&ygbl;/ Password eJY zGifhNyD;rSom PLC xJukd program
a&;xnfhvkdY &ygw,f/ Level 3 eJY ydwfxm;&if PLC xJu program ukd ,lMunfhvkdYvnf;
r&? PLC xJukd program a&;xnfhvkdYvnf; r&ygbl;/ Password eJY zGifhNyD;rSom PLC xJu
program ukd ,lMunfhvkdYvnf;&? a&;xnfhvkdYvnf; &ygw,f/ Level 4 eJY ydwfxm;&if PLC
xJu program ukd password eJY zGifhNyD;,lMunfhvkdYukd r&awmhygbl;/
Password eJY ydwfxm;cJY&if rdrd program ukd ul;,ltokH;jyKvkdY r&ayr,fh zsufypfvkdY
awmh &ygw,f/
Password eJY ydwfxm;csif&if View Component System Block Password
Privileges wGif BudKufwJY Level ukd a&G;jc,fyg/ Password a&;xnfhNyD;? xyfrHtwnfjyK
ay;yg/ OK Download to PLC vkyfyg/
Password arYaevkdY&Sd&if PLC Clear Program Block, System Block, Data
Block wkdYukd select vkyfNyD;? OK Password awmif;&if CLEARPLC vkdYa&;NyD;
Clear All vkyfyg/
rdrda&;xm;wJY program ukd wyg;olzGifhMunfhvkdY r&atmif save xm;csif&ifvnf;
password eJY save xm;vkdY &ygw,f/
Password eJY ydwfxm;csif&if File Set Password Password-protect this project
ukd check vkyf Password ae&mrSm p.w a&;? Verify ae&mrSm p.w xyfa&;? OK
ESdyfyg/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 17 -
U Soe Tint Siemens PLC S7-200

Password Level 4-rsKd ;

Password okH;r,fqkd&if PLC eJY avYusifYxm;zkdYvkdtyfygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 18 -
U Soe Tint Siemens PLC S7-200

Part 1

HARDWARE AND SOFTWARE

INSTALLATION

The more you learn about PLCs, the more you will be able to solve other control problems.
- 19 -
U Soe Tint Siemens PLC S7-200

Installing an S7-200 PLC


PLC ukd control panel twGif;rSmwwfqifwJYtcg
*&kjyK&r,fhtcsufawGuawmh?
1. S7-200 CPU224 [m obm0twkdif;tat;cHwJYpepfukd tokH;jyKNyD;xkyfykd;xm;wm
jzpfvkdY av0ifavxGufaumif;atmif PLC &JU ab;b,fnm? txufatmuf ae&mvGwf
1-vufr (25mm) cefY csefxm;&ygr,f/ av0ifavxGufraumif;vkdY PLC &JUtylcsdef jrifh
wufvm&if PLC oufwrf;wkdygw,f/

a&SUrsufESmpm Front View ab;wkduf Side View


2. 0g,m quf&wmvG,fulatmif pDpOfxm;&ygr,f/
3. S7-200 PLC ukd 0g,mt&G,ftpm; 14 AWG to 22 AWG (1.5mm2 to 0.5mm2)
qufvkdY &ygw,f/
4. Wire qufwJYikwfu screw awGukd screw driver eJY vSnfhMuyfwJYtcg vSnfhtm;
torque ukd 5 inch-pound (0.56 N-m) cefY&Sd&ygr,f/
5. Signal wire ukd cyfwkdwkdokH;yg/ jzpfEkdif&if 0g,mt&Snf rDwm 300 xuf ykdr&Snf
ygapeJY/
6. Signal wire ukd shielded twisted cable ukd okH;yg/ Shield ukd sensor bufjcrf;rSm
ground csyg/ Shield ukd 2-zufpvkH;rSm ground cs&if ground loop jzpfay:apygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 20 -
U Soe Tint Siemens PLC S7-200

Ground loop jzpfaeovm;qdkwmodcsif&ifatmufygtwkdif; ground wire ukd jzKwfNyD;


ohm meter eJY wkdif;Munfhyg/

'D
ukd

'DvkdjzKwfNyD;

'Dvkdwkdif;yg

'Dvdk wdkif;MunfhvdkY tkrf; ohm jycJh&if


ground loop &dSaeygw,f/

Procedure for identifying ground loops

Sensor awGu vmwJY 0g,mawGukd jzKwf&? wwf&vG,fatmif atmufrSmaz:jy


xm;wJY Fan-Out Connector ukd tokH;jyKvkdY&ygw,f/

PLC input terminal

The more you learn about PLCs, the more you will be able to solve other control problems.
- 21 -
U Soe Tint Siemens PLC S7-200

Removable Terminal Block Connector

Removable Terminal Block Connector for the CPU 224

S7-200 CPU224 &JU Input/Output wire awGukd txufykHrSmaz:jyxm;ovkd


0g,mawGukd rjzKwfyJ terminal block ukd jzKwfvkdY &ygw,f/ Terminal block &JU tv,f
em;rSm screw driver tjym;tao;eJY xkd;aumfzkdY tcsKdifh slot av; yg&Sdygw,f/
Terminal block wckvkH;ukd jzKwfvkdufwmjzpfvkdY wire connection awGukd rSwfxm;
p&mrvkdawmhygbl;/ rSm;vnf;rrSm;Ekdifawmhygbl;/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 22 -
U Soe Tint Siemens PLC S7-200

Guidelines for AC Power Supply Installation

No Fuse Breaker

AC Load

Discrete Input Discrete Output


Module Module

Stepdown Transformers

Isolation Transformer

The more you learn about PLCs, the more you will be able to solve other control problems.
- 23 -
U Soe Tint Siemens PLC S7-200

PLC twGuf power supply ukd isolation transformer okH;NyD; qufoG,fxm;wmukd


ykHawGrSmaz:jyxm;ygw,f/ Isolation transformer ukd okH;xm;&if power line u ygvm wJY
surge voltage &JU effect ukdvnf; avsmhusoGm;apygw,f/

PLC ukd RUN rS CR1 u energize jzpfygw,f/ CR1 = ON jzpfrS control section ukd
power supply a&mufatmifpDrHxm;wmjzpfvkdY taMumif;wckckaMumifh PLC Stop jzpfoGm;
cJY&if control section ukd power jzwfvkdufwJYtwGuf safety jzpfapygw,f/
S7-200 PLC &JU instruction code xJrSmygwJY STOP qkdwJY instruction ukd okH;NyD;
atmufygtwkdif; a&;xm;cJY&if I/O system rSm wckckrSm;,Gif;wJYtcg PLC ukd Stop vkyf
vkdufygw,f/ I/O error jzpf&if SM5.0 u ON jzpfygw,f/

CR1 = ON to OFF jzpfvkdY ay:aygufvmwJY back emf &JU 'Pfukd Surge Suppressor
u umuG,fay;ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 24 -
U Soe Tint Siemens PLC S7-200

The more you learn about PLCs, the more you will be able to solve other control problems.
- 25 -
U Soe Tint Siemens PLC S7-200

I/O Expansion

S7-200 CPU224 wGif Input expansion module eJY Output expansion module wkdYukd
wkd;csJUwwfqifvkdY &ygw,f/ I/O expansion module 7-cktxd wwfqifvkdY &ygw,f/

I/O Module rSm toifhygvmwJY BudK;eJYqufoG,fxm;wJYykH

Module 2-ck Mum;rSm BudK;ukd acgufodrf;NyD;? Module 2-ckukd yl;uyfxm;wJYykH

I/O module eJY main module ukd Control Panel xJrSm yl;uyfwwfr,fqkd&if txuf
ykHrSm jyxm;ovkd olUe*kdygwJY cable ukd okH;NyD;wwfqif&ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 26 -
U Soe Tint Siemens PLC S7-200

Typical Installation of an I/O Expansion Cable

I/O module eJY main module ukd Control Panel xJrSm txufatmuf cGJwwfr,f
qkd&if txufykHrSm jyxm;ovkd expansion cable ukd xyfrH0,f,lNyD; wwfqif&ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 27 -
U Soe Tint Siemens PLC S7-200

Sample I/O Addresses for Local and Expansion I/O (CPU 224)

CPU 224 4 IN / 4 OUT 8 IN

S7-200 CPU224 ukd 4 In / 4 Out expansion module eJY 8 In expansion module wkdYukd
wwfqifvkdufwJYtcg I/O memory awG&JU address ukd atmufaz:jyygtwkdif; a&;&yg
w,f/ Main PLC module CPU224 rSm I/O 24-ck yg&Sdygw,f/ 4if;ukd Local I/O vkdYac:yg
w,f/

Not
Used

Input Terminal 14-ck eJY Output Terminal 10-ck jzpfyg


w,f/ Main module twGuf Input memory I0.0 to I0.7, I1.0 to I1.5 txd eJY Output
memory Q0.0 to Q0.7, Q1.0, Q1.1 wkdY jzpfMuygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 28 -
U Soe Tint Siemens PLC S7-200

Not Used

ykHrSmjyxm;wJY I/O expansion module ukd CPU224 rSm xyf


rHqufoG,fvkdufwJYtcg Input terminal 4-ck eJY Output terminal 4-ck xyfwkd;vmygw,f/
4if; expansion module twGuf address a&;&if I2.0 to I2.3 eJY Q2.0 to Q2.3 txdom
a&;vkdY &ygw,f/

ykHrSmjyxm;wJY Input expansion module ukd CPU224 rSm xyfrH


qufoG,fvkduf&if Input terminal 8-ck xyfwkd;vmygw,f/ 4if;wkdYukd address a&;&if I3.0
to I3.7 txdom a&;vkdY&ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 29 -
U Soe Tint Siemens PLC S7-200

PLC &JU input terminal rSm qufoG,ftokH;jyKEkdifwJYypnf; Input Devices awGukd


Sensor vkdY ac:ygw,f/ atmufrSmaz:jyxm;ygw,f/
Input Devices

Pushbutton N.O (Contact Form A) qkdwmu pushbutton ukd ESdyfrS


N.O
contact u closed jzpfygw,f/ rESdyf&if contact u open jzpfaeygw,f/ N.O ukd Non-
activate Open vkdY ac:ygw,f/

Pushbutton N.C (Contact Form B) qkdwmu pushbutton ukd ESdyfrS


N.C
contact u open jzpfygw,f/ rESdyf&if contact u closed jzpfaeygw,f/ N.C ukd Non-
activate Closed vkdY ac:ygw,f/

Pushbutton Make-Break (Contact Form C) Contact Form C u N.O a&m


N.C yg 2-rsKd;ygwJY pushbutton trsKd;tpm;jzpfygw,f/

Selector Switches u xm;wJYae&m position rSm


qufvuf wnf&Sdaeygw,f/ Maintained contact vkdY ac:ygw,f/ N.O, N.C r&Sdyg/
Pushbutton N.O u ESdyfxm;wkH; ceom ON jzpfNyD;? ESdyfxm;wmukd jyefvTwfvkdufwJY
tcg OFF jyefjzpfoGm;ygw,f/ Pushbutton N.C u ESdyfxm;wkH; ceom OFF jzpfNyD;? ESdyf
xm;wmukd jyefvTwfvkdufwJYtcg ON jyefjzpfoGm;ygw,f/ tJ'DvkdjzpfvYkd momentary
contact vkdY ac:ygw,f/

Toggle Switches Maintained contact jzpfygw,f/ N.O,


N.C r&Sdyg/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 30 -
U Soe Tint Siemens PLC S7-200

Rocker Switches Maintained contact jzpfygw,f/ N.O, N.C r&Sdyg/

Leaf Switches Momentary contact


jzpfygw,f/ N.O eJY N.C 2-rsKd;&Sdygw,f/

Limit Switch Momentary contact jzpfygw,f/ N.O eJY N.C 2-rsKd;&Sdyg


w,f/

Level Switches Momentary contact jzpfygw,f/ N.O eJY


N.C 2-rsKd; &Sdygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 31 -
U Soe Tint Siemens PLC S7-200

Pressure switches Momentary contact jzpfygw,f/ N.O eJY


N.C 2-rsKd; &Sdygw,f/

Photoelectric Sensors Momentary contact jzpfyg


w,f/ N.O eJY N.C 2-rsKd; &Sdygw,f/

Proximity Sensors Momentary contact jzpfygw,f/


N.O eJY N.C 2-rsKd; &Sdygw,f/

Capacitive proximity sensors


Momentary contact jzpfygw,f/ N.O eJY N.C 2-rsKd; &Sdygw,f/

Magnetic reed switch Momentary contact


jzpfygw,f/ N.O eJY N.C 2-rsKd; &Sdygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 32 -
U Soe Tint Siemens PLC S7-200

Motor Starter Contacts Momentary contact jzpfygw,f/ N.O eJY


N.C 2-rsKd; &Sdygw,f/

Relay Contacts
Momentary contact jzpfygw,f/ N.O eJY N.C 2-rsKd; &Sdygw,f/

Thumbwheel Switches Maintained contact jzpfyg


w,f/ N.O, N.C r&Sdyg/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 33 -
U Soe Tint Siemens PLC S7-200

PLC &JU output terminal rSm qufoG,ftokH;jyKEkdifwJYypnf; Output Devices awGukd


Actuator vkdY ac:ygw,f/ atmufrSmaz:jyxm;ygw,f/

Output Devices

Motor Starters Heavy Duty contact output


xkwfay;ygw,f/ Overload contact vnf; yl;wGJyg&Sdygw,f/

Solenoids Heavy duty load


motion xkwfay;ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 34 -
U Soe Tint Siemens PLC S7-200

Solenoid Valves Valve tzGifh? tydwf? vkyfay;ygw,f/

Control Relays Medium duty contact output xkwfay;ygw,f/

Alarms pl;&SwJYtoH siren ukd xkwfay;ygw,f/

Lights tvif;a&mif light ukd xkwfay;ygw,f/

Horns us,favmifwJY horn oHukd xkwfay;ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 35 -
U Soe Tint Siemens PLC S7-200

Programmable Logic Controller I/O connection diagram

Power
Supply

The more you learn about PLCs, the more you will be able to solve other control problems.
- 36 -
U Soe Tint Siemens PLC S7-200

Commons and Relay Output Terminals

u bmqufoG,frIrSr&SdwJY no connection jzpfygw,f/


Output terminal 10-cku 1L, 0.0, 0.1, 0.2, 0.3; 2L, 0.4, 0.5, 0.6; 3L, 0.7, 1.0, 1.1 wkdY
jzpfMuygw,f/ 1L, 2L, 3L wkdYu common terminal awGjzpfMuygw,f/
S7-200 CPU224 AC/DC/RLY &JU output u relay output (contact output) jzpfyg
w,f/ Sink vkdvnf; qufvkdY&ygw,f/ Source vkdvnf; qufoG,fvkdY&ygw,f/ AC load
eJYvnf; qufoG,fvkdY&ygw,f/ DC load eJYvnf; qufoG,fvkdY&ygw,f/ tJ'D t"dyg,fukd
ykHrSmaz:jyxm;wmjzpfygw,f/
24V
24V

Commons and 24VDC Input Terminals

14-cku 1M, 0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6; 3L, 0.7, 2M, 1.0, 1.1,
Input terminal
1.2, 1.3, 1.4, 1.5 wkdY
jzpfMuygw,f/ 1M, 2M wkdYu common terminal awG jzpfMuygw,f/
Power Supply ukd AC voltage ay;oGif;&NyD; input signal u DC type jzpfcJh&if tJ'D
DC voltage udk PLC xJuae xkwfay;avh&Sdygw,f/ ykHrSm M eJY L+ u sensor twGuf
DC24V, 280mA xkwfay;ygw,f/ M u 24V &JU () jzpfNyD;? L+ u 24V &JU (+) jzpfyg
w,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 37 -
U Soe Tint Siemens PLC S7-200

S7-200 CPU224 AC/DC/RLY &JU input signal type u DC 24V input jzpfygw,f/
Sink vkdvnf; qufvkdY&ygw,f/ Source vkdvnf; qufoG,fvkdY&ygw,f/
ykHrSm 1M ukd +24V eJYqufxm;vkdY source input jzpfygw,f/ Sink output (NPN)
sensor awGeJY qufoG,ftokH;jyK&ygw,f/
ykHrSm 2M ukd 24V eJYqufxm;vkdY sink input jzpfygw,f/ Source output (PNP)
sensor awGeJY qufoG,ftokH;jyK&ygw,f/
Input &JU common terminal 1M ukd positive potential ay;vkdufwJYtcg signal current
direction u PLC to Sensor jzpfygw,f/ PLC &JU input terminal uae tjyifukd pD;xGuf
wmjzpfvkdY Source Input vkdY ac:wmjzpfygw,f/
Input &JU common terminal 2M ukd negative potential ay;vkdufwJYtcg signal
current direction u Sensor to PLC jzpfygw,f/ DC current direction u PLC &JU input
terminal xJukd tjyifuae pD;0ifwmjzpfvkdY Sink Input vkdY ac:wmjzpfygw,f/
Output &JU common terminal 1L ukd positive potential ay;vkdufwJYtcg signal
current direction u PLC to Actuator jzpfygw,f/ PLC &JU output terminal uae
tjyifukd pD;xGufwm jzpfvkdY Source Output vkdY ac:wmjzpfygw,f/
Output &JU common terminal 2L ukd negative potential ay;vkdufwJYtcg signal
current direction u Actuator to PLC jzpfygw,f/ PLC &JU output terminal xJukd
tjyifuae current pD;0ifwm jzpfvkdY Sink Output vkdY ac:wmjzpfygw,f/
Output &JU common terminal 3L ukd AC eJY qufoG,fxm;&if Sink, Source rjzpf
ay:ygbl;/ Sink, Source qkdwm worwfwnf;pD;aewJY DC eJYom oufqkdifygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 38 -
U Soe Tint Siemens PLC S7-200

Programming Software Installation


STEP 7 MicroWIN V4.0 SP3

STEP 7 MicroWIN V4.0 SP3 ukd computer xJrSm install vkyfawmhr,fqkd&if?


1/ CD xJu STEP 7 MicroWIN V4.0 SP3 ukd Computer desktop ay:t&iful;
wifyg/
1. Copy STEP 7 MicroWIN folder from CD and paste on Desktop.

2/ STEP 7 MicroWIN folder udk double click vkyfyg/

2. Double click on STEP 7 MicroWIN folder icon

3/ Setup.exe udk double click vkyfyg/

3. Double click on setup.exe

Click on OK
4/ ay:vmwJh Choose Setup Language wGif English ukd a&G;NyD; OK ukd click yg/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 39 -
U Soe Tint Siemens PLC S7-200


Click on Yes
5/ oifY Computer u Windows XP r[kwfvkdYf Cancel Setup qkdwmay:vm&if Yes
ukd ESdyfyg/ (Windows 7 jzpfaevkdY Cancel Setup ay:vmwmjzpfygw,f/ Windows XP
qkd&if ray:ygbl;/)

Click on Next
6/ ay:vmwJh Install Shield Wizard wGif Next ukd click vkyfyg/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 40 -
U Soe Tint Siemens PLC S7-200


Click on Yes
7/ ay:vmwJh License Agreement wGif Yes ukd ESdyfyg/


Click on Next
8/ Next ukd ESdyfyg/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 41 -
U Soe Tint Siemens PLC S7-200

Click on Yes
oifY Computer u Windows 7 jzpfae&if Cancel Setup qkdwmay:vmwJYtcg Yes
ukd ESdyfyg/ (Windows 7 jzpfaevkdY Cancel Setup ay:vmwmjzpfygw,f/ Windows XP
qkd&if ray:ygbl;/)
STEP 7 MicroWIN V4.0 SP3 u Windows XP ay:rSmom Run vkdY &ygw,f/
'gayr,fY Windows 7 32-bit OS ay:rSm install vkyfvkdY &ygw,f/ PC ay:rSm Program
vnf; a&;vkdY&ygw,f/ PC eJY PLC ukdawmY communicate vkyfvkdY r&ygbl;/ qkdvkdwmu
PLC xJukd program a&;xnfhvkdY r&ygbl;/

rSwfcsuf / / STEP 7 MicroWIN V4.0 SP9 u Windows 7 ay:rSm Run vdkY&w,fvkdY


Website rSmawGU&ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 42 -
U Soe Tint Siemens PLC S7-200

The more you learn about PLCs, the more you will be able to solve other control problems.
- 43 -
U Soe Tint Siemens PLC S7-200

Click on OK
9/ OK ukd ESdyfyg/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 44 -
U Soe Tint Siemens PLC S7-200

Click on Finish
10/ Finish ukd ESdyfyg/

'gqkd&if Programming Software udk computer xJrSm install vkyfwm NyD;oGm;NyDjzpfyg


w,f/

rSwfcsuf / / Windows 7 & 8 wkdYrSm STEP 7 MicroWIN V4.0 SP3 ukd Run csif&if
Windows OS ay:rSm VMWare (Virtual Machine Software) ukd t&if
install vkyfyg/ NyD;&if Windows XP ukd VMWare ay:rS m install vkyfyg/
'gqkd&if STEP 7 MicroWIN V4.0 SP3 ukd Windows XP ay:rSm install
vkyfNyD; PLC eJY communicate vkyfvkdY &ygNyD/ Cable driver ukd Windows XP
ay:rSm install vkyfzkdYrarY ygeJY/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 45 -
U Soe Tint Siemens PLC S7-200

Desktop udk jyefoGm;Munhf&if Screen ay:rSm V4.0 STEP 7 MicroWIN qkdwJh


shortcut icon ay:aewmukd awGU&ygvdrhfr,f/ 4if;ESifYtwl V1.0 S7-200 Explorer eJY
V1.0 TD Keypad icon awGvnf;&Sdaeygw,f/

Desktop ay:rSm ay:vmwJY shortcut icon awGtxJu V4.0 STEP 7 MicroWIN

ukd csefxm;NyD; V1.0 S7-200 Explorer eJY V1.0 TD Keypad icon awGukd
zsufypfyg/ (Delete shortcut vkyfyg)

The more you learn about PLCs, the more you will be able to solve other control problems.
- 46 -
U Soe Tint Siemens PLC S7-200

Desktop ay:u ukd double click (D.C) vkyfyg/

STEP 7-Micro/WIN Version 4.0 IEC 1131-3 qkdwm ay:vmygw,f/ 'D


programming software u IEC (International Electrotechnical Commission) u owf
rSwfxm;wJY IEC instruction code awGeJYvnf; a&;vkdY&ygw,f/ Siemens AG u olY PLC
twGuf olYoabmeJYol owfrSwfxm;wJY instruction code awGukd SIMATIC instruction
code vkdY ac:ygw,f/ IEC u PLC Manufacturer awGeJY nSdEIdif;wkdifyifNyD;rS a&;qGJowf
rSwfxm;wJY instruction code awGukdawmY IEC 1131-3 instruction code vkdY ac:ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 47 -
U Soe Tint Siemens PLC S7-200

Cursor
Instruction code pa&;&r,fYae&m

SIMATIC LAD qkdwmu Siemens &JU SIMATIC Instruction Code eJYa&;wJY Ladder
Diagram Programming Language jzpfygw,f/

'D work space &JU nmbufrSm vertical line ryg&Sdwmudk owdjyKyg/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 48 -
U Soe Tint Siemens PLC S7-200

erlem a&;jyxm;wJY program jzpfygw,f/

'D program &JU nmbufjcrf;rSm vertical line ryg&Sdwmudk owdjyKyg/ 'D program &JU
b,fbufjcrf;rSmyg&SdwJY vertical line udk instruction code pwifa&;&r,fYae&mvkdY rSwf
om;xm;yg/
Program ukd bmomjyefenf;? t"dyg,faz:enf;ukd 'DpmtkyfrSm tao;pdyf&Sif;jyxm;
ygw,f/ a&;om;az:jywJYae&mrSm t*Fvdyfpm? jrefrmpm? eJY &kyfykHawGukd olUae&meJYol
aygif;pyfNyD; t"dyg,f&Sif;atmif Hybrid enf;eJY a&;xm;ygw,f/
Siemens PLC S7-200 ukd pwifavYvmoif,lolrsm; 'Dpmtkyfukd zwfNyD; em;rvnf
wm? r&Sif;wm? &Sd&if soetintengineer@gmail.com okdY pma&;ar;jref;eKdifygw,f/
uRrf;usifolrsm;u 'Dpmtkyfukd zwfNyD; cRwfacsmfwdrf;apmif;wm? rSm;,Gif;wm? awGU&Sd
cJYyg&ifvnf; a0zefaxmufjyMuyg&ef (trSm;jyifay;Muyg&ef) arwm&yfcHygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 49 -
U Soe Tint Siemens PLC S7-200

Program
Writing on Computer and
Downloading to PLC

Programming Port uawmh data awG t0iftxGufvkyfwmjzpfvdkY Port vdkY ac:wm


jzpfygw,f/ PLC xJudk program a&;xnfhwJhtcg? Computer eJY qufoG,f&wJh port jzpfvdkY
rdkY Programming Port vdkY ac:ygw,f/
Programming cable udk PLC xkwfvkyfwJh OEM qDu? 0,f,ltoHk;jyKMu&ygw,f/
PLC eJY Computer udk Programming cable eJY qufoG,fNyD; PLC xJ a&;xnfhxm;wJh
Program udk User Program vdkY ac:ygw,f/ Application Program vdkYvnf; ac:ygw,f/
Siemens PLC xJukd program a&;xnfhr,fqkd&if Computer eJY ykHrSmjyxm;wJYtwkdif;
RS-232/PPI cable okdYr[kwf PC/PPI cable eJYqufoG,f&ygw,f/ 'DvkdqufoG,fwJY cable
ukd programming cable vkdY ac:ygw,f/ PLC xJu program ukd zwfMunfhcsif&ifvnf;
PC (computer) eJY PLC (S7-200) ukd programming cable eJY qufoG,f&ygw,f/ PC xJrSm
vnf; programming software ukkd installed vkyfxm;&ygw,f/
Computer xJrSm oufqkdif&m programming software wrsKd;rsKd;&SdaeNyD;? owfrSwfxm;
wJY programming cable eJY PLC ukd qufoG,fNyD;rSom PLC xJukd program a&;xnfhvkdY
&ygw,f/ PLC xJu program ukd zwfMunfhvkdY &ygw,f/
Siemens PLC wpfrsKd;jzpfwJY S7-200 twGuf PC eJY qufoG,fvkdY &wJY programming
cable ESpfrsKd;ukd ykHrSmaz:jyxm;ygw,f/ wpfrsKd;u RS232/PPI Multi-Master cable jzpfNyD;
aemufwpfrsKd;uawmY PC/PPI cable jzpfygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 50 -
U Soe Tint Siemens PLC S7-200

PC eJY PLC ukd programming cable ESifYqufoG,fr,fqkd&if cable driver software ukd
PC xJrSm t&if install vkyfxm;&ygw,f/
'DpmtkyfrSmS7-200 twGuf programming software wpfrsKd;jzpfwJY STEP 7
MicroWIN V4.0 SP3 ukd install vkyfykHvkyfenf;az:jyxm;ygw,f/

rSwfcsuf / / STEP 7 MicroWIN V4.0 SP3 eJY cable driver ukd 'DpmtkyfeJY twlygwJY CD
xJrSm xnfhay;xm;ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 51 -
U Soe Tint Siemens PLC S7-200

Part 2

PROGRAM READING

(TRANSLATION)

The more you learn about PLCs, the more you will be able to solve other control problems.
- 52 -
U Soe Tint Siemens PLC S7-200

Program Reading (Translation)

1. PLC program ukd a&;wwf? zwfwwfzkdYtwGuf PLC xJu program


taMumif;ukd t&ifqkH;odxm;zkdY vkdtyfygw,f/
Program ukd instruction code awGeJY a&;ygw,f/ S7-200 CPU224 ukd instruction
code ESpfrsKd;eJYa&;vkdY &ygw,f/ wpfrsKd;u SIMATIC instruction code jzpfNyD; aemufwpf
rsKd;u IEC instruction code jzpfygw,f/
SIMATIC Instruction Code qkdwmu Siemens AG u olU PLC twGuf
olYoabmeJYol owfrSwfay;xm;wJY instruction code awG jzpfMuygw,f/ wenf;ajym&
&if de facto standard jzpfygw,f/
IEC 61131-3 Instruction Code awG uawmY PLC xkwfvkyfolawGtcsif;csif;
nSdESKdif;wkdifyifNyD;awmYrS a&;qGJjy|mef;xm;wJY de jure standard jzpfygw,f/ vkyfaqmifykH
csif; wlwmawG&Sdovkd rwluGJjym;jcm;em;wmawGvnf; &Sdygw,f/
wdwdususod&zkdYtwGuf OEM (Origion Equipment Manufacturer) &JU Manual
awGukd zwfNyD; vufawGUavYvmzkdYvkdygw,f/ Manual rSm a&;xm;wmu Guideline
avmufomjzpfygw,f/ wdwdusus? aoaocsmcsm od&zkdYqkd&if ukd,fodcsifwJY
instruction code ukd program a&;NyD; PLC eJY vufawGYprf;Munfh zkdYvkdygw,f/

2. PLC xJ u memory taMumif ; aumif;aumif;odxm;&ygr,f/


PLC program ukd pwifavYvmwJYoltwGuf tajccHodxm;&r,fh memory 3-rsKd;
&Sdygw,f/ 1/ Input image memory 2/ Output image memory eJY 3/ Internal
memory wkdY jzpfMuygw,f/
PLC [m Industrial Computer wpfrsKd;jzpfygw,f/ 'gaMumifh PLC [m Machine
Language ukdom em;vnfygw,f/ Machine language ukd Binary Code eJY a&;ygw,f/
LD eJY a&;xm;wJh PLC program ukd STEP 7 MicroWIN u PLC em;vnfwJh machine
language jzpfatmif ajymif;ay;NyD; PLC xJu memory rSm a&;rSwfygw,f/
SIMATIC Instruction Code eJY program a&;r,fqkd&if programming language 3-rsKd;
jzpfwJY STL (Statement List), LAD (Ladder), FBD (Function Block Diagram) wkdYeJY a&;
vkdY &ygw,f/ LD (Ladder Diagram) ukd Siemens u LAD (Ladder) vkdY ac:ygw,f/ IL
(Instruction List) ukd Siemens u STL (Statement List) vkdY ac:ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 53 -
U Soe Tint Siemens PLC S7-200

3. LD eJY a&;wJY program rSm tajccHuswJY basic instruction code awGt


aMumif;ukd odem;vnfxm;&ygr,f/
Program ukd nTefMum;csuf instruction awGeJY pma&;ovkd a&;zGJYygw,f/ jrefrmpmukd
pmzwfolu em;vnfwJY jrefrmtu&moauFw coded symbol eJY a&;&ovkd LD
program ukdvnf; PLC u em;vnfwJY graphical coded symbol eJY a&;&ygw,f/
LD program wGif TefMum;csufoauFw instruction coded symbol awGukd relay
coil &JU oauFw symbol jzpfwJh ? relay contact &JU symbol jzpfwJh eJY ?
wkdYukd toHk;jyKNyD; a&;&ygw,f/
Open contact &JU symbol jzpfwJh ukd ON jzpfaeovm;vkdY ppfaq;
Munhfyg vkdY ckdif;wJh instruction code tjzpf toHk;jyKygw,f/ Examine ON vkdY ac:yg
w,f/
Closed contact &JU symbol jzpfwJh ukd OFF jzpfaeovm;vkdY ppfaq;
Munhfyg vkdY ckdif;wJh instruction code tjzpf toHk;jyKygw,f/ Examine OFF vkdY ac:yg
w,f/
Coil &JU symbol jzpfwJh udkawmh Output ukd ON vkdufyg vkdY ckdif;wJh
instruction code tjzpf toHk;jyKygw,f/ Output vkdY ac:ygw,f/
Software jzpfwJh PLC program (User Program) ukd a&;wJh zwfwJY tcg software udk
software tjzpf jrifatmifMunhfwwf&ygr,f/ Software qkdwmu rsufpdeJYvnf;jrifvkdY
r&wJh? xdvkdYukdifvkdYvnf;r&wJh? OmPfeJYom awG;MunhfNyD; odEkdifwJht&m jzpfygw,f/
Relay &JU coil qkdwmu rsufpdeJYvnf; jrifatmifMunhfvkdY &ygw,f/ vufeJYvnf; xd
MunhfvkdY&wJh hardware jzpfygw,f/ Open contact eJY closed contact awGuvnf;
hardware awGyJ jzpfMuygw,f/
LD program rS m ygwJ h contact eJY coil awG[m t"dyg,f&SdwJYoauFw coded
symbol awG o mjzpf y gw,f /
'gaMumifh LD program rSmazmfjyxm;wJh contact eJY coil oauFwawG[m hardware
ukd ukd,fpm;rjyKygbl;/ TefMum;csufawGukdom ukd,fpm;jyKazmfjyxm;wJY t"dyg,f&SdwJY
oauFw coded symbol jzpfygw,f/ Instruction code &JU oauFw symbol awGom jzpf
Muygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 54 -
U Soe Tint Siemens PLC S7-200

eJY a&;xm;wJY
4. LD instruction awGukd condition eJY execution cGJjcm;NyD;
odxm;&ygr,f/
Contact Symbol awGeJYa&;xm;wJhtydkif;udk conditional part (jzpf&r,fhtajctae)
ydkif;vdkY ac:ygw,f/ Read instruction awGjzpfMuygw,f/
Open contact u (ON jzpfae&r,f) vkdY t"dyg,f &wJY Coded Symbol jzpfyg
w,f/ Closed contact u (OFF jzpfae&r,f) vkdY t"dyg,f &wJY Coded Symbol
jzpfygw,f/
Coil Symbol awGeJY a&;xm;wJhtydkif;udk Executional part (vkyf&r,fhvkyfief;) ydkif;
vdkY ac:ygw,f/ Write instruction jzpfygw,f/
Coil symbol u (ON jzpfatmif vkyfvdkufyg) vkdY t"dyg,f&wJY Coded Symbol
jzpfygw,f/

5. Logical True eJ Y Logical False uk d aumif;aumif;em;vnfxm;&ygr,f/


Open contact (ON jzpfae&r,f) qdkwmu oufqkdif&m bit ukd (zwfNyD;) read
vkyfNyD; oufqkdif&m bit [m ON jzpfaeovm;vkdY (wkdufqkdifppfaq;) examine vkyfckdif;
wm jzpfygw,f/ 'gaMumifY ukd examine ON vkdY zwf&ygw,f/ ON jzpfaewmukd
awGYjrif&&if Logical True jzpfygw,f/
Closed contact (OFF jzpfae&r,f) qdkwmu oufqkdif&m bit ukd (zwfNyD;)
read vkyfNyD; oufqkdif&m bit [m OFF jzpfaeovm;vkdY (wkdufqkdifppfaq;) examine
vkyfckdif;wm jzpfygw,f/ 'gaMumifY ukd examine OFF vkdY zwf&ygw,f/ OFF jzpf
aewmukd awGYjrif&&if Logical True jzpfygw,f/
Coil symbol ( ) (ON jzpf a tmif vk y f v d k u f y g) qdkwmu owfrSwfxm;wJY
condition okdYr[kwf conditions awG&JU Logic result u True jzpfrS oufqkdif&m bit ae&m
rSm ON vkdY a&;rSwfckdif;wmjzpfygw,f/ ( ) ukdawmY Output vkdY zwf&ygw,f/
eJY u bit read instruction awGjzpfMuNyD;? ( ) u bit write instruction
jzpfygw,f/
Read instruction awGu ckdif;xm;wJYtajctaeeJY wlnDrI&Sdr&Sd wkdufqkdifppfaq;NyD;
wlnDcJY&if logical true jzpfygw,fvkdY logic result xkwfay;ygw,f/ wlnDrIr&SdcJY&ifawmh
logical false jzpfw,fvkdY logic result xkwfay;ygw,f/
Write instruction u logic result true jzpfrS ckdif;xm;wJYtvkyfukd aqmif&Gufygw,f/
Logic result u false jzpfae&if aqmif&GufrIrjyKygbl;/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 55 -
U Soe Tint Siemens PLC S7-200

6. Logic AND eJ Y Logic OR uk d aumif;aumif;em;vnfxm;&ygr,f/


PLC (Programmable Logic Controller) rSmoHk;xm;wJh logic qkdwmu Boolean Logic
ukd ajymwm jzpfygw,f/ PLC eJY ywfoufwJh Boolean logic function awGuawmh Logic
AND eJY Logic OR wkdY jzpfMuygw,f/

Logic AND

'DOyrmwGif Lamp = ON jzpfzdkYtwGuf Sw 1 a&m Sw 2 yg ON jzpf&ygr,f/ tJ'D


oabmt"dyg,fudk Boolean equation eJU a&;r,fqdk&if Lamp = (Sw 1) AND (Sw 2) vdkY
a&;&ygw,f/ 'Doabmt"dyg,fudkyJ Graphical symbol eJU azmfjyr,fqdk&if atmufyg
twdkif; azmfjyavh&Sdygw,f/

Sw 1 Sw 1
Lamp AND Lamp
Sw 2 Sw 2

'DyHkudk 2-input AND vdkU ac:ygw,f/


Logic AND qkdwmuawmh AND vkyfxm;wJh input tm;vHk; ON jzpfrS output u ON
jzpf&wJh oabmobm0 &Sdygw,f/ Logic AND qkdwmudk tm;vHk; ( All ) vkYd rSwfom;
xm;yg/ 'Doabm t"dyg,fudkyJ Truth Table eJU azmfjyr,fqdk&if

AND Truth Table AND Truth Table

Inputs Output Inputs Output

Sw 1 Sw 2 Lamp Sw 1 Sw 2 Lamp
OFF OFF OFF 0 0 0
OFF ON OFF 0 1 0
ON OFF OFF 1 0 0
ON ON ON 1 1 1
'gudk ON/OFF tpm; 0/1 eJU
azmfjyr,fqdk&if 0 [m OFF jzpfaew,fqdkwmudk azmfjyygw,f/ 1 [m ON jzpfaew,f
qdkwmudk azmfTef;ygw,f/
txuffyHkrSm jyxm;wJhtwkdif; input 2ck udk AND vkyfxm;&if tJ'D input 2ck pvHk;
ON jzpfrS output (logic AND &JU result) u ON jzpfygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 56 -
U Soe Tint Siemens PLC S7-200

Logic OR

'DOyrmwGif Sw 1 odkYr[kwf Sw 2 wpfck ON jzpfHk eJU Lamp = ON jzpfygw,f/


'Doabmt"dyg,fudk Boolean equation eJUa&;r,fqdk&if Lamp = (Sw 1) OR (Sw 2)
vdkY a&;&ygw,f/ Graphical symbol eJU azmfjyr,fqdk&if atmufygyHktwdkif; jzpfygw,f/

Sw 1 Sw 1
Lamp OR Lamp
Sw 1 Sw 2

'DyHkudk 2-input OR vkdU ac:ygw,f/

Truth Table eJU azmfjyr,fqdk&if atmufygyHktwdkif; jzpfygw,f/


OR Truth Table OR Truth Table
Inputs Output Inputs Output
Sw 1 Sw 2 Lamp Sw 1 Sw 2 Lamp
OFF OFF OFF 0 0 0
OFF ON ON 0 1 1
ON OFF ON 1 0 1
ON ON ON 1 1 1

yHkwGif Logic OR function ukd 2-input OR &JU Logic Gate Symbol, Truth Table awGeJY
OR &JU obm0udk &Sif;vif;azmfjyxm;wm jzpfygw,f/
Logic OR qkdwmuawmh OR vkyfxm;wJh input awGtm;vHk;xJu 1-ck ON jzpf
vkdufwmeJY OR &JU logic result (Output) u ON jzpfoGm;ygw,f/ Logic OR &JU input
awGtm;vHk; ON jzpf&ifvnf; OR vkyfvkdY &vmwJh result (Output) u ON jzpfygw,f/
Logic OR qkdwmudk 1-ck ( One ) vkdY rSwfom;xm;yg/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 57 -
U Soe Tint Siemens PLC S7-200

Example (1) Examine_ON Instruction

ON jzpfae&r,fvkdYtajctae condition ukdaz:jywJh


t"dyg,f&SdwJhoauFw coded symbol jzpfygw,f/

ON vkdufygqkdwJYtvkyf execution ukdaz:jywJY


t"dyg,f&SdwJYoauFw coded symbol jzpfygw,f/

I0.0 u ON jzpf a erS Q0.0 uk d ON vk d u f y gvk d Y t"dyg,f&ygw,f/

Condition ydkif; Execution ydkif;


jzpf&r,fhtajctae vkyf&r,fhvkyfief;

'Dvdka&;xm;cJh&if b,fbufjcrf;u jzpf&r,fhtajctae udk az:jyNyD; nmbufjcrf;


u vkyf&r,fhvkyfief; udk az:jywmjzpfygw,f/
jzpf&r,fhtajctae? (I0.0 u ON jzpfaerS) 'DtajctaeeJY udkufnDrS
vkyf&r,fhvkyfief; jzpfwJh (Q0.0 udk ON yg) qdkwJhtvkyfudkvkyfygvdkY t"dyg,f&ygw,f/
'D Instruction pmaMumif;&JU t"dyg,fu I0.0 u ON jzpfaerS Q0.0 ukd ON ygvkdY PLC
ukd ckdif;xm;wm jzpfygw,f/
'gaMumifh I0.0 = ON jzpf&if Q0.0 u ON jzpfoGm;ygw,f/ I0.0 = OFF jzpf&if Q0.0
u OFF jzpfoGm;ygw,f/
'D Instruction pmaMumif;udk zwfwJhtcg? Examine_ON I0.0, if it is true, execute
Output Q0.0 vdkY zwf&ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 58 -
U Soe Tint Siemens PLC S7-200

Example (2) Examine_OFF Instruction


OFF jzpfae&r,fvkdYtajctae condition ukdaz:jywJh
t"dyg,f&SdwJhoauFw coded symbol jzpfygw,f/

ON vkdufygqkdwJYtvkyf execution ukdaz:jywJY


t"dyg,f&SdwJYoauFw coded symbol jzpfygw,f/

I0.1 u OFF jzpf a erS Q0.1 uk d ON vk d u f y gvk d Y t"dyg,f&ygw,f/

Condition ydkif; Execution ydkif;


jzpf&r,fhtajctae vkyf&r,fhvkyfief;

'Dvdka&;xm;cJh&if b,fbufjcrf;u jzpf&r,fhtajctae udk az:jyNyD; nmbufjcrf;


u vkyf&r,fhvkyfief; udk az:jywmjzpfygw,f/
jzpf&r,fhtajctae? (I0.1 u OFF jzpfaerS) 'DtajctaeeJY udkufnDrS
vkyf&r,fhvkyfief; jzpfwJh (Q0.1 udk ON yg) qdkwJhtvkyfudkvkyfygvdkY t"dyg,f&ygw,f/
'D Instruction pmaMumif;&JU t"dyg,fu I0.1 u ON jzpfaerS Q0.1 ukd ON ygvkdY PLC
ukd ckdif;xm;wm jzpfygw,f/
'gaMumifh I0.1 = OFF jzpf&if Q0.1 u ON jzpfoGm;ygw,f/ I0.1 = ON jzpf&if Q0.1
u OFF jzpfoGm;ygw,f/
'D Instruction pmaMumif;udk zwfwJhtcg? Examine_OFF I0.1, if it is true, execute
Output Q0.1 vdkY zwf&ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 59 -
U Soe Tint Siemens PLC S7-200

Example (3) AND conditions


Condition ESpfckukd AND vkyfxm;jcif;

ANDing
Condition ydkif; Execution ydkif;
jzpf&r,fhtajctae vkyf&r,fhvkyfief;

Status Time Diagram


ON
I0.0
OFF

ON
I0.1
OFF

ON
Q0.0
OFF

Condition awGukd AND vkyfxm;&if? condition tm;vkH; True jzpfrS AND &JU Logic
result u True jzpfygw,f/
'D Instruction pmaMumif;&JU t"dyg,fu I0.0 a&m I0.1 yg ESpfckpvkH; ON jzpfaerS Q0.0
ukd ON ygvkdY PLC ukd ckdif;xm;wm jzpfygw,f/
'gaMumifh I0.0 = ON AND I0.1 = ON jzpf&if Q0.1 u ON jzpfoGm;ygw,f/
I0.0 = OFF jzpf&if Q0.0 u OFF jzpfoGm;ygw,f/
I0.1 = OFF jzpf&ifvnf; Q0.0 u OFF jzpfoGm;ygw,f/
'D Instruction pmaMumif;udk zwfwJhtcg? Examine_ON I0.0 AND Examine_ON
I0.1, if they are true, execute Output Q0.0 vdkY zwf&ygw,f/

rSwfcsuf/ / Logic AND, Logic OR taMumif ;ukd PLC vrf;nTefpmtkyf? pmrsufESm (118) rSm
jynfhjynfhpkHpkH az:jyxm;ygw,f /

The more you learn about PLCs, the more you will be able to solve other control problems.
- 60 -
U Soe Tint Siemens PLC S7-200

Example (4) AND conditions


Condition ESpfckukd AND vkyfxm;jcif;

ANDing
Condition ydkif; Execution ydkif;
jzpf&r,fhtajctae vkyf&r,fhvkyfief;

Condition awGukd AND vkyfxm;&if? condition tm;vkH; True jzpfrS AND &JU Logic
result u True jzpfygw,f/
'D Instruction pmaMumif;&JU t"dyg,fu I0.0 u ON jzpfNyD;? I0.1 u OFF jzpfaerS
Q0.0 ukd ON ygvkdY PLC ukd ckdif;xm;wm jzpfygw,f/

Status Time Diagram


ON
I0.0
OFF

ON
I0.1
OFF

ON
Q0.0
OFF

'gaMumifh I0.0 = ON AND I0.1 = OFF jzpf&if Q0.1 u ON jzpfoGm;ygw,f/


I0.0 = OFF jzpf&if Q0.0 u OFF jzpfoGm;ygw,f/
I0.1 = ON jzpf&ifvnf; Q0.0 u OFF jzpfoGm;ygw,f/
'D Instruction pmaMumif;udk zwfwJhtcg? Examine_ON I0.0 AND Examine_OFF
I0.1, if they are true, execute Output Q0.0 vdkY zwf&ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 61 -
U Soe Tint Siemens PLC S7-200

Example (5) AND conditions


Condition ESpfckukd AND vkyfxm;jcif;

ANDing
Condition ydkif; Execution ydkif;
jzpf&r,fhtajctae vkyf&r,fhvkyfief;

Status Time Diagram

ON
I0.0
OFF

ON
I0.1
OFF

ON
Q0.0
OFF

Condition awGukd AND vkyfxm;&if? condition tm;vkH; True jzpfrS AND &JU Logic
result u True jzpfygw,f/
'D Instruction pmaMumif;&JU t"dyg,fu I0.0 a&m I0.1 yg OFF jzpfaerS Q0.1 ukd ON
ygvkdY PLC ukd ckdif;xm;wm jzpfygw,f/
'gaMumifh I0.0 = OFF AND I0.1 = OFF jzpf&if Q0.1 u ON jzpfoGm;ygw,f/
I0.0 = ON jzpf&if Q0.1 u OFF jzpfoGm;ygw,f/
I0.1 = ON jzpf&ifvnf; Q0.1 u OFF jzpfoGm;ygw,f/
'D Instruction pmaMumif;udk zwfwJhtcg? Examine_OFF I0.0 AND Examine_OFF
I0.1, if they are true, execute Output Q0.1 vdkY zwf&ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 62 -
U Soe Tint Siemens PLC S7-200

Example (6) OR conditions


Condition ESpfckukd OR vkyfxm;jcif;

ORing

Condition ydkif; Execution ydkif;


jzpf&r,fhtajctae vkyf&r,fhvkyfief;

Status Time Diagram


ON
I0.0
OFF

ON
I0.1
OFF

ON
Q0.0
OFF

Condition awGukd OR vkyfxm;&if? teJqkH; condition wpfck True jzpfrS OR &JU


Logic result u True jzpfygw,f/ OR vkyfxm;wJY condition tm;vkH; True jzpf&ifvnf;
OR &JU Logic result u True jzpfygw,f/
'D Instruction pmaMumif;&JU t"dyg,fu I0.0 eJY I0.1 ESpfckrSm? wpfckck ON jzpfae&if
Q0.0 ukd ON ygvkdY PLC ukd ckdif;xm;wm jzpfygw,f/
'gaMumifh I0.0 = ON OR I0.1 = ON jzpf&if Q0.0 u ON jzpfoGm;ygw,f/
I0.0 = ON eJY I0.1 = OFF jzpf&ifvnf; Q0.0 u ON jzpfygw,f/
I0.0 = OFF eJY I0.1 = ON jzpf&ifvnf; Q0.0 u ON jzpfygw,f/
I0.0 = ON eJY I0.1 = ON jzpf&ifvnf; Q0.0 u ON jzpfygw,f/
I0.0 = OFF eJY I0.1 = OFF jzpfrSom Q0.0 u OFF jzpfygw,f/
'D Instruction pmaMumif;udk zwfwJhtcg? Examine_ON I0.0 OR Examine_ON I0.1, if
one of them is true, execute Output Q0.0 vdkY zwf&ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 63 -
U Soe Tint Siemens PLC S7-200

Example (7) OR conditions


Condition ESpfckukd OR vkyfxm;jcif;

ORing

Condition ydkif; Execution ydkif;


jzpf&r,fhtajctae vkyf&r,fhvkyfief;

Status Time Diagram


ON
I0.0
OFF

ON
I0.1
OFF

ON
Q0.0
OFF

Condition awGukd OR vkyfxm;&if? teJqkH; condition wpfck True jzpfrS OR &JU


Logic result u True jzpfygw,f/ OR vkyfxm;wJY condition tm;vkH; True jzpf&ifvnf;
OR &JU Logic result u True jzpfygw,f/
'D Instruction pmaMumif;&JU t"dyg,fu I0.0 u ON jzpfjzpf? I0.1 u OFF jzpfjzpf?
tJ'D 2-ckxJu wpfckck jzpfae&if Q0.0 ukd ON ygvkdY PLC ukd ckdif;xm;wm jzpfygw,f/

'gaMumifh I0.0 = ON OR I0.1 = OFF jzpf&if Q0.0 u ON jzpfoGm;ygw,f/


I0.0 = ON eJY I0.1 = ON jzpf&ifvnf; Q0.0 u ON jzpfygw,f/
I0.0 = OFF eJY I0.1 = OFF jzpf&ifvnf; Q0.0 u ON jzpfygw,f/
I0.0 = ON eJY I0.1 = OFF jzpf&ifvnf; Q0.0 u ON jzpfygw,f/
I0.0 = OFF eJY I0.1 = ON jzpfrSom Q0.0 u OFF jzpfygw,f/
'D Instruction pmaMumif;udk zwfwJhtcg? Examine_ON I0.0 OR Examine_OFF I0.1,
if one of them is true, execute Output Q0.0 vdkY zwf&ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 64 -
U Soe Tint Siemens PLC S7-200

Example (8) OR conditions


Condition ESpfckukd OR vkyfxm;jcif;

ORing

Condition ydkif; Execution ydkif;


jzpf&r,fhtajctae vkyf&r,fhvkyfief;

Status Time Diagram


ON
I0.0
OFF

ON
I0.1
OFF

ON
Q0.1
OFF

Condition awGukd OR vkyfxm;&if? teJqkH; condition wpfck True jzpfrS OR &JU


Logic result u True jzpfygw,f/ OR vkyfxm;wJY condition tm;vkH; True jzpf&ifvnf;
OR &JU Logic result u True jzpfygw,f/
'D Instruction pmaMumif;&JU t"dyg,fu I0.0 u OFF jzpfjzpf? I0.1 u OFF jzpfjzpf?
tJ'D 2-ckxJu wpfckck jzpf&if Q0.1 ukd ON ygvkdY PLC ukd ckdif;xm;wm jzpfygw,f/
'gaMumifh I0.0 = OFF OR I0.1 = OFF jzpf&if Q0.1 u ON jzpfoGm;ygw,f/
I0.0 = OFF eJY I0.1 = ON jzpf&ifvnf; Q0.1 u ON jzpfygw,f/
I0.0 = ON eJY I0.1 = OFF jzpf&ifvnf; Q0.1 u ON jzpfygw,f/
I0.0 = OFF eJY I0.1 = OFF jzpf&ifvnf; Q0.1 u ON jzpfygw,f/
I0.0 = ON eJY I0.1 = ON jzpfrSom Q0.1 u OFF jzpfygw,f/

'D Instruction pmaMumif;udk zwfwJhtcg? Examine_OFF I0.0 OR Examine_OFF I0.1,


if one of them is true, execute Output Q0.1 vdkY zwf&ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 65 -
U Soe Tint Siemens PLC S7-200

Example (9) AND before OR conditions


AND_block ESpfckukd OR vkyfxm;jcif;

ANDing A

ORing C

ANDing B
ConditionawGukd AND t&ifvkyfxm;NyD;rS? tJ'D AND_block ESpfck A eJY B ukd OR
jyefvkyfxm;wm jzpfygw,f/ tJ'D OR_block C &JU result u True jzpfrS Q0.2 ukd ON vkyf
ygw,f/
Status Time Diagram
ON
I0.0
OFF

ON
I0.1
OFF

ON
I0.3
OFF

I0.4 ON

OFF

ON
Q0.2
OFF

'D Instruction pmaMumif;&JU t"dyg,fu I0.0 a&m I0.1 yg ON jzpfcJY&if? aomfvnf;


aumif;? I0.3 a&m I0.4 yg ON jzpfcJY&if? aomfvnf;aumif;? Q0.2 ukd ON ygvkdY PLC ukd
ckdif;xm;wm jzpfygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 66 -
U Soe Tint Siemens PLC S7-200

Example (10) AND before OR conditions


AND_block ESpfckukd OR vkyfxm;jcif;

ANDing A

ORing C

ANDing B

Condition awGukd AND t&ifvkyfxm;NyD;rS? tJ'D AND_block ESpfck A eJY B ukd OR


jyefvkyfxm;wm jzpfygw,f/
tJ'D OR_block C &JU result u True jzpfrS Q1.0 ukd ON vkyfygw,f/
'D Instruction pmaMumif;rSm (I0.0 &JU condition) eJY (I0.1 &JU condition) condition ESpf
ckom yg0ifygw,f/ AND_block ESpfckukd OR vkyfxm;wmjzpfayr,fY 'Dvkda&;vkdufawmY
Logic function u Exclusive OR (XOR ) function jzpfoGm;ygw,f/

Status Time Diagram


ON
I0.0
OFF

ON
I0.1
OFF

ON
Q1.0
OFF

{(I0.0 = ON) AND (I0.1 = OFF)}OR{(I0.0 = OFF) AND (I0.1 = ON)}jzpf&if


Q1.0 u ON jzpfoGm;ygw,f/
I0.0 eJY I0.1 ESpfckxJu wpfckwnf; ON jzpfrSom Q1.0 u ON jzpfygw,f/
I0.0 a&m I0.1 yg ON jzpf&ifawmY Q1.0 u OFF jzpfygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 67 -
U Soe Tint Siemens PLC S7-200

Example (11) OR before AND conditions


ANDing C

ORing
ORing
B
A

eJY ukd OR vkyfvkdY&wJY OR block_A eJY?

eJY ukd OR vkyfvkdY&wJY OR block_B wkdYukd AND jyefvkyfxm;wm


jzpfygw,f/
tJ'D AND_block C &JU result u True jzpfrS Q0.2 ukd ON vkyfygw,f/
Status Time Diagram
ON
I0.0
OFF

ON
I0.1
OFF

ON
I0.3
OFF

ON
I0.4
OFF

ON
Q0.2
OFF

{(I0.0 = ON) OR (I0.3 = ON)}AND{(I0.1 = ON) OR (I0.4 = ON)}jzpf&if Q0.2


u ON jzpfoGm;ygw,f/
{I0.0 = ON} OR {I0.3 = ON} jzpfaepOfwGif {I0.1 = ON} OR {I0.4 = ON} jzpf&if?
Q0.2 u ON jzpfoGm;ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 68 -
U Soe Tint Siemens PLC S7-200

Example (12) OR before AND conditions

ANDing C

ORing
ORing
B
A

eJY ukd OR vkyfvkdY&wJY OR block_A eJY?

eJY ukd OR vkyfvkdY&wJY OR block_B wkdYukd AND jyefvkyfxm;wm


jzpfygw,f/ tJ'D AND_block C &JU result u True jzpfrS Q1.0 ukd ON vkyfygw,f/
'D Instruction pmaMumif;rSm (I0.0 &JU condition) eJY (I0.1 &JU condition) condition ESpf
ckom yg0ifygw,f/ OR_block ESpfckukd AND vkyfxm;wmjzpfayr,fY 'Dvkda&;vkdufawmY
Logic function u Exclusive OR (XOR) function jzpfoGm;ygw,f/

Status Time Diagram


ON
I0.0
OFF

ON
I0.1
OFF

ON
Q1.0
OFF

{(I0.0 = ON) OR (I0.1 = ON)}AND{(I0.0 = OFF) OR (I0.1 = OFF)}jzpf&if Q1.0


u ON jzpfoGm;ygw,f/
I0.0 = ON jzpfaepOfwGif I0.1 OFF jzpf&if? Q1.0 u ON jzpfoGm;ygw,f/
I0.1 = ON jzpfaepOfwGif I0.0 = OFF jzpf&if? Q1.0 u ON jzpfoGm;ygw,f/
I0.0 eJY I0.1 ESpfckxJu wpfckwnf; ON jzpfrSom Q1.0 u ON jzpfygw,f/
I0.0 a&m I0.1 yg ON jzpf&ifawmY Q1.0 u OFF jzpfygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 69 -
U Soe Tint Siemens PLC S7-200

Example (13) Self-Holding Program

Start P.B Stop P.B


(N.O) (N.C) Lamp

'D Instruction pmaMumif;&JU t"dyg,fu Q0.0 udk ON jzpfapzdkY I0.0 odkYr[kwf Q0.0
wpfckck ON jzpfaeNyD; I0.1 vnf; ON jzpfae&ygr,f/
Q0.0 = ON jzpfNyD;oGm;wJhtcgrSm I0.0 = OFF jzpfoGm;ayr,fh Q0.0 uawmhqufNyD;
ON jzpfaeygw,f/ tJ'gukd Self-holding function vkdY ac:ygw,f/
Start Pushbutton ukd (ESdyfrS ON wJY) N.O okH;xm;NyD;? Stop Pushbutton ukd (ESdyfrS OFF
wJY) N.C okH;xm;ygw,f/ Start P.B (N.O) ukd ESdyfNyD;jyefvTwfvkduf&if Lamp u ON jzpf
aecJYygw,f/ Stop P.B (N.C) ukd ESdyfvkdufawmhrS Lamp u OFF jyefjzpfygw,f/
Examine_ON I0.0 eJY Examine_ON Q0.0 udk OR vkyfxm;wmukd OR_block vkdY
ac:ygw,f/ tJ'D OR_block eJY Examine_ON I0.1 udk AND vkyfxm;wmjzpfygw,f/
'gaMumifh
I0.0 = ON eJY Q0.0 = OFF jzpfNyD;? I0.1 = ON jzpf&ifvnf; Q0.0 ukd ON jzpfapyg
w,f/
I0.0 a&m Q0.0 yg ON jzpfNyD;? I0.1 = ON jzpf&ifvnf; Q0.0 ukd ON jzpfapygw,f/
I0.0 = OFF eJY Q0.0 = ON jzpfNyD;? I0.1 = ON jzpf&ifvnf; Q0.0 ukd ON jzpfapyg
w,f/
I0.0 = OFF eJY Q0.0 = ON jzpfaewJYtcsdef? I0.1 = OFF jzpfoGm;rSom Q0.0 ukd OFF
jzpfapygw,f/
I0.0 = OFF eJY Q0.0 = OFF jzpfaewJYtcsdef? I0.1 = ON jzpfaeayr,fh Q0.0 u OFF
yJ jzpfaeygw,f/
I0.0 = ON eJY Q0.0 = OFF jzpfNyD;? I0.1 = OFF jzpfae&ifvnf; Q0.0 ukd OFF jzpfap
ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 70 -
U Soe Tint Siemens PLC S7-200

Example (14) Interlock Control Program

Start A Stop A

Motor A

Motor B
Interlocking

Start B Stop B

Motor B

Motor A

vufawGUtokH;jyKwJY Start_Stop program awGrSm Fail-Safe jzpfatmifvkdY Start


Pushbutton ESpfckpvkH;ukd (ESdyfrS ON wJY) N.O pushbutton awGukd okH;xm;NyD;? Stop
Pushbutton ESpfckpvkH;ukdvnf; (ESdyfrS OFF wJY) N.C pushbutton awGukd okH;xm;ygw,f/

'D program &JU yxrpmaMumif; 1st Instruction line rSmygwJY ukdxnfha&;&


wmu Q0.2 = ON jzpfae&if Q0.1 ukd ON rjzpfapcsifvkdY jzpfygw,f/

'D program &JU 'kwd,pmaMumif; 2nd Instruction line rSmygwJY ukd xnfha&;&
wmu Q0.1 = ON jzpfae&if Q0.2 ukd ON rjzpfapcsifvkdY jzpfygw,f/
Q0.1 u ON jzpfae&if Q0.2 ukd ON vkdY r&atmif? Q0.2 u ON jzpfae&if Q0.1 ukd
ON vkdY r&atmif? wenf;ajym&&if Q0.1 a&m Q0.2 yg 2-ckNyKdifwl ON vkdY r&atmif t
ajctae owfrSwfay;xm;wmrsKd;ukd Interlock vkdY ac:ygw,f/
Q0.1 eJY Q0.2 ESpfckpvkH; OFF jzpfae&if b,fwpfckukdjzpfjzpf t&ifpNyD; ON vkdY &yg
w,f/ 'D program rSm OD;pm;ay; priority owfrSwfxm;wmr&Sdygbl;/
Motor Forward / Reverse control program rSm fail-safe jzpfatmifvkdY 'Dvkd interlock
okH;NyD; a&;avY&Sdygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 71 -
U Soe Tint Siemens PLC S7-200

Example (15) AND block, OR block


Program ukd t"dyg,faz:wJYtcg logic AND, logic OR tjzpf jrifatmifMunfhwwf
&if bmomjyef&wm tvGefvG,fulygw,f/ tJ'DvkdMunfhwwf? jrifwwfatmif atmuf
rSmerlem program a&;jyxm;ygw,f/
(BlockC)blockBeJY AND vkyfxm;
(BlockA)ANDblock

(BlockB)blockAeJY OR
A
vkyfxm;
C

(BlockD)BlockCeJYOR
D
vkyfxm;
'D program ukd bmomjyef&&if I0.3 = ON eJY T37 = ON ukd block_A tjzpf AND
vkyfxm;ygw,f/ I0.3 a&m T37 yg ON jzpfaerS block_A &JU logic result u true jzpfyg
w,f/
tJ'D block_A eJY I0.0 = ON eJYukd OR xyfvkyfxm;ygw,f/ tJ'gukd block_B vkdY t
rnfay;xm;ygw,f/
Block_B eJY T38 = ON ukd AND vkyfxm;ygw,f/ tJ'gukd block_C vkdY emrnfwwf
xm;ygw,f/
Block_C eJY I1.0 = ON ukd OR xyfvkyfxm;ygw,f/ Block_C &JU logic result u true
jzpf&if? (okdYr[kwf) I1.0 u ON jzpf&if? Q0.1 = ON jzpfygw,f/
Status Time Diagram
ON
I0.0
OFF
ON
I0.3
OFF
ON
T37
OFF
ON
T38
OFF
ON
I1.0
OFF
ON
Q0.1
OFF

The more you learn about PLCs, the more you will be able to solve other control problems.
- 72 -
U Soe Tint Siemens PLC S7-200

Example (16) NOT instruction


NOT &J U t"dy g,fu Invert the logic result jzpfygw,f/

I0.0 = OFF jzpf rS True

u I0.0 = OFF jzpf&if false jzpfNyD;? I0.0 = ON jzpf&if true jzpfygw,f/

u tJ'D logic result ukd ajymif;jyefvSef invert vkyfwmjzpfygw,f/


I0.0 = OFF jzpf&if Q0.1 = ON jzpfygw,f/
I0.0 = ON jzpf&if Q0.1 = OFF jzpfygw,f/

&JU logic result u true jzpfrS u olYtvkyf


jzpfwJY Q0.1 ukd ON ygw,f/

Status Time Diagram


ON
I0.0
OFF

ON
Q0.0
OFF

The more you learn about PLCs, the more you will be able to solve other control problems.
- 73 -
U Soe Tint Siemens PLC S7-200

Example (17) P (Positive Transition) Instruction


Positive transition qkdwm logic result false-to-true udk ajymwmjzpfygw,f/

I0.0 = OFF to ON jzpfrS True

u olYa&SUrSm&SdwJY condition &JU logic result [m False to True jzpfovm;


vkdY ppfaq;wJYtvkyfukd vkyfaqmifygw,f/

u I0.0 = OFF jzpf&if false jzpfNyD;? I0.0 = ON jzpf&if true jzpfvkdYrkdY I0.0 =
OFF to ON jzpf&if false to true jzpfygw,f/

'D program rSm I0.0 = OFF to ON jzpfwJY tckduftwefYrSmom u True jzpf


ygw,f/

Status Time Diagram


ON
I0.0
OFF

ON ON for 1 scan
Q0.1
OFF

I0.0 = OFF to ON jzpfwJYtckduftwefYrSmom Q0.1 = ON jzpfygw,f/


I0.0 = OFF jzpfae&ifvnf; Q0.1 [m r ON ygbl;/
I0.0 = ON jzpfae&ifvnf; Q0.1 [m r ON ygbl;/
Q0.1 = ON jzpfaewJY tcsdefumv[m 1 scan time omMumjrifYygw,f/
1 scan time qkdwm scan cyle wpfywfvnfzkdY MumwJYtcsdefjzpfygw,f/
ykHrSeftm;jzifh 1 scan time [m 0.05ms rS 50ms txdMumjrifhwwfygw,f/
rSwfcsuf/ / Scan Cycle taMumif ;ukd PLC vrf;nTefpmtkyf? pmrsufESm (180) rSm az:jyxm;yg
w,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 74 -
U Soe Tint Siemens PLC S7-200

Example (18) N (Negative Transition) Instruction


Negative transition qkdwm true-to-false udk ajymwmjzpfygw,f/

I0.0 = ON to OFF jzpfrS True

u olYa&SUrSm&SdwJY condition = True to False jzpfovm;vkdY ppfaq;wJYtvkyf


ukd vkyfaqmifygw,f/

u I0.0 = OFF jzpf&if false jzpfNyD;? I0.0 = ON jzpf&if true jzpfvkdYrkdY I0.0 =
ON to OFF jzpf&if true to false jzpfygw,f/

'D program rSm I0.0 = ON to OFF jzpfwJY tckduftwefYrSmom &JU logic


result u true jzpfygw,f/

I0.0 = ON jzpfae&ifvnf; &JU logic result u true r[kwfygbl;/

I0.0 = OFF jzpfae&ifvnf; &JU logic result u true r[kwfygbl;/

Status Time Diagram

ON
I0.0 OFF

ON ON for 1 scan
Q0.1 OFF

I0.0 = ON to OFF jzpfwJYtckduftwefYrSmom Q0.1 = ON jzpfygw,f/


Q0.1 = ON jzpfaewJY tcsdefumv[m 1 scan time omMumjrifYygw,f/
1 scan time qkdwm scan cycle wpfywfvnfzkdY MumwJYtcsdefjzpfygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 75 -
U Soe Tint Siemens PLC S7-200

Example (19) Immediate Instructions


Immediate Instruction ESpfrsKd;&Sdygw,f/ Immediate Read Instruction eJY Immediate
Write Instruction wkdYjzpfMuygw,f/

Immediate read instruction rSm immediate ON eJY immediate OFF


ESpfrsKd;&Sdygw,f/ 4if;wkdYukd Input terminal ukd a&muf&SdvmwJY signal &JU condition eJYywf
oufwJYtcgrSm tokH;jyKavY&Sdygw,f/
Immediate_ON Instruction ukd tokH;jyK&if Program ukd execute vkyaf ewJY
tcsdefrSm input terminal wGif signal a&muf&Sdvm&if PLC u csufcsif;odNyD; ckdif;xm;wJY
tvkyfukd csufcsif;aqmif&GufrI execute jyKvkyfygw,f/
ykHrSefqkd&if Input scan tcsdefa&mufrS input signal &Sd? r&Sdukd PLC uodNyD; input
memory rSm a&;rSwfygw,f/ Program ukd execute vkyfwJYtcg input memory rSm&SdwJY bit
&JU condition ukdom todtrSwfjyKNyD; aqmif&Gufwm jzpfygw,f/
Immediate_OFF Instruction ukdtokH;jyK&if Program Scan tcsdef input
terminal wGif signal r&Sdvsif? csufcsif; PLC uodNyD; ckdif;xm;wJYtwkdif; aqmif&GufrI
execute jyKvkyfygw,f/

Immediate Write Instruction uawmY Immediate Output Instruction jzpfyg


w,f/ Immediate Output Instruction ukd tokH;jyK&if program ukkdajz&Sif;aqmif
&GufrI execute vkyfNyD;wmeJY Output Scan ukd apmifYqkdif;jcif;r&SdbJ Output Terminal okdY
signal csufcsif;a&muf&SdoGm;ygw,f/
PLC tvkyfvkyfykHukd aoaocsmcsm? &Sif;&Sif;vif;vif; odxm;rS immediate read
instruction eJY immediate write instruction awGtaMumif;&Sif;jywmukd em;vnfrSmjzpfyg
w,f/

rSwfcsuf/ / PLC tvkyfvkyf ykHtaMumif ; Scan Cycle ukd PLC vrf;nTefpmtkyf? pmrsufES m (180)
rSm az:jyxm;ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 76 -
U Soe Tint Siemens PLC S7-200

PLC tvk y f v k y f y k H t wk d c sKyf & S i f ; vif ; csuf


PLC u wpfokwfNyD;rS aemufwpfokwfukd aqmif&GufwJYenf; batch process eJY
tvkyf vkyfygw,f/ tJ'gukd Scan Cycle vkdY ac:ygw,f/
rjzpfraeodxm;&rSmu 1. Input Scan, 2. Program Scan eJY 3. Output Scan qkdwJY
tajccHuswJY aqmif&GufrI okH;rsKd;jzpfygw,f/ olwkdYvkyfaqmifykHu 1. Input Scan u
pwifNyD; vkyfygw,f/ Input scan NyD;rS 2. Program Scan ukd vkyfygw,f/ Program scan
NyD;rS 3. Output Scan ukd vkyfygw,f/ NyD;&if 1. Input Scan ukd jyefvkyfygw,f/

PLC ukd RUN xm;orSsumvywfvkH; wqifYNyD;wqifY 'DtpDtpOftwkdif; ywfjcm


vSnfhNyD; orderly vkyfaewmjzpfvkdY olYukd Scan Cycle vkdYac:ygw,f/ Scan cycle wpfywf
vnfzkdY MumwJYtcsdefukd scan time vkdY ac:ygw,f/ ykHrSeftm;jzifh 0.05ms to 50ms txd
Mumjrifhwwfygw,f/
S7-200 uvkyfaqmifwJY Scan Cycle ukd atmufrSmaz:jyxm;ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 77 -
U Soe Tint Siemens PLC S7-200

1. Input Scan
3. Output Scan

2. Program Scan

The more you learn about PLCs, the more you will be able to solve other control problems.
- 78 -
U Soe Tint Siemens PLC S7-200

PLC u tqifhoHk;qifh eJU tvkyfvkyfygw,f/ 'gudk PLC scan vdkU ac:ygw,f/ PLC
u LD program udk zwfwJhtcgrSm jrefrmpmudk zwfovdkrsdK; tay:qHk;taMumif;udk
pzwfygw,f/ b,fupNyD; nmtqHk;a&mufoGm;&if atmufwpfaMumif;ukd qif;zwfyg
w,f/
Input scan vkyfw,fqkdwmu PLC &JU input terminal tm;vkH;rSm signal &Sd? r&Sdukd
ppfaq;NyD;? awGUwJYtwkdif; result (signal &Sd&if ON, signal r&Sd&if OFF) ukd input memory
rSm a&;rSwfygw,f/ PLC &JU input terminal tm;vkH;ukd ppfaq;NyD;oGm;&if Input Scan &JU
tvkyf NyD;qkH;ygw,f/

Program Scan u PLC xJrSma&;xm;wJY User Program ukd pmzwfovkdrsKd; b,frS


nm? tay:rSatmuf instruction wpfaMumif;NyD;wpfaMumif; ckdif;xm;wJYtwkdif; aqmif
&GufrI execute vkyfoGm;ygw,f/ &vmwJY result ukd oufqkdif&m memory rSm a&;rSwfyg
w,f/ atmufqkH;pmaMumif;ukd execute vkyfNyD;awmYrS Program Scan &JUvkyfief; NyD;qkH;yg
w,f/
Output Scan u output memory rSm a&;rSwfxm;wJY tajctae status twkdif;
output terminal ukkd signal xkwfay;ygw,f/

Program Scan vkyfaewJYtcsdefwGif PLC &JU input terminal rSm signal tajctae
ajymif;vJrI jzpfay:vm&if PLC u csufcsif;rodyg/ Next Input Scan a&mufrS odyg
w,f/
rSwfcsuf / / STEP 7-Micro/WIN eJY LD program a&;wJYtcg END ukd xnfha&;ay;p&m rvkd
ygbl;/ a&;vkdY vnf; r&ygbl;/ STEP 7-MicroWIN xJrSm Conditional END om
yg&Sdygw,f /

The more you learn about PLCs, the more you will be able to solve other control problems.
- 79 -
U Soe Tint Siemens PLC S7-200

Program Scan vkyfaewJYtcsdefwGif PLC &JU input terminal rSm signal tajctae
ajymif;vJrI jzpfay:vm&if PLC u csufcsif;odatmif immediate read instruction ukd
okH;&ygw,f/
Program Scan vkyfaewJYtcsdefrSm instruction pmaMumif;wpfaMumif;ukd aqmif&Guf
NyD;wkdif;? (execute vkyfNyD;wkdif;) &vmwJY&vm'f result ukd memory rSmom a&;rSwfxm;NyD;
output terminal qDukd csufcsif;rykdYyg/ Output Scan vkyfawmhrS output terminal ukd signal
a&mufwm (update vkyfwm) jzpfygw,f/
Program Scan vkyfaewJYtcsdefrSm instruction pmaMumif;wpfaMumif;ukd aqmif&Guf
NyD;wkdif;? (execute vkyfNyD;wkdif;) &vmwJY&vm'f result ukd output terminal qD csufcsif;
a&mufapcsif&if Immediate Output Instruction ukd okH;&ygw,f/

Immediate rsm;&JUvkyfaqmifykHukd
Instruction EIdif;,SOfavYvmEkdifatmif
atmufrSm erlema&;NyD; t"dyg,f&Sif;jyxm;ygw,f/

'Dvkda&;xm;&if
Program Scan vkyfaewJYtcsdeftwGif;rSm Input Terminal 1.2 wGif signal a&muf&Sdvm
cJY&if? ykHrSeftm;jzifh Next Input Scan a&mufrSom I1.2 = ON jzpfaew,fqkdwmukd PLC u
odygw,f/ Input terminal 1.2 wGif signal a&mufvmwJYtcsdefxuf one scan aemufus
NyD;rS Q0.0 u ON ygw,f/ xkdYjyif Output scan vkyfawmYrSom output terminal 0.0 ukd
ON signal a&muf&Sdygw,f/

'Dvkda&;xm;&if
Program Scan vkyfaewJY tcsdefrSm Input Terminal 1.2 wGif signal a&mufvm&if
I1.2 = ON jzpfaeNyD qkdwmukd PLC u csufcsif;odygw,f/ Program ukd ajz&Sif;aqmif
&GufrI execute vkyfwJYtcg I1.2 = ON jzpfaewmukd todtrSwfjyKNyD; program ukd ajz&Sif;
aqmif&Gufygw,f/ Input terminal 1.2 wGif signal a&mufvsifa&mufcsif; same scan
twGif;rSmyif Q0.0 u ON jzpfygw,f/ 'gayr,fh Output scan vkyfawmYrSom output
terminal 0.0 ukd ON signal a&muf&Sdygw,f/
Q0.0 u output memory rSm&SdwJY byte0 &JU bit0 jzpfygw,f/ 0.0 u output
terminal number 0 jzpf y gw,f /

The more you learn about PLCs, the more you will be able to solve other control problems.
- 80 -
U Soe Tint Siemens PLC S7-200

'Dvkda&;xm;&if

Program ukd execute vkyfaewJYtcsdeftwGif;rSm Input Terminal 1.2 wGif signal r&Sd
awmYwm jzpfay:cJY&if? Next Input Scan a&mufrSom I1.2 = OFF jzpfaew,fqkdwmukd
PLC u odygw,f/ Input terminal 1.2 rSm signal r&SdawmYwJYtcsdefxuf one scan aemuf
usNyD;rS Q0.0 u ON ygw,f/ xkdYjyif Output scan vkyfawmYrSom output terminal 0.0 ukd
ON signal a&muf&Sdygw,f/

'Dvkda&;xm;&if

Program ukd execute vkyfaewJYtcsdeftwGif;rSm Input Terminal 1.2 wGif signal r&Sd
awmh&if I1.2 = OFF jzpfoGm;wmukd PLC u csufcsif;odygw,f/ Program ukd ajz&Sif;
aqmif&GufrI execute vkyfwJYtcg I1.2 = OFF jzpfaewmukd xnfhoGif;pOf;pm;ygw,f/
Input terminal rSm signal r&Sdvsifr&Sdcsif; same scan twGif;rSmyif Q0.0 = ON jzpfayr,fh
Output Scan tcsdefa&mufawmYrSom output terminal 0.0 u ON ygw,f/

'Dvkda&;xm;&if

I1.2 = ON jzpfwmukd Input Scan tcsdefa&mufrS PLC u odygw,f/ Program Scan


wGif txufyg program ukd ajz&Sif;aqmif&GufrI execute vkyfNyD;? csufcsif; Q0.0 = ON
jzpfygw,f/ Output terminal 0.0 qDukdvnf; ON signal csufcsif;a&mufygw,f/ Output
scan tcsdef a&mufwJYtxd apmifhqkdif;raeygbl;/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 81 -
U Soe Tint Siemens PLC S7-200

'Dvkda&;xm;&if

I1.2 = ON jzpfwmukd PLC u csufcsif;odygw,f/ Program Scan tcsdefrSm txuf


yg program ukd ajz&Sif;aqmif&GufrI execute NyD;&ifNyD;csif; Q0.0 = ON jzpfNyD; Output
terminal 0.0 qDukdvnf; ON signal csufcsif;a&mufygw,f/ Output scan tcsdefa&mufwJY
txd apmifhqkdif;raeygbl;/

'Dvkda&;xm;&if

I1.2 = OFF jzpfwmukd Input Scan tcsdefa&mufrS PLC u odygw,f/ Program Scan
wGif txufyg program ukd ajz&Sif;aqmif&GufrI execute vkyfNyD;? csufcsif; Q0.0 = ON
jzpfygw,f/ Output terminal 0.0 ukdvnf; ON signal csufcsif;a&mufygw,f/ Output scan
tcsdefa&mufwJYtxd apmifhqkdif;raeygbl;/

'Dvkda&;xm;&if

I1.2 = OFF jzpfwmukd PLC u csufcsif;odygw,f/ Program Scan tcsdefrSm txuf


yg program ukd ajz&Sif;aqmif&GufrI execute vkyfNyD;? csufcsif; Q0.0 = ON jzpfygw,f/
Output terminal 0.0 ukdvnf; ON signal csufcsif;a&mufygw,f/ Output scan tcsdef
a&mufwJYtxd apmifhqkdif; raeygbl;/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 82 -
U Soe Tint Siemens PLC S7-200

Example (20) S and R instructions


Reset dominant
Siemens S7-200 rSm S u Set jzpfNyD; set vkyfr,fh operand ta&twGufukd xnfh
oGif; owfrSwfay;&ygw,f/ R u Reset jzpfNyD; reset vkyfr,fh operand ta&twGufukd
xnfhoGif; owfrSwfay;&ygw,f/

I0.0 = ON jzpf&if Q0.0 eJY Q0.1 ukd set (ON) vkyfygw,f/


I0.1 = ON jzpf&if Q0.1 ukd reset (OFF) vkyfygw,f/
I0.2 = ON jzpf&if Q0.0 ukd reset (OFF) vkyfygw,f/
Program ukd txufygtwkdif; Set instruction ukd tay:rSma&;NyD; Reset instruction
ukd atmufrSm a&;xm;cJY&if reset dominant jzpfygw,f/
Reset dominant qkdwmu Set condition a&m Reset condition yg wNydKifwnf;jzpfcJY
&if set rjzpfyJ reset om jzpfygw,f/ Reset u MoZmvTrf;rkd;xm;ygw,f/

Status Time Diagram for RESET dominant


Set ON
I0.0
Q0.0, Q0.1 OFF

ON
Reset I0.1
Q0.1 OFF

Reset ON
Q0.0 I0.2
OFF

ON
Q0.0
OFF

ON
Q0.1
OFF

The more you learn about PLCs, the more you will be able to solve other control problems.
- 83 -
U Soe Tint Siemens PLC S7-200

t"dyg,f&Sif;vif;csuf

rSmygwJY 2 &JU t"dyg,fu Q0.0 eJY Q0.1 pkpkaygif; 2-ckukd set vkyfygvkdU
a&;xm;wm jzpfygw,f/
txufyg program wGif I0.0 = ON jzpf&if Q0.0, Q0.1 wkdYukd ON vkdufygvkdU a&;
xm;wm jzpfygw,f/

rSmygwJY 1 &JU t"dyg,fu Q0.1 wpfckwnf;ukdom reset vkyfygvkdU a&;xm;


wm jzpfygw,f/
txufyg program wGif I0.1 = ON jzpf&if Q0.1 ukdom OFF vkdufygvkdU a&;xm;wm
jzpfygw,f/

rSmygwJY 1 &JU t"dyg,fu Q0.0 wpfckwnf;ukdom reset vkyfygvkdU


a&;xm;wm jzpfygw,f/
txufyg program wGif I0.2 = ON jzpf&if Q0.0 ukdom OFF vkdufygvkdU a&;
xm;wmjzpfygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 84 -
U Soe Tint Siemens PLC S7-200

Example (21) S and R instructions


SET dominant

I0.0 = ON jzpf&if Q0.0 eJY Q0.1 ukd set (ON) vkyfygw,f/


I0.1 = ON jzpf&if Q0.1 ukd reset (OFF) vkyfygw,f/
I0.2 = ON jzpf&if Q0.0 ukd reset (OFF) vkyfygw,f/
Program ukd tckvkd Reset instruction ukd tay:rSma&;NyD; Set instruction ukd
atmufqkH;rSm a&;xm;cJY&if set dominant jzpfygw,f/
Set dominant qkdwmu Set condition a&m Reset condition yg wNydKifwnf;jzpfcJY&if
reset rjzpfyJ set om jzpfygw,f/ Set u MoZmvTrf;rkd;xm;ygw,f/

Status Time Diagram for SET dominant


Set ON
I0.0
Q0.0, Q0.1 OFF

Reset ON
I0.1
Q0.1 OFF

Reset ON
Q0.0 I0.2
OFF

ON
Q0.0
OFF

ON
Q0.1
OFF

The more you learn about PLCs, the more you will be able to solve other control problems.
- 85 -
U Soe Tint Siemens PLC S7-200

Set and Reset Dominant Bistable Instructions

Status Time Diagram for SR and RS

Status time diagram rSm az:jyxm;wmu Q0.0 ukd SR eJY a&;xm;NyD;? Q0.1 ukd RS eJY
a&;xm;wmjzpfygw,f/
Set condition (I0.0 = ON) wpfckwnf; true jzpf&if Q0.0 a&m Q0.1 yg ON jzpfyg
w,f/
Reset condition (I0.1 = ON) wpfckwnf; true jzpf&if Q0.0 a&m Q0.1 yg OFF jzpfyg
w,f/
Set condition a&m reset condition yg 2-ckpvkH; NydKifwl true jzpfcJY&if SR eJY a&;xm;
wJY Q0.0 u ON jzpfNyD;? RS eJY a&;xm;wJY Q0.1 u OFF jzpfygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 86 -
U Soe Tint Siemens PLC S7-200

Example (22) SR Set-Dominant Bistable Instruction


Set dominant qkdwmu Set condition a&m Reset condition yg wNydKifwnf; true jzpf
cJY&if reset rjzpfyJ set om jzpfygw,f/ Set u MoZmvTrf;rkd;xm;ygw,f/

I1.2 = ON jzpf&if Q0.0 = ON jzpfygw,f/


I1.3 = ON jzpf&if Q0.0 = OFF jzpfygw,f/
I1.2 a&m I1.3 yg NydKifwl ON jzpf&if Q0.0 = ON jzpfygw,f/
S1 &JUa&SUrSm set tvkyfukdvkyfzkdY condition a&;&ygw,f/ Set input vkdY ac:ygw,f/
S1 rSmygwJY 1 &JUt"dyg,fu Set u 1st priority jzpfw,fvkdY az:jywmjzpfygw,f/
R &JUa&SUrSm reset tvkyfukdvkyfzkdY condition a&;&ygw,f/ Reset input vkdY ac:yg
w,f/
OUT &JUaemufrSm Logic result True ukd xkwfay;xm;ygw,f/ wqufwnf; ckdif;p
&m&Sd&if tJ'Dae&mrSm instruction code a&;NyD;ckdif;vkdY &ygw,f/

Status Time Diagram for SR


ON
Set
Q0.0 I1.2 OFF

ON
Reset
I1.3
Q0.0 OFF

ON
Q0.0
OFF

The more you learn about PLCs, the more you will be able to solve other control problems.
- 87 -
U Soe Tint Siemens PLC S7-200

Example (23) RS Reset-Dominant Bistable Instruction


Reset dominant qkdwmu Set condition a&m Reset condition yg NydKifwl true jzpfcJY
&if set rjzpfyJ reset om jzpfygw,f/ Reset u MoZmvTrf;rkd;xm;ygw,f/

I1.2 = ON jzpf&if Q0.0 = ON jzpfygw,f/


I1.3 = ON jzpf&if Q0.0 = OFF jzpfygw,f/
I1.2 a&m I1.3 ygwNydKifeuf ON jzpf&if Q0.0 = OFF jzpfygw,f/
S &JU
a&SUrSm set tvkyfukdvkyfzkdY condition a&;&ygw,f/ Set input vkdY ac:ygw,f/
R1 &JU a&SUrSm reset tvkyfukdvkyfzkdY condition a&;&ygw,f/ Reset input vkdY ac:yg
w,f/
R1 rSmygwJY 1 &JU t"dyg,fu Reset u 1st priority jzpfw,fvkdY az:jywmjzpfyg
w,f/
OUT &JUaemufrSm Logic result True ukd xkwfay;xm;ygw,f/ wqufwnf; ckdif;p
&m&Sd&if tJ'Dae&mrSm instruction code a&;NyD;ckdif;vkdY &ygw,f/

Status Time Diagram for RS


Set ON
Q0.0 I1.2 OFF

Reset ON
Q0.0 I1.3
OFF

ON
Q0.0
OFF

The more you learn about PLCs, the more you will be able to solve other control problems.
- 88 -
U Soe Tint Siemens PLC S7-200

Example (24) Toggle Flip-Flop Program


Pushbutton (N.O) wpfckwnf;eJY Lamp ukd ON/OFF vkyfwJY program jzpfygw,f/

I0.0 = OFF to ON jzpfrS True

M0.0 wpfckxJ ukdom set vkyf yg

M0.0 wpfckxJ ukdom reset vkyfyg

Lamp

I0.0 = OFF to ON jzpfrS &JU logic result u True jzpfygw,f/

&JU t"dyg,fu M0.0 wpfckwnf;ukdom set vkyfygvkdY PLC ukd ckdif;xm;wm


jzpfygw,f/

&JU t"dyg,fu M0.0 wpfckwnf;ukdom reset vkyfygvkdY PLC ukd


ckdif;xm;wm jzpfygw,f/
Status Time Diagram
ON
I0.0 OFF

ON
Q0.0 OFF

I0.0 = OFF to ON wpfcgjzpfwkdif; Q0.0 &JU e*kd&Sd&if;pGJtajctaeu OFF jzpfae&if


OFF state u ON state ukd ajymif;oGm;ygw,f/
I0.0 = OFF to ON wpfcgjzpfwkdif; Q0.0 &JU e*kd&Sd&if;pGJtajctaeu ON jzpfae&if
ON state u OFF state ukd ajymif;oGm;ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 89 -
U Soe Tint Siemens PLC S7-200

Increment and Decrement Instructions


Increment Instruction rSm INC_B (increment byte), INC_W (increment word) eJY
INC_DW (increment double word) qkdNyD; 3-rsKd; &Sdygw,f/
Example (25) INC_B Increment Byte Instruction

INC_B &JU EN (enable input) condition u True jzpf&if ENO (enable output) u
vnf; True jzpfygw,f/ IN (input byte) tjzpfowfrSwfxm;wJY Q0 xJu &SdNyD;om;wefzkd;
present value xJukd 1 digit aygif;xnfhNyD; &vm'f result ukd OUT (output byte) tjzpf
owfrSwfxm;wJY Q0 xJrSm a&;rSwfygw,f/ Program a&;wJYtcg txufrSmjyxm;ovkd P
(positive transition) ukd xnfha&;rSom I1.2 wpfcg ON &if 1 digit ukd Q0 xJ wpfcg
aygif;xnfhygw,f/
Q0 xJrSm tpu bmrSr&Sd&if 0 digit jzpfygw,f/ I1.2 wpfcg ON &if Q0 xJrSm&SdwJY
0 ukd 1 aygif;NyD; &vmwJY 0+1=1 ukd Q0 xJrSm a&;rSwfygw,f/ tckcsdefrSm Q0 &JU present
value u 1 jzpfoGm;ygNyD/ 'DtcsdefrSm I1.2 wpfcgxyf ON &if Q0 xJrSm&SdwJY 1 ukd 1 aygif;
NyD; &vmwJY 1+1=2 ukd Q0 xJrSm a&;rSwfygw,f/ tckcsdefrSm Q0 &JU present value u 2
jzpfoGm;ygw,f/ I1.2 wpfcgxyf ON &if Q0 xJrSm 3 jzpfoGm;ygw,f/
tu,fa&GUom atmufrSmaz:jyxm;ovkd P (positive transition) condition ukd xnfh
ra&;cJY&if I1.2 = ON jzpfaeoa&GU scan wkdif;? scan wkdif;? 1 digit ukd xyfcgxyfcgaygif;
xnfhaeygw,f/ I1.2 = ON jzpfaewm Mum&ifMumovkd digit ta&twGuf wkd;yGm;aeyg
w,f/ Increment qufwkduf jzpfaeygw,f/

Q0 xJrSm tpu bmrSr&Sd&if 0 digit jzpfygw,f/ I1.2 = ON jzpfNyD; 1st scan rSm 0 ukd
1 aygif;NyD; &vmwJY 0+1=1 ukd Q0 xJrSm jyefa&;wmjzpfvkdY Q0 xJrSm 1 jzpfoGm;ygw,f/
2nd scan rSm 1 xyfaygif;NyD; Q0 xJrSm 1+1=2 jzpfoGm;ygw,f/ 3rd scan rSm 2+1=3 jzpfoGm;
ygw,f/ 4rd scan rSm 3+1=4 jzpfoGm;ygw,f/ 1 scan jynfhzkdYMumwJYtcsdefu ykHrSeftm;jzifh
0.05ms to 50ms jzpfygw,f/ 1 scan ukd 1 ms vkdY xm;wGuf&if I1.2 = ON jzpfwm 1sec
Mum&if 1s = 1000ms rSm scan aygif; tBudrf 1000 jzpfvkdY 1000 digits wkd;ygw,f/
The more you learn about PLCs, the more you will be able to solve other control problems.
- 90 -
U Soe Tint Siemens PLC S7-200

Q0 qkdwmu output memory xJu byte 0 jzpfygw,f/ Q0.0 qkdwmu output byte 0
&JU bit0 jzpfygw,f/
atmufuykHeJY ,SOfwGJMunfh&ifoabmaygufygvdrfhr,f/
Byte 0 xJrSm bit0 to bit7 txd yg&Sdygw,f/
Q0 xJrSm Q0.0 to Q0.7 txd yg&Sdygw,f/
27 26 25 24 23 22 21 20

128 64 32 16 8 4 2 1
b7 b6 b5 b4 b3 b2 b1 b0
Q0.7 Q0.6 Q0.5 Q0.4 Q0.3 Q0.2 Q0.1 Q0.0

Byte 0 xJ&Sd wefzkd;u 1 jzpf&if byte 0 &JU bit0 u ON jzpfygw,f/


Byte 0 xJ&Sd wefzkd;u 2 jzpf&if byte 0 &JU bit1 u ON jzpfygw,f/
Byte 0 xJ&Sd wefzkd;u 4 jzpf&if byte 0 &JU bit2 u ON jzpfygw,f/
Byte 0 xJ&Sd wefzkd;u 8 jzpf&if byte 0 &JU bit3 u ON jzpfygw,f/
Q0 (Byte 0) xJukd 1 digit a&mufoGm;awmY Q0 xJrSm&SdwJYwefzkd;u 1 jzpfygw,f/
Q0 (Byte 0) xJuwefzkd; 1 jzpf&if Q0.0 u ON jzpfygw,f/
Q0 (Byte 0) xJuwefzkd; 2 jzpfoGm;&if Q0.1 u ON jzpfygw,f/
Q0 (Byte 0) xJuwefzkd; 3 jzpfoGm;&if Q0.0 a&m Q0.1 yg ON jzpfMuygw,f/
Q0 (Byte 0) xJuwefzkd; 4 jzpfoGm;&if Q0.2 u ON jzpfygw,f/
Q0 (Byte 0) xJuwefzkd; 5 jzpfoGm;&if Q0.0, Q0.1 eJY Q0.2 yg ON jzpfMuygw,f/
Q0 (Byte 0) xJuwefzkd; 6 jzpfoGm;&if Q0.1 eJY Q0.2 wkdY ON jzpfMuygw,f/
Q0 (Byte 0) xJuwefzkd; 7 jzpfoGm;&if Q0.0, Q0.1 eJY Q0.2 wkdY ON jzpfMuygw,f/

Q0 (Byte 0) xJuwefzkd; 17 jzpfoGm;&if Q0.0 eJY Q0.4 wkdY ON jzpfMuygw,f/

rSwfcsuf/ / PLC &JU Memory xJrSma&;rSwfwJY Number System taMumif;ukd PLC vrf;nT ef
pmtkyf ? pmrsuf ESm (108) rSmaz:jyxm;ygw,f /

The more you learn about PLCs, the more you will be able to solve other control problems.
- 91 -
U Soe Tint Siemens PLC S7-200

Example (26) DEC_B Decrement Byte Instruction

DEC_B &JU
EN (enable input) u True jzpf&if ENO (enable output) uvnf; True
jzpfygw,f/ DEC_B &JU EN (enable input) condition u True jzpf&if ENO (enable
output) uvnf; True jzpfygw,f/
DEC_B &JU EN (enable input) u True jzpf&if IN (input byte) tjzpf owfrSwfxm;
wJY Q0 xJu &SdNyD;om;wefzkd; present value xJu 1 digit (decrease) EIwfNyD;&wJY &vm'f
result ukd OUT (output byte) tjzpfowfrSwfxm;wJY Q0 xJrSm jyefa&;ygw,f/
Program a&;wJYtcg txufrSmjyxm;ovkd P (positive transition) condition ukd
xnfha&;rSom I1.2 = ON wpfcgjzpfwkdif; Q0 xJu 1 digit ukd EIwf,lygw,f/ P rygyJ a&;
cJY&if scan wkdif;? scan wkdif; 1 digit ukd EIwf,laeygvdrfhr,f/
Q0 xJrSm tpu 10 &SdcJY&if I1.2 wpfcg ON &if Q0 xJrSm&SdwJY 10 xJu 1 ukd EIwfNyD;
10 1 = 9 ukd Q0 xJrSma&;rSwfygw,f/ tckcsdefrSm Q0 &JU present value u 9 jzpfoGm;yg
w,f/ 'DtcsdefrSm I1.2 wpfcgxyf ON &if Q0 xJrSm&SdwJY 9 xJu 1 EIwNf yD; 8 ukd Q0 xJrSm
a&;rSwfygw,f/ tckcsdefrSm Q0 &JU present value u 8 jzpfoGm;ygw,f/ I1.2 wpfcgxyf
ON &if Q0 xJrSm 7 jzpfoGm;ygw,f/
atmufrSmaz:jyxm;ovkd P rygbJ a&;xm;&if? scan wkdif;? scan wkdif;? 1 digit ukd
EIwf,lygw,f/

I1.2 = ON 1st scan rSm 1 digit ukd Q0 xJu EIwf,lNyD; result ukd Q0 xJrSmyJ
jzpfNyD;
jyefa&;ygw,f/ 2nd scan rSm aemufxyf 1 digit ukd Q0 xJu EIwf,lNyD; result ukd Q0 xJ
rSmyJ jyefvnfa&;rSwfygw,f/
I1.2 u ON jzpfwmMumoavmuf scan aygif;rsm;pGm jzpfay:ygw,f/ 1 scan rSm 1
digit EIwf,lwmjzpfvkdY I1.2 wpfcg ON wmeJY digit aygif;rsm;pGmukd Q0 xJu EIwf,lNyD;om;
jzpfoGm;ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 92 -
U Soe Tint Siemens PLC S7-200

Example (27) INC_W Increment Word Instruction

txufyg program wGif I1.2 = OFF to ON jzpfrS &JU logic


result u true jzpfygw,f/ EN (enable) u true jzpf&if ENO (enable output) vnf; true
jzpfygw,f/ I1.2 = OFF to ON jzpf&if ENO uvnf; true jzpfNyD; Q0.0 ESifh Q0.1 wkdYukd
ON and Hold jzpfusefcJYapygw,f/
QW1 &JU t"dyg,fu Q1 and Q2 vkdY jzpfygw,f/ Q1 u 8-bits eJY Q2 u 8-bits qkd
awmh pkpkaygif; 16 bits = 1 word jzpfygw,f/ Word tjzpf tkyfpkzGJYxm;wJY Q1 & Q2 yg0if
wJY 16 bits &SdwJY output memory jzpfygw,f/
I1.2 = OFF to ON jzpfwkdif; EN u true jzpfvkdY IN rSm word tjzpfowfrSwfaz:jy
xm;wJY Q1 xJukd 1 digit wkd;NyD; &vm'f result ukd OUT rSm word tjzpfowfrSwfaz:jy
xm;wJY Q1 xJukd a&;rSwfygw,f/ &Sif;atmifajym&&if Q1, Q2 xJ&Sd rlvwefzkd;ukd 1 digit
aygif;NyD;? &vm'fukd Q1, Q2 xJjyefa&;ygw,f/
Q1 eJY Q2 wkdY output memory xJrSm word tjzpf zGJYpnf;xm;ykHukd OmPfrSm jrifa,mif
vmatmif atmufrSmaz:jyxm;ygw,f/ Q1 u lower byte jzpfNyD;? Q2 u upper byte jzpf
ygw,f/
Q2.7 32768
16384
8192
4096
2048
1024
512
Q2.0 256
Q1.7 128
64
32
16
8
4
2
Q1.0 1

QW1 = 47531

Q2 Q1

0 to 255 txdukd Q1 wpfckwnf;rSma&;rSwfvkdY &ao;ayr,fh 256 upNyD; 65535


txdukd awmh Q1 xJa&m Q2 xJrSmyg a&;rSwfygw,f/
QW1 xJuwefzkd; 47531 jzpf&if Q2.7, Q2.5, Q2.4, Q2.3, Q2.0, Q1.7, Q1.5, Q1.3,
Q1.1, Q1.0 wkdY ON jzpfaeMuygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 93 -
U Soe Tint Siemens PLC S7-200

txufygykHu Relay output 10-ckygwJY S7-200 CPU224 &JU output terminal jzpfNyD;
u bmqufoG,frIrSr&SdwJY no connection jzpfygw,f/
Output memory address awGuawmh Q0 (Q0.0, Q0.1, Q0.2, Q0.3, Q0.4, Q0.5,
Q0.6, Q0.7) eJY Q1 (Q1.0, Q1.1, Q1.2, Q1.3, Q1.4, Q1.5, Q1.6, Q1.7) wkdY jzpfMuygw,f/
Output memory Q0.0, Q0.1, Q0.2, Q0.3 wkdYtwGuf output terminal 1L, 0.0, 0.1,
0.2, 0.3 wkdY jzpfMuygw,f/ Q0.4, Q0.5, Q0.6 wkdYtwGuf terminal 2L, 0.4, 0.5, 0.6 wkdY jzpf
Muygw,f/ Q0.7, Q1.0, Q1.1 wkdYtwGuf terminal 3L, 0.7, 1.0, 1.1 wkdY jzpfMuygw,f/
Q1.2, Q1.3, Q1.4, Q1.5, Q1.6, Q1.7 wkdYtwGuf output terminal ryg&Sdygbl;/
1L, 2L, 3L wkdYu common terminal awGjzpfMuygw,f/
QW1 xJuwefzkd; 47531 jzpfoGm;wJYtcg Q1 xJu (Q1.0, Q1.1, Q1.3, Q1.5, Q1.7),
Q2 xJu (Q2.0, Q2.3, Q2.4, Q2.5, Q2.7) wkdY ON jzpfaeMuygw,f/
Output terminal 10-ckom &SdwmjzpfvkdYrkdY Q1.0 ESifY Q1.1 wkdYu ay;ykdYwJY signal rsm;
ukdom output terminal 1.0 eJY 1.1 wkdYu &&Sdygw,f/
S7-200 CPU224 u digital expansion module 7-cktxd xyfrHwkd;csJUqufoG,fvkdY &
ygw,f/
S7-200 CPU224 ukd relay output 16-ckygwJY expansion module (6ES7 223-1PL22-
0XA0) eJY xyfqufvkduf&if atmufrSmaz:jyxm;ovkd output terminal awGwkd;vmyg
w,f/

u bmqufoG,frIrSr&SdwJY no connection jzpfygw,f/


1L, 2L, 3L, 4L wkdYu common terminal awGjzpfMuygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 94 -
U Soe Tint Siemens PLC S7-200

Output memory address awGuawmh Q2 (Q2.0, Q2.1, Q2.2, Q2.3, Q2.4, Q2.5,
Q2.6, Q2.7) eJY Q3 (Q3.0, Q3.1, Q3.2, Q3.3, Q3.4, Q3.5, Q3.6, Q3.7) wkdY jzpfMuygw,f/
Output terminal 1L, .0, .1, .2, .3, wkdYu output memory Q2.0, Q2.1, Q2.2, Q2.3,
wkdYtwGuf jzpfygw,f/ 2L, .4, .5, .6, .7 wkdYu Q2.4, Q2.5, Q2.6, Q2.7 wkdYtwGuf
jzpfygw,f/ 3L, .0, .1, .2, .3, wkdYu Q2.0, Q2.1, Q2.2, Q2.3 wkdYtwGuf jzpfygw,f/ 4L, .4,
.5, .6, .7 wkdYu Q2.4, Q2.5, Q2.6, Q2.7 wkdYtwGuf jzpfMuygw,f/
S7-200 CPU224 wGif Input 16-ck eJY relay output 16-ck yg0ifwJY expansion module
(6ES7 223--1PL22--0XA0) ukd wkd;csJUwwfqifxm;r,fqkd&if QW1 xJuwefzkd; 47531
jzpfoGm;wJY tcg Q2.7, Q2.5, Q2.4, Q2.3, Q2.0 wkdYukdom expansion module &JU output
terminal uwqifh &&SdrSmjzpfNyD; Q1.7, Q1.5, Q1.3, Q1.1, Q1.0 wkdYuawmh output terminal
ukd a&muf&SdvmrSmr[kwfygbl;/
S7-200 CPU224 &JU output memory xJu Q0, Q1 wkdY[m main module twGuf jzpf
NyD;? Q2, Q3 wkdYu awmh 1st output expansion module twGuf jzpfygw,f/ Q4, Q5 wkdYu
awmh 2nd output expansion module twGuf jzpfygw,f/

S7-200 CPU224 ukd relay output 8-ckygwJY expansion module (Order No. 6ES7 223-
1PH22-0XA0) eJY xyfqufvkduf&if atmufrSmaz:jyxm;ovkd output terminal awG
wkd;vmygw,f/

Expansion module (6ES7 223--1PH22--0XA0)


u bmqufoG,frIrSr&SdwJY no connection jzpfygw,f/
Output memory address awG uawmh Q2 (Q2.0, Q2.1, Q2.2, Q2.3, Q2.4, Q2.5,
Q2.6, Q2.7) eJY Q3 (Q3.0, Q3.1, Q3.2, Q3.3, Q3.4, Q3.5, Q3.6, Q3.7) wkdY jzpfMuygw,f/
'D module rSm output terminal 8-ckom yg&Sdayr,fh memory ukd 16-ckpm owfrSwfay;
xm;wm jzpfygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 95 -
U Soe Tint Siemens PLC S7-200

Output terminal 1L, .0, .1, .2, .3, wkdYu output memory Q2.0, Q2.1, Q2.2, Q2.3,
wkdYtwGuf jzpfygw,f/ 2L, .4, .5, .6, .7 wkdYu Q2.4, Q2.5, Q2.6, Q2.7 wkdYtwGuf
jzpfMuygw,f/
1L, 2L wkdYu common terminal awG jzpfMuygw,f/
Output memory Q3.0, Q3.1, Q3.2, Q3.3, Q3.4, Q3.5, Q3.6, Q3.7 wkdYtwGuf output
terminal awG ryg&Sdygbl;/
QW1 xJuwefzkd; 47531 jzpfoGm;wJYtcg Q1 xJu (Q1.0, Q1.1, Q1.3, Q1.5, Q1.7),
Q2 xJu (Q2.0, Q2.3, Q2.4, Q2.5, Q2.7) wkdY ON jzpfMuygw,f/
'gaMumifh QW1 xJuwefzkd;[m 47531 jzpfae&if Q2.7, Q2.5, Q2.4, Q2.3, Q2.0
wkdYukdom expansion module &JU output terminal uwqifh &&SdrSmjzpfNyD; Q1.7, Q1.5, Q1.3,
Q1.1, Q1.0 wkdYuawmh terminal r&SdwJY output memory awGjzpfMuvkdY output terminal ukd
signal a&muf&SdvmrSmr[kwfygbl;/

txufyg program wGif INC_W ukd a&;wJYtcg IN rSmvnf; QW1 jzpfNyD;? OUT
rSmvnf; QW1 jzpfae wmrkdYvkdY P (positive transition) ukd xnfha&;&wmjzpfygw,f/
wu,fvkdYom atmufrSmaz:jyxm;ovkd INC_W ukd a&;wJYtcg IN rSm VW0 jzpf
NyD; OUT rSm VW10 jzpfcJY&if P xnfha&;p&mrvkdygbl;/

txufyg program wGif I1.2 = ON jzpfwJYtcg word tjzpfowfrSwfpkzGJYxm;wJY V0,


V1 xJ&Sdwefzkd;ukd 1 digit aygif;xnfhNyD;? &wJY result ukd word tjzpfowfrSwfpkzGJYxm;wJY
V10, V11 xJrSma&;rSwfwmjzpfygw,f/ V0, V1 xJrSm&SdwJY wefzkd;ukd 1 digit aygif;NyD;? V0,
V1 xJjyefa&;wm r[kwfyJ (olYxJukd 1 wkd;NyD; olYxJjyefa&;wm r[kwfyJ) result ukd
V10,V11 xJa&;wmjzpfvkdY V0, V1 xJu e*kdwefzkd; ajymif;vJrIr&Sdyg/ Scan wkdif; IN
(VW0) xJukd 1 digit aygif;NyD; &vmwJYwefzkd;ukd scan wki d f; OUT (VW10) rSma&;wm
jzpfygw,f/ taygif;cHwefzkd; ajymif;vJrIr&SdvkdY &vm'fwefzkd;vnf; ajymif;vJrIr&Sdyg/
S7-200 CPU224 (Order No. 6ES7 214-1BD22-0XB0) xJrSm variable register vkdY
ac:wJY V memory byte aygif; (V0 to V5119) 5120 bytes yg&Sdygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 96 -
U Soe Tint Siemens PLC S7-200

Memory in the PLC


PLC wkdif;[m Computer jzpfwJYtwGuf CPU u memory eJYwGJNyD; tvkyfvkyfyg
w,f/ CPU eJY wGJzufNyD; tvkyfvkyfwJY PLC xJu memory ukd RAM vkdY ac:ygw,f/
RAM ukd ceomrSwfrdwJY volatile memory vkdY ac:ygw,f/ PLC ukd supply vkyfxm;wJY
electric power jywfawmufoGm;&if RAM xJrSm rSwfom; odrf;qnf;xm;wJY data
awGtm;vkH; ysufpD;oGm;ygw,f/ RAM xJrSm rSwfom;odrf;qnf;xm;wJY data awGukd
raysmufysufap&atmif RAM ukd electric power supply tNrJay;xm;zkdY vkdtyfygw,f/
'gaMumifh RAM wpfrsKd;wnf;omygwJY PLC awGrSm "gwfcJ battery xnfhay;xm;&yg
w,f/

RAM ukd power supply rjywfapzkdY


PLC xJrSm Super Capacitor ukd
xnfhoGif; wnfaqmufxm;ygw,f/ PLC
ukd ay;xm;wJY power supply jywfawmuf
oGm;wJYtcg S7-200 CPU224 xJrSm yg&SdwJY
Super Capacitor u RAM ukd em&D 190
(8-&ufcefY) txd power ay;xm;Ekdifyg
w,f/

S7-200 CPU224 xJrSmawmh RAM


tjyif EEPROM vnf; yg&Sdygw,f/
EEPROM [m olYxJrSm odrf;xm;wJY data
awGukd electric power r&&Sd&ifvnf; raysmuf
ysufatmif odrf;xm;EkdifpGrf;&SdwJY (tNrJwrf;
rSwfrdwJY) non-volatile memory trsKd;tpm;
jzpfygw,f/ EEPROM ygwJY PLC awGrSm
"gwfcJ battery rygygbl;/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 97 -
U Soe Tint Siemens PLC S7-200

S7-200 CPU224 ukd Memory Cartridge wwfqiftokH;jyKvkdY&ygw,f/

Memory Cartridge uawmh program ukd PLC &JUtjyifrSm backup tjzpf odrf;
qnf;xm;csif&if xyfrH0,f,lwwfqif&wJY memory jzpfygw,f/ oluvnf; tNrJrSwfrd
wJY non-volatile memory trsKd;tpm; jzpfygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 98 -
U Soe Tint Siemens PLC S7-200

Memory taMumif; avYvmwJYtcg 1/ Input Memory 2/ Output Memory


3/ Internal Memory vkdY 3-rsKd;cGJNyD; odxm;&ygr,f/

1/ Input image memory


S7-200 CPU224 xJrSm Process-image input register: I vkdY ac:wJY Input memory
bit aygif; (I0.0 to I15.7) 16 bytes x 8 bits = 128 bits yg&Sdygw,f/ Bit 1-ckcsif;pDukd read
vkyfvkdYom &ygw,f/ Byte tjzpf zGJYpnf;wnfaqmufxm;ygw,f/
S7-200 CPU224 rSm Input terminal aygif; 0.0 to 0.7, 1.0 to 1.5 txd 14-ckyg&Sdyg
w,f/ Input terminal 0.0 ukd ukd,fpm;jyKwJY Input memory bit u I0.0 jzpfygw,f/ Input
terminal 1.5 ukd ukd,fpm;jyKwJY Input memory bit u I1.5 jzpfygw,f/
Input memory [m Input terminal &JU ykH&dyfjzpfygw,f/ Input terminal rSmjzpfay:ae
wJYtajctae signal &Sdwm? signal r&Sdwmay: rlwnfNyD; Input memory &JU wefzkd;u
ajymif;vJoGm;ygw,f/
Input terminal rSm signal r&Sd&if tJ'D terminal eJY oufqkdifwJY input memory bit &JU
wefzkd;u 0 jzpfygw,f/ Input terminal rSm signal &Sdae&if tJ'D terminal eJY oufqkdifwJY
input memory bit &JU wefzkd;u 1 jzpfygw,f/ 0 &JU t"dyg,fu signal r&Sdbl; (OFF)
jzpfygw,f/ 1 &JU t"dyg,fu signal &Sdw,f (ON) jzpfygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 99 -
U Soe Tint Siemens PLC S7-200

2/ Output image memory


S7-200 CPU224 xJrSm Process-image output register: Q vkdY ac:wJY Output
memory bit aygif; (Q0.0 to Q15.7) 16 bytes x 8 bits = 128 bits yg&Sdygw,f/ Byte tjzpf
zGJYpnf; wnfaqmufxm;ygw,f/
Bit 1-ckcsif;pDukd read vkyfvkdY &ovkd? Bit 1-ckcsif;pDukd write vnf; vkyfvkdY&yg
w,f/ Read vkyfw,f qkdwmu output memory bit &JU tajctae status ukd Munfhwm
jzpfygw,f/ Write vkyfw,f qkdwmu output memory bit &JU tajctae status ukd
ajymif;a&;wm jzpfygw,f/ Program ukd ajz&Sif;aqmif&GufrI execution vkyfNyD; &vmwJY
&vm'f result twkdif; output memory rSm a&;rSwfwJYtcg memory bit awG&JU tajctae
state awG ajymif;oGm;ygw,f/
S7-200 CPU224 rSm Output terminal aygif; 0.0 to 0.7, 1.0 to 1.1 txd 10-ckyg&Sd
ygw,f/ Output terminal 0.0 ukd ukd,fpm;jyKwJY Output memory bit u Q0.0 jzpfygw,f/
Output terminal 1.1 ukd ukd,fpm;jyKwJY Output memory bit u Q1.1 jzpfygw,f/
Output memory rSm&SdwJY bit &JU tajctae state ukd program u ajymif;vJay;yg
w,f/ Output terminal [m Output memory &JU ykH&dyfjzpfygw,f/ Output memory bit &JU
tajctae state ay:rlwnfNyD; Output Terminal rSm signal &Sdwm? signal r&Sdwmukd jzpf
ay:apygw,f/
Output memory bit &JU tajctaeu 0 jzpfae&if tJ'D output memory bit eJY ouf
qkdifwJY output terminal rSm signal r&Sdygbl;/ Output memory bit &JU tajctaeu 1 jzpf
ae&if tJ'D output memory bit eJY oufqkdifwJY output terminal u signal ukd &&Sdygw,f/
0 &JU t"dyg,fu signal r&Sdbl; (OFF) vkdY jzpfygw,f/ 1 &JU t"dyg,fu signal &Sd
w,f (ON) vkdY jzpfygw,f/
Input memory eJY Output memory wkdY[m ceomrSwfrdwJY non-retentive memory
(volatile memory) rsm; jzpfMuygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 100 -
U Soe Tint Siemens PLC S7-200

3/ Internal memory
Internal memory qkdwmu PLC xJrSmom&SdaeNyD;? PLC &JUjyifyeJY qufoG,frI vkH;0
r&SdwJY memory awG jzpfMuygw,f/ Program xJrSmom a&;vkdY? zwfvkdY? &wJY memory bit
awGjzpfygw,f/

Bit memory M
S7-200 CPU224 xJrSm Bit Memory Area: M vkdY ac:wJY internal memory bit aygif;
(M0.0 to M31.7) 32 bytes x 8 bits = 256 bits yg&Sdygw,f/ Bit 1-ckcsif;pDukd read vkyfvkdY
&ovkd? Bit 1-ckcsif;pDukd write vnf; vkyfvkdY&ygw,f/ Bit taeeJYokH;zkdY &nff&G,fNyD; Byte
tjzpf zGJYpnf;wnfaqmufxm;wJY internal memory jzpfygw,f/
Bit 1-ckcsif;pDukd &nfTef;NyD; address ay;r,fqkd&if M[byte address].[bit address]
M0.0, M0.1, M0.2 (byte0 &JU bit0, byte0 &JU bit1, byte0 &JU bit2) pojzifh a&;&ygw,f/
Bit 8-ckygwJY byte tjzpf &nfTef;NyD; address ay;r,f qkd&if M[size][starting byte
address] MB0, MB1, MB2 (byte0, byte1, byte2) pojzifh a&;&ygw,f/
Bit 16-ckygwJY word (2 bytes) tjzpf &nfTef;NyD; address ay;r,fqkd&if
M[size][starting byte address] MW0, MW2, MW4 pojzifh a&;&ygw,f/ MW0 xJrSm
byte0 eJU byte1 yg0ifygw,f/ MW2 xJrSm byte2 eJU byte3 yg0ifygw,f/
'gaMumifh MW0, MW1 vkdY address ra&;&ygbl;/ MW0 (byte0 & byte1) xJrSmygwJY
byte1 eJY MW1 (byte1 & byte2) xJrSm ygwJY byte1 csif; xyfaevkdY jzpfygw,f/
Bit 32-ckygwJY double word (4 bytes) tjzpf &nfTef;NyD; address ay;r,fqkd&if
M[size][starting byte address] MD0, MD4, MD8 pojzifh a&;&ygw,f/ MD0 xJrSm
byte0, byte1, byte2 eJU byte3 wkdY yg0ifygw,f/ MD4 xJrSm byte4, byte5, byte6 eJU byte7
wkdY yg0ifygw,f/ MD8 xJrSm byte8, byte9, byte10 eJU byte11 wkdY yg0ifygw,f/
'gaMumifh MD0, MD2 vkdY address ra&;&ygbl;/ MD0 (byte0 to byte3) xJrSm ygwJY
byte2 & byte3 eJY MD2 (byte2 to byte5) xJrSm ygwJY byte2 & byte3 wkdY xyfaevkdY jzpfyg
w,f/
txufrSma&;jy? &Sif;jyxm;wmawGu bit memory M vkdY ac:wJY internal memory
ukd 'Dvkda&;vkdY&w,f? 'DvkdokH;vkdY&w,f? 'Dvkdra&;&bl;qkdwm odatmifvkdYom jzpfygw,f/
Internal memory M ukd bit memory vkdY ac:wJYtwkdif; program xJrSm bit taeeJYom
tokH;rsm;ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 101 -
U Soe Tint Siemens PLC S7-200

S7-200 CPU224 xJrSmygwJY M0 to M13 ukd ceomrSwfrdwJY non-retentive memory


trsKd;tpm;tjzpf puf&kHu xkwfvkyfvkdufpOfuwnf;u owfrSwfay;xm;ygw,f/
M14 to M31 ukdawmh tcsdefMumMumrSwfrdwJY retentive memory trsKd;tpm;tjzpf
owfrSwfay;xm;ygw,f/
tJ'Dvkd puf&kHuowfrSwfay;wmukd Default vkdY ac:ygw,f/
PLC power supply jywfawmufoGm;wJYtcg Retentive memory tjzpfowfrSwfxm;
wJY M memory awG[m EEPROM xJukd tvkdtavsmufajymif;oGm;ygw,f/

MB0 to MB13 txdukd tcsdefMumMumrSwfrdwJY retentive memory jzpfatmif


ajymif;csif&if ajymif;vkdY &ygw,f/

tJ'Dvkd ajymif;csifw,fqkd&if

1. View > Component > System Block ukd oGm;yg/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 102 -
U Soe Tint Siemens PLC S7-200

2. System Block xJu Retentive Ranges ukd click yg/

3. Range 0, Range 1, Range 2, Range 3, Range 4 wkdYukd rajymif;yJ 'Dtwkdif;xm;yg/

Range 5 rSm Data Area ukd MB vkdY a&G;vkdufyg/ Offset ukd 0 xm;yg/ Number of
Elements ukd 14 xm;yg/ NyD;&if OK ukd ESdyfyg/

4. PLC xJukd download vkyfyg/

'Dvkdvkyfvkduf&if
MB0 to MB13 u retentive memory jzpfoGm;NyD; MB14 to MB31
u non-retentive memory jzpfoGm;ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 103 -
U Soe Tint Siemens PLC S7-200

Saving the M Memory on Power Loss

PLC ukd supply vkyfxm;wJY electric power jywfawmufoGm;wJYtcg MB0 to MB13


xJ&Sd data awGukd EEPROM xJrSm odrf;qnf; vkdufygw,f/
PLC u electric power ukd jyefvnf&&SdwJYtcg EEPROM xJrSmodrf;xm;wJY MB0 to
MB13 xJ&Sd data awGukd RAM xJokdY jyefvnfwifykdYay;ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 104 -
U Soe Tint Siemens PLC S7-200

All V, M, T, and C memory is set as Retentive by default.

txufygZ,m;twkdif; Range 5 = MB, 14, 18 qkd&if MB0 to MB13 u non-


retentive jzpfNyD;? MB14 to MB31 txd byte aygif; 18-cku retentive jzpfygw,f/
'Dae&mrSm Offset &JU t"dyg,fu tpjyKwJY byte &JU eHygwf (starting byte number)
jzpfygw,f/ Offset = 14 &JU t"dyg,fu MB14 rSpwifNyD;vkdY jzpfygw,f/
Number of Elements &JU t"dyg,fu pkpkaygif; byte ta&twGufjzpfygw,f/
Number of Elements = 18 &JU t"dyg,fu MB14 tygt0if byte aygif; 18-ckqkdawmh
MB14 to MB31 jzpfygw,f/
PLC ukd supply vkyfxm;wJY electric power jywfawmufoGm;wJYtcg MB14 to
MB31 xJ&Sd data awGukd EEPROM xJrSm odrf;qnf; vkdufygw,f/
PLC u electric power ukd jyefvnf&&SdwJYtcg EEPROM xJrSmodrf;xm;wJY MB14
to MB31 xJ&Sd data awGukd RAM xJokdY jyefvnfwifykdYay;ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 105 -
U Soe Tint Siemens PLC S7-200

txufygZ,m;twkdif; Range 5 = MB, 0, 10 qkd&if MB0 to MB9 txd byte


aygif; 10-cku retentive jzpfNyD;? MB10 to MB31 u non-retentive jzpfygw,f/
'Dae&mrSm Offset &JU t"dyg,fu tpjyKwJY byte &JUeHygwf (starting byte number) jzpf
ygw,f/ Offset = 0 &JU t"dyg,fu MB0 rSpwifNyD;vkdY jzpfygw,f/
Number of Elements &JU t"dyg,fu pkpkaygif; byte ta&twGufjzpfygw,f/
Number of Elements = 10 &JU t"dyg,fu MB0 tygt0if byte aygif; 10-ckqkdawmh
MB0 to MB9 jzpfygw,f/
PLC ukd supply vkyfxm;wJY electric power jywfawmufoGm;wJYtcg MB0 to MB9
xJ&Sd data awGukd EEPROM xJrSm odrf;qnf; vkdufygw,f/
PLC u electric power ukd jyefvnf&&SdwJYtcg EEPROM xJrSmodrf;xm;wJY MB0 to
MB9 xJ&Sd data awGukd RAM xJokdY jyefvnfwifykdYay;ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 106 -
U Soe Tint Siemens PLC S7-200

txufygZ,m;twkdif; Range 5 = MB, 2, 10 qkd&if MB2 to MB11 txd byte


aygif; 10-cku retentive jzpfNyD;? MB0, MB1 eJY MB12 to MB31 wkdYu non-retentive
jzpfygw,f/
'Dae&mrSm Offset &JU t"dyg,fu tpjyKwJY byte &JUeHygwf (starting byte number) jzpf
ygw,f/ Offset = 2 &JU t"dyg,fu MB2 rSpwifNyD;vkdY jzpfygw,f/
Number of Elements &JU t"dyg,fu pkpkaygif; byte ta&twGufjzpfygw,f/
Number of Elements = 10 &JU t"dyg,fu MB2 tygt0if byte aygif; 10-ckqkdawmh
MB2 to MB11 jzpfygw,f/
PLC ukd supply vkyfxm;wJY electric power jywfawmufoGm;wJYtcg MB2 to MB11
xJ&Sd data awGukd EEPROM xJrSm odrf;qnf; vkdufygw,f/
PLC u electric power ukd jyefvnf&&SdwJYtcg EEPROM xJrSmodrf;xm;wJY MB2 to
MB11 xJ&Sd data awGukd RAM xJokdY jyefvnfwifykdYay;ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 107 -
U Soe Tint Siemens PLC S7-200

txufygtwkdif; MB 2 13 qkd&if MB2 to MB14 txd byte aygif; 13-cku


retentive jzpfNyD;? MB0, MB1 ESifh MB15 to MB31 wkdYu non-retentive jzpfygw,f/
'Dae&mrSm Offset &JU t"dyg,fu tpjyKwJY byte &JUeHygwf (starting byte number) jzpf
ygw,f/ Offset = 2 &JU t"dyg,fu MB2 rSpwifNyD;vkdY jzpfygw,f/
Number of Elements &JU t"dyg,fu pkpkaygif; byte ta&twGufjzpfygw,f/
Number of Elements = 13 &JU t"dyg,fu MB2 tygt0if byte aygif; 13-ckqkdawmh
MB2 to MB14 jzpfygw,f/
PLC ukd supply vkyfxm;wJY electric power jywfawmufoGm;wJYtcg MB2 to MB14
xJ&Sd data awGukd EEPROM xJrSm odrf;qnf; vkdufygw,f/
PLC u electric power ukd jyefvnf&&SdwJYtcg EEPROM xJrSmodrf;xm;wJY MB2 to
MB14 xJ&Sd data awGukd RAM xJokdY jyefvnfwifykdYay;ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 108 -
U Soe Tint Siemens PLC S7-200

Special Memory SM
aemufxyfodxm;zkdY vkdtyfwJY Internal memory wpfrsKd;uawmh PLC ukd xkwfvkyf
vkdufuwnf;u olYt"dyg,feJYol owfrSwfxm;NyD;jzpfwJY special memory bit awG
jzpfMuygw,f/ byte tjzpf zGJYpnf;wnfaqmufxm;ygw,f/
S7-200 CPU224 xJrSm Special Memory SM vkdY ac:wJY internal memory bit aygif;
(SM0.0 to SM549.7) 550 bytes x 8 bits = 4400 bits yg&Sdygw,f/
tJ'D special memory xJu tokH;rsm;wJY read only SM bit wcsKdUukd atmufrSm az:
jyxm;ygw,f/
Special memory SM awG[m non-volatile memory trsKd;tpm;rsm;jzpfMuygw,f/
Special Memory Byte SMB0 (SM0.0 to SM0.7)

PLC ukd RUN xm;&if SM0.0 u ON jzpfaeygw,f/

RUN &if 1-scan ON ygw,f /

30s ON, 30s OFF jzpfa eygw,f/

1 Scan ON, 1 Scan OFF wvS n f h p D jzpfaeygw,f/

SM0.0 u PLC ukd RUN xm;&if tNrJ ON aeygw,f/


SM0.1 u PLC ukd RUN vkduf&if yxr scan cycle om ON jzpfygw,f/
SM0.2 u retentive memory awG aysmufysufoGm;&if scan cycle wpfBudrfom ON
jzpfygw,f/
SM0.3 u PLC ukd power supply jyefay;vkdY PLC u olYtvkdvkd RUN wJYtcgrSm
scan cycle wpfBudrfom ON jzpfygw,f/
SM0.4 u 30s Mumatmif ON vkduf 30s Mumatmif OFF vkduf jzpfaewJY 1 minute
clock pulse jzpfygw,f/
SM0.5 u 0.5s Mumatmif ON vkduf 0.5s Mumatmif OFF vkduf jzpfaewJY 1 sec
clock pulse jzpfygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 109 -
U Soe Tint Siemens PLC S7-200

SM0.6 u scan cycle wpfBudrfMumatmif ON vkduf scan cycle wpfBudrfMumatmif


OFF vkduf jzpfaewJY scan cycle clock pulse jzpfygw,f/
SM0.7 u Mode Switch ukd TERM rSm xm;&if OFF jzpfaeNyD;? Mode Switch ukd
RUN rSm xm;&if ON jzpfaeygw,f/

Special Memory Words SMW22 to SMW26

PLC ukd RUN vkdufwmeJY scan cycle pwifvnfywfygw,f/ Scan wpfywfvnf


wmukd 1 scan vkdY ac:ygw,f/ Scan wpfywfvnfzkdY MumwJY tcsdefukd scan time vkdY ac:
ygw,f/
SMW22 xJrSm aemufqkH;tBudrf scan time ukd a&;rSwfxm;ygw,f/
SMW24 xJrSm twkdqkH; scan time ukd a&;rSwfxm;ygw,f/
SMW26 xJrSm t&SnfqkH; scan time ukd a&;rSwfxm;ygw,f/
tJ'D scan time awGukd az:jywJY SMW22, SMW24, SMW26 wkdYukd program a&;wJY
tcg ,lNyD;okH;vkdY &ygw,f/ 4if;wkdYukd word tjzpf zGJYpnf;wnfaqmufxm;ygw,f/

Special Memory Bytes SMB28 and SMB29

Analog potentiometer 0 (VR0) &JU position ay:rlwnfNyD;jzpfay:vmwJY digits u 0


to 255 jzpfygw,f/ VR0 ukd b,fbuf tqkH;txd vSnfhxm;&if 0 jzpfygw,f/ VR0 ukd
nmbuf tqkH;txd vSnfhxm;&if 255 jzpfygw,f/ tJ'Dwefzkd;awGukd SMB28 xJrSm
a&;rSwfxm;ygw,f/
Analog potentiometer 1 (VR1) &JU position ay:rlwnfNyD;jzpfay:vmwJY digits u 0
to 255 jzpfygw,f/ VR1 ukd b,fbuf tqkH;txd vSnfhxm;&if 0 jzpfygw,f/ VR1 ukd
nmbuf tqkH;txd vSnfhxm;&if 255 jzpfygw,f/ tJ'Dwefzkd;awGukd SMB29 xJrSm
a&;rSwfxm;ygw,f/
The more you learn about PLCs, the more you will be able to solve other control problems.
- 110 -
U Soe Tint Siemens PLC S7-200

tJ'D VR0 (SMB28) eJU VR1 (SMB29) wkdY&JUwefzkd;awGukd program a&;wJYtcg


,lNyD;okH;vkdY &ygw,f/ 4if;wkdY[m byte rsm;jzpfMuygw,f/
SMB28 ukd tokH;jyKxm;wJY erlem program ukd atmufrSm a&;jyxm;ygw,f/

Example (28) ON-delay Timer Program using SMB28

I0.0 = ON jzpf&if SMB28 (VR0) xJuwefzkd;ukd integer wefzkd;tjzpf ajymif;NyD;


VW1 (V memory) xJrSm odrf;ygw,f/ VW1 xJ&Sdwefzkd;u SMB28 xJ&Sdwefzkd;eJY nDyg
w,f/ SMB28 xJ&Sdwefzkd;u VR0 (Analog potentiometer 0) &JU position ay: rlwnf
aeygw,f/
I0.0 = ON jzpf&if T38 u time counting pwifjyKvkyfygw,f/ T38 &JU PT (preset
time) ukd VW1 xJ&SdwJYwefzkd;eJY owfrSwfxm;ygw,f/ T38 &JU preset time setting u
VR0 (Analog potentiometer 0) &JU position ay: rlwnfaeygw,f/
T38 = ON rS Q0.0 = ON jzpfygw,f/ T38 = ON jzpfzkdY MumwJYtcsdefukd VR0 ukd
vSnfhNyD; ajymif;ay;Ekdifygw,f/

On delay Function
ON
I0.0
OFF
ON
Q0.0 OFF

Delay time ukd VR0 vSnfh


NyD; ajymif;Ekdifygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 111 -
U Soe Tint Siemens PLC S7-200

Variable memory V

Byte taeeJYjzpfjzpf? Word taeeJYjzpfjzpf? tokH;jyKavY&SdwJY internal memory aemuf


wpfrsKd; u Variable memory V jzpfygw,f/
S7-200 CPU224 (Order No. 6ES7 214-1BD23-0XB0) xJrSm Variable Memory
Area: V vkdY ac:wJY Internal memory byte aygif; (VB0 to VB8191) 8192 bytes
yg&Sdygw,f/ Byte taeeJYokH;zkdY &nff&G,fNyD; Byte tjzpf zGJYpnf;wnfaqmufxm;wJY
internal memory jzpfygw,f/ Bit 1-ckcsif;pDukd read or write vkyfvkdY&ovkd Byte 1-ckcsif;
pD ukdvnf; read or write vkyfvkdY &ygw,f/ Word tjzpfeJYvnf; read or write vkyfvkYd &
ygw,f/
Bit 1-ckcsif;pDukd &nfTef;NyD; address ay;r,fqkd&if V[byte address].[bit address]
V0.0, V0.1, V0.2 (byte0 &JU bit0, byte0 &JU bit1, byte0 &JU bit2) pojzifh a&;&ygw,f/
Bit 8-ckygwJY byte tjzpf &nfTef;NyD; address ay;r,f qkd&if V[size][starting byte
address] VB0, VB1, VB2 (byte0, byte1, byte2) pojzifh a&;&ygw,f/
Bit 16-ckygwJY word (2 bytes) tjzpf &nfTef;NyD; address ay;r,fqkd&if
V[size][starting byte address] VW0, VW2, VW4 pojzifh a&;&ygw,f/ VW0 xJrSm
byte0 eJU byte1 yg0ifygw,f/ VW2 xJrSm byte2 eJU byte3 yg0ifygw,f/
'gaMumifh VW0, VW1 vkdY address ra&;&ygbl;/ VW0 (byte0 & byte1) xJrSmygwJY
byte1 eJY VW1 (byte1 & byte2) xJrSm ygwJY byte1 csif; xyfaevkdY jzpfygw,f/
Bit 32-ckygwJY double word (4 bytes) tjzpf &nfTef;NyD; address ay;r,fqkd&if
V[size][starting byte address] VD0, VD4, VD8 pojzifh a&;&ygw,f/ VD0 xJrSm
byte0, byte1, byte2 eJU byte3 wkdY yg0ifygw,f/ VD4 xJrSm byte4, byte5, byte6 eJU byte7
wkdY yg0ifygw,f/ VD8 xJrSm byte8, byte9, byte10 eJU byte11 wkdY yg0ifygw,f/
'gaMumifh VD0, VD2 vkdY address ra&;&ygbl;/ VD0 (byte0 to byte3) xJrSm ygwJY
byte2 & byte3 eJY VD2 (byte2 to byte5) xJrSm ygwJY byte2 & byte3 wkdY xyfaevkdY jzpfyg
w,f/

rSwfcsuf/ / S7-200 CPU224 (Order No. 6ES7 214-1BD22-0XB0) xJrSm variable


register vkdYac:wJY V memory byte aygif; (B0 V0 to V5119) 5120 bytes om
yg&Sdygw,f / aemufxGufwJY PLC u memory ykdrkdyg0ifygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 112 -
U Soe Tint Siemens PLC S7-200

Using Your Program to Save V Memory to the EEPROM

Siemens PLC S7-200 CPU224 AC/DC/RLY xJrSm program ukd Mum&SnfwnfwHY


ckdifNrJpGm odrf;qnf;xm;EkdifwJY permanent memory (EEPROM) yg&Sdygw,f/ EEPROM
xJu data awG[m PLC ukd electric power supply ay; rxm;&ifvnf; aysmufysuf
roGm;ygbl;/
PLC ukd ay;oGif;xm;wJY electric power supply r&Sdawmh&if V memory xJu data
awG[m Mum&SnfwnfwHh raeEkdifygbl;/ ceom rSwfxm;EkdifpGrf; &Sdygw,f/
V memory xJu data awGukd EEPROM xJokdY ajymif;a&TUNyD; odrf;qnf;xm;jcif;
tm;jzifh V memory xJu data awGukd Mum&Snf wnfwHhckdifNrJaeatmif aqmif&GufEkdifyg
w,f/
tJ'Dvkdajymif;a&TUwJYtBudrfaygif; teJqkH; tBudrfwpfodef; (ykHrSefqkd&if tBudrfwpf
oef;) txd EEPROM u aqmif&GufEkdifygw,f/
owdjyK&efrSm scan cycle wpfywfvnfcsdef 1-scan time u 50ms jzpfaeNyD; scan
cycle wpfywfvnfwkdif; EEPROM xJukd V memory xJu data awG ajymif;a&;aer,f
qkd&if 50ms x 100,000 = 5,000s Mum&if (5,000s [m 1-em&DcGJcefYom Mumygw,f/)
EEPROM &JUoufwrf; ukefawmhrSm jzpfygw,f/ wpfem&D wpfBudrfom EEPROM xJukd
a&;oGif;r,fqkd&ifawmh 11-ESpf avmuf MumrS EEPROM &JUoufwrf; ukefqkH;rSm jzpfyg
w,f/
'gaMumifh xl;jcm;wJYtajctae wpfckck jzpfay:rSom EEPROM xJukd a&;oGif;wJY
tvkyfukd aqmif&Gufatmif program ukd a&;xm;oifhygw,f/ V memory xJu data
awGukd EEPROM xJrSm a&;rSwfwJYtcgwkdif; t&ifa&;rSwfxm;wmawGukd zsufNyD;rS
topfa&;wm jzpfygw,f/
Save-to-EEPROM qkdwJY vkyfaqmifcsuf operation u memory cartridge xJrSm&SdwJY
data awGukd update rvkyfay;ygbl;/ EEPROM eJY memory cartridge uoD;jcm; device
wpfckpD jzpfygw,f/
PLC 0,f,lpOfuwnf;u PLC xJrSm EEPROM u yg&Sdaewm jzpfNyD; memory
cartridge uawmh PLC 0,f,lpOfu ryg&SdyJ tokH;jyKol user u xyfrH0,f,l wwfqif&
wJY ypnf;jzpfygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 113 -
U Soe Tint Siemens PLC S7-200

Copying V Memory to the EEPROM

V memory xJu data ukd EEPROM xJ ajymif;a&;zkdYtwGuf SMB31 ukd tokH;jyK&


ygw,f/ ul;a&;&r,fh V memory xJu data &SdwJYae&mukd TefjywJY address ukd SMW32
xJrSm odrf;xm;&ygw,f/
V memory xJu data ukd EEPROM xJ ajymif;a&;zkdY program ukd a&;wJYtcg
atmufygtwkdif; pDpOfaqmif&Guf&ygw,f/

1. EEPROM xJ odrf;xm;csifwJY data awG&SdwJY V memory &JU address (e.g. VW20,


VW100) ukd OD;pGmyxr SMW32 xJ move vkyfxm;&ygw,f/

2. EEPROM xJrSm data size ukd word tjzpfeJYodrf;rSmvm;? byte tjzpfeJYodrf;rSm


vm;? qkdwmukd a&G;cs,fowfrSwfay;&ygw,f/

SMB31 xJukd bmrSra&;&if SMB31 &JU bit1 (SM31.1) u 0 jzpfNyD;? SMB31 &JU bit0
(SM31.0) uvnf; 0 yJ jzpfygw,f/ SM31 &JU bit1, bit0 u 0, 0 qkd&if data size ukd
byte (8 bits) tjzpf a&G;cs,fxm;wm jzpfygw,f/

SMB31 xJukd 1 a&;xnfhvkduf&if ykHrSmjyxm;ovkd SM31.1 u 0 (OFF) jzpfNyD;?


SM31.0 u 1 (ON) jzpfygw,f/ SM31 &JU bit1, bit0 u 0, 1 qkd&ifvnf; data size ukd
byte (8 bits) tjzpf a&G;cs,fxm;wm jzpfygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 114 -
U Soe Tint Siemens PLC S7-200

SMB31 xJukd 2 a&;xnfhvkduf&if ykHrSmjyxm;ovkd SM31.1 u 1 (ON) jzpfNyD;?


SM31.0 u 0 (OFF) jzpfygw,f/ SMB31 &JU bit1, bit0 u 1, 0 qkd&if data size ukd word
(16 bits) tjzpf a&G;cs,fvkdufwmjzpfygw,f/

SMB31 xJukd 3 a&;xnfhvkduf&if ykHrSmjyxm;ovkd SM31.1 u 1 (ON) jzpfNyD;?


SM31.0 uvnf; 1 (ON) jzpfygw,f/ SMB31 &JU bit1, bit0 u 1, 1 qkd&if data size u
double word (32 bits) jzpfygw,f/

3. EEPROM xJ a&;rSwfckdif;wJY instruction code jzpfwJY SM31.7 ukd 1 (ON) jzpf


atmif program ukd a&;ay;&ygw,f/ V memory xJu data awG EEPROM xJukd
ajymif;a&;NyD;wJY tcg SM31.7 u olYtvkdvkd 0 jyefjzpfoGm;ygw,f/
erlem program ukd atmufrSm a&;jyxm;ygw,f/
Sample Program: Copying V Memory to the EEPROM

I0.0 tNrJwrf; ON jzpfae&ifvnf; &JU logic result u


wpfBudrfom true jzpfygw,f/

rSm SM31.7 u OFF jzpfaeNyD; I0.0


u ON jzpf&if? Logic result u wpfBudrfom true jzpfygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 115 -
U Soe Tint Siemens PLC S7-200

&JU
logic result u true jzpf&if tvkyf
3-rsKd;jzpfwJY
MOV_W (move word), MOV_B (move byte) eJY S (set) wkdYukd wpfrsKd;
vkyfNyD;rS aemufwpfrsKd;ukd atmufygtwkdif;vkyfygw,f/

1. MOV_W (move word) u SMW32 xJukd 100 a&;xnfhygw,f/ 100 qkdwm


VW100 jzpfygw,f/ EEPROM xJa&;rSwf&r,fh V Memory [m VW100 jzpfygw,fvkdY
address ay;NyD; Tefjyvkdufwm jzpfygw,f/

2. MOV_B (move byte) u SMB31 xJukd 1 a&;xnfhygw,f/ SMB31 xJukd 1 a&;


vkdufawmh SM31.0 u ON jzpfoGm;ygw,f/ Data size ukd byte tjzpf owfrSwfvkdufwm
jzpfygw,f/

3. SM31.7 ukd Set (ON) vkyfvkdufygw,f/ SM31.7 u 1 (ON) jzpfoGm;wJYtwGuf V


memory xJu data awG EEPROM xJukd ajymif;a&;ygw,f/ a&;NyD;wJY tcg SM31.7 u
olYtvkdvkd 0 jyefjzpfoGm;ygw,f/

Special Memory Byte SMB31 and Special Memory Word SMW32

The more you learn about PLCs, the more you will be able to solve other control problems.
- 116 -
U Soe Tint Siemens PLC S7-200

ykHrSm az:jyxm;ovkd S7-200 CPU224 rSm Memory cartridge okdYr[kwf Real-time


clock okdYr[kwf Battery xnfhoGif;wwfqifvkdY &wJYae&mwck yg&Sdygw,f/ Memory
cartridge ukd tJ'Dae&mrSm wwfqifxm;NyD; program ukd backup vkyfxm;vkdY&ygw,f/
Memory cartridge xJrSm program block eJYtwl data block, system block wkdYukd
odrf;qnf;xm;Ekdifygw,f/

Storing your Program on a Memory Cartridge

Program ukd Memory Cartridge xJ ul;a&;NyD;odrf;xm;csif&if OD;pGmyxr PLC rSm


Memory Cartridge ukd 0,f,lwwfqifNyD; PC eJY qufoG,frI communicate vkyf&yg
w,f/ PLC ukd STOP vkyfxm;yg/
1. PLC ukd STOP vkyfyg/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 117 -
U Soe Tint Siemens PLC S7-200

2. STEP 7-MicroWIN ukd zGifhNyD; memory cartridge xJrSm odrf;xm;csifwJY program


ukd zGifhyg/
3. tJ'D program ukd PLC xJodkY download t&ifvkyfyg/

4. PLC Program Memory Cartridge ukd oGm;yg/

5. Program button ukd click yg/ 'gqkd&if PLC xJu program ukd memory
cartridge xJokdY download vkyfoGm;ygvdrfhr,f/
6. Memory cartridge ukd jzKwf,lodrf;qnf;xm;csif&if PLC ukd electric power
supply ydwfNyD;rS memory cartridge ukd jzKwf,lodrf;qnf;yg/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 118 -
U Soe Tint Siemens PLC S7-200

Restoring the Program and Memory with a Memory Cartridge

Memory cartridge xJrSm odrf;qnf;xm;wmawGukd PLC xJ jyefykdYcsif&if PLC uld


electric power supply ydwfNyD; memory cartridge ukd jyefvnfwwfqifyg/ NyD;&if PLC ukd
electric power supply jyef ON ay;vkdufyg/
'DtcgrSm
1. Memory cartridge xJrSm&SdwmeJY EEPROM xJ&SdwmawG rwlnDcJY&if RAM xJu
data awGtm;vkH;ukd t&if zsufypfygw,f/
2. Memory cartridge xJu data awGukd RAM xJokdY ul;a&;ygw,f/
3. Program block, system block eJY data block xJu data awGukd EEPROM xJokdY
ul;a&;ygw,f/

rSwfcsuf/ / Memory cartridge ukd CPU221 okdYr[kwf CPU222 rSm wwfqif NyD; od rf;xm;wm
ukd CPU224 u zwfEkdifygw,f/ Memory cartridge ukd CPU224 rSm wwfqifNyD;
odrf;qnf; xm;wmukdawmh CPU221 odkYr[kwf CPU222 wkdYu rzwfEkd ifygbl ;/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 119 -
U Soe Tint Siemens PLC S7-200

Accumulators AC

Internal memory aemufwpfrsKd;uawmh Accumulators AC vkdY ac:ygw,f/


Bit 32-ckygwJY double word (4 bytes) trsKd;tpm;jzpfNyD; AC0,AC1, AC2 eJY AC3 vkdY
32-bit accumulator 4-ckom yg&Sdygw,f/
Accumulator AC awGukd Byte vkdvnf; okH;vkdY&ygw,f/ Word vkdvnf; okH;vkdY&yg
w,f/ Double Word vkdvnf; okH;vkdY&ygw,f/
Byte tjzpfokH;rvm;? Word tjzpfokH;rvm;? Double Word tjzpfokH;rvm;? qkdwJY
a&G;cs,frIukd tokH;jyKwJY instruction code awGu xrf;aqmifoGm;wm jzpfygw,f/
Address a&;wJYtcg AC0 vkdYoma&;&ygw,f/ ACB0, ACW0, ACD0 vkdY ra&;&yg
bl;/

Oyrm?
MOV_B, AC2, VB200 vkdY a&;xm;&if AC2 ukd 8-bit tpktzGJY Byte vkdY
owfrSwfNyD; tokH;jyKvkdufwm jzpfygw,f/

'Dvkda&;xm;&if

AC2 xJrSm aygif; 32-ck &Sdaomfvnf;


bit AC2 ukd byte tjzpf owfrSwfNyD; bit0 to
bit7 txd 8 bits ukdom tokH;jyKygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 120 -
U Soe Tint Siemens PLC S7-200

Oyrm DEC_W, AC1, VW100 vkdY a&;xm;&if AC1 ukd 16-bit tpktzGJYvkdY
owfrSwfNyD; tokH;jyKvkdufwm jzpfygw,f/

'Dvkda&;xm;&if

AC1 xJrSm bit aygif; 32-ck &Sdaomfvnf; AC1 ukd Word tjzpf owfrSwfNyD; bit0 to
bit15 txd 16 bits ukdom tokH;jyKygw,f/

Oyrm INC_DW, AC3, VD250 vkdY a&;xm;&if AC3 ukd 32-bit tpktzGJYvkdY
owfrSwfNyD; tokH;jyKvkdufwm jzpfygw,f/

'Dvkda&;xm;&if

AC3 xJrSm bit aygif; 32-ck &Sdaomfvnf; AC3 ukd Double Word tjzpf owfrSwfNyD;
bit0 to bit31 txd 32 bits tm;vkH;ukd tokH;jyKygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 121 -
U Soe Tint Siemens PLC S7-200

Timer Memory Area (T)

Timer memory xJrSm Current value eJY Timer bit qkdNyD; variable 2-rsKd;
yg&Sdygw,f/
Current value qkdwmu timer u a&wGufNyD;om; ta&twGufjzpfygw,f/ Current
value (Present value) ukd timer twGuf owfrSwfay;xm;wJY 16-bit tpktzGJYjzpfwJY word
xJrSm a&;rSwfygw,f/
Timer bit uawmh timer u ola&wGuf&r,fh ta&twGuf PT (Preset Time) ukd
a&wGufaeqJqkd&if tJ'D timer bit u OFF jzpfaeygw,f/ Timer a&wGufNyD;wJY
ta&twGufu PT eJY nDoGm;&if tJ'D timer bit u ON jzpfoGm;ygw,f/

Siemens PLC S7-200 xJrSmygwJY Timer taMumif;


Timer eJYywfoufNyD;odxm;&r,fh tcsufawGuawmh atmufygtwkdif; jzpfygw,f/
1/ Timer type (wkdifrm trsKd;tpm;)
2/ Timer No. (wkdifrm eHygwf)
3/ Time base or Resolution (1 digit ajymif;zdkY MumwJhtcsdef)
4/ PT (preset time) (a&wGuf&r,fh digits)
5/ Current value (a&wGufNyD;om;vuf&Sdwefzdk;)

S7-200 CPU224 xJrSm&SdwJY timer trsKd;tpm;awGuawmh TON (ON-Delay Timer),


TONR (Retentive ON-Delay Timer), TOF (OFF-Delay Timer), BGN_ITIME (Capture
Beginning Interval Time), eJY CAL_ITIME (Capture Interval Time) wkdY jzpfMuygw,f/
'DpmtkyfrSm tajccHjzpfwJY Timer 3-rsKd; taMumif;ukdom a&;om;az:jyoGm;rSmjzpfyg
w,f/ tJ'gawGuawmh ON-delay timer jzpfwJY TON, Retentive ON-delay timer jzpfwJY
TONR eJY OFF-delay timer jzpfwJY TOF wkdYjzpfMuygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 122 -
U Soe Tint Siemens PLC S7-200

1. Timer trsKd;tpm; awGuawmh retentive timer eJY non-retentive timer wkdY jzpfMuyg
w,f/ TONR u retentive ON-delay timer jzpfygw,f/ TON u non-retentive ON-
delay timer jzpfygw,f/ TOF u non-retentive OFF-delay timer jzpfygw,f/

2. Timer Numbers T0 to T255 txd S7-200 CPU224 xJrSm yg&Sdygw,f/


T0 eJY T64 u TONR twGufjzpfNyD; 1ms timer jzpfygw,f/
T1 to T4 eJY T65 to T68 uvnf; TONR twGufjzpfNyD; 10ms timer jzpfygw,f/
T5 to T31 eJY T69 to T95 uvnf; TONR twGufjzpfNyD; 100ms timer jzpfygw,f/
T32 eJY T96 u TON eJY TOF wkdY twGufjzpfNyD; 1ms timer jzpfygw,f/
T33 to T36 eJY T97 to T100 uvnf; TON eJY TOF wkdY twGufjzpfNyD; 10ms timer
jzpfygw,f/
T37 to T63 eJY T101 to T255 uvnf; TON eJY TOF wkdY twGufjzpfNyD; 100ms
timer jzpfygw,f/

3. Time baseqkdwmu time counting vkyfwJYtcg 1 digit ajymif;zkdY MumwJYtcsdef


jzpfygw,f/ Z,m;rSm az:jyxm;ovkd time base eJY timer number ukd ykHaowGJay;xm;yg
w,f/

qkdwmuawmh time counting vkyfwJYtcg a&wGuf&r,fh


4. PT (preset time) digit
ta&twGuf jzpfygw,f/ PT ukd SV (set value) vkdYvnf; ac:ygw,f/

5. Current value qkdwmuawmh time counting vkyfNyD;om; vuf&Sdwefzkd; digit ta&


twGuf jzpfygw,f/ Current value ukd present value vkdYvnf; ac:ygw,f/ Accumulated
value vkdYvnf; ac:ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 123 -
U Soe Tint Siemens PLC S7-200

Non-retentive timer trsKd;tpm;&JU vkyfaqmifykHu time counting vkyz f kdY owfrSwf


xm;wJY condition u true jzpf&if time counting pwifjyKvkyfNyD;? time counting vkyfzkYd
owfrSwfxm;wJY tcsdefapY&if timer u ON jzpfygw,f/
Time counting vkyfzkdY owfrSwf xm;wJY condition u false jzpfoGm;&if time
counting vkyfwmvnf;&yf? current value (counted value) vnf; reset to zero (0) jzpfoGm;
ygw,f/
Timer u ON jzpfaeNyD;om;tcsdefrSm time counting vkyfzkdY owfrSwfxm;wJY
condition u false jzpfoGm;&if timer vnf; OFF jzpff? current value (counted value) vnf;
reset to zero (0) jzpfoGm;ygw,f/
Timer reset jzpfatmif oD;jcm; command a&;ay; zkdY rvkdygbl;/
Time counting vkyfzkdYowfrSwfxm;wJY condition u true jyefjzpfwJYtcg time
counting pwifjyKvkyfjyefygw,f/ Current value zero (0) u jyefpwmjzpfygw,f/

Retentive timer trsKd;tpm;&JUvkyfaqmifykHu time counting vkyfzkdYowfrSwfxm;wJY


condition u true jzpf&if time counting pwifjyKvkyf NyD;? time counting vkyfzkdY owfrSwf
xm;wJY tcsdefapY&if timer u ON jzpfygw,f/
Time counting vkyfzkdY owfrSwfxm;wJY condition u false jzpfoGm;wJYtcg time
counting vkyfwmom &yfoGm;ygw,f/ Current value ukd reset to zero rvkyfygbl;/
Timer reset jzpfzkdY condition owfrSwfay;jyD; reset instruction oyfoyfa&;ay;&yg
w,f/
Time counting vkyfzkdY owfrSwfxm;wJY condition u false jzpfoGm;wJYtcg current
value (counted value) ukd a&muf&SdaewJY digit twkdif; rSwfxm;ygw,f/
Time counting vkyfzkdY owfrSwfxm;wJY condition u false jzpfoGm;wJYtcg timer u
ON jzpfaeNyD;om; qkd&ifvnf; timer u OFF jzpfroGm;ygbl;/ Pause yJ jzpfoGm;ygw,f/
Time counting vkyfzkdYowfrSwfxm;wJY condition u true jyefjzpfvkdY time counting
jyefvkyfwJYtcg tpu jyefpwmr[kwfygbl;/ apmapmu rSwfxm;wJY counted digit value
ukd qufNyD; count up vkyfwmom jzpfygw,f/ Time resume vkyfwm jzpfygw,f/

rSwfcsuf / / Retentive timer taMumif;ukd pmrsuf ESm (136) ES ifh (219) wGif Munfhyg/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 124 -
U Soe Tint Siemens PLC S7-200

Function of ON-Delay Timer

T37 u 100ms timer jzpfygw,f/


IN u Enabling Input jzpfygw,f/ IN rSm owfrSwfaz:jyxm;wJY condition u true
jzpfrS timer T37 u time counting vkyfygw,f/
TON u ON-delay timer instruction code jzpfygw,f/
PT u time counting vkyfzkdYowfrSwfxm;wJY digit ta&twGufukd az:jywJY preset
time jzpfygw,f/ 100ms (Time Base) u 1 digit count vkyfzkdY MumwJYtcsdef jzpfygw,f/
PT ukd 30 vkdYa&;xm;wJYtwGuf time counting vkyfwJYtcg 30 digits count vkyf&yg
w,f/ 1 digit count vkyfzkdY 100ms Mumygw,f/ 30 digits qkdawmY 30 x 100ms = 3000ms
= 3s Mumygw,f/ I0.0 = ON jzpfNyD; 3s MumrS T37 = ON jzpfygw,f/
TON [m non-retentive timer jzpfwmaMumifY I0.0 = ON jzpf&if time counting
vkyfNyD; I0.0 = OFF jzpfoGm;wJYtcg timer reset jzpfygw,f/ I0.0 = ON jzpfNyD; 3s rjynfhrD
I0.0 u OFF jyefjzpfoGm;&if T37 = ON rjzpfcifrSm reset current value to 0 jzpfoGm;yg
w,f/
I0.0 = ON jzpfNyD; 3s Mum&if T37 u ON jzpfygw,f/ I0.0 = ON jzpfNyD; 5s Mum
awmhrS I0.0 u OFF jzpfoGm;&if T37 = ON jzpfNyD; 2s tMumwGif timer reset jzpfygw,f/
Timer reset jzpf wJYtcg current value tm;vkH;ukd zsufypfygw,f/ Clear to zero vkyf
ypfygw,f/ Timer u ON NyD;om; jzpfae&ifvnf; Timer = OFF jyefjzpfoGm;ygw,f/
T37 = ON jzpfrS Q1.0 u ON jzpfygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 125 -
U Soe Tint Siemens PLC S7-200

Status Time Diagram

ON
I0.0
OFF

3s

ON
T37
OFF

ON
T37 OFF

ON
Q1.0 OFF

S7-200 CPU224 rSmyg&SdwJY ON-Delay Timer &JUxl;jcm;csufu timer u ON jzpfoGm;


NyD;&ifvnf; time counting qufvkyfygaew,f/ trsm;qkH; digit wefzkd; 32767 ukd a&muf
awmYrS time countig vkyfwm &yfoGm;ygw,f/
'gaMumifY TON wpfckwnf;ukd okH;NyD; time awGukd cGJa0okH;pGJvkdY &ygw,f/
Program ukd atmufrSm az:jyxm;ovkd a&;NyD; TON (T37) wpfckwnf;eJY tcsdefukd
2-rsKd;? 3-rsKd;? cGJNyD;ckdif;vkdY &ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 126 -
U Soe Tint Siemens PLC S7-200

t"dyg,f&Sif; vif;csuf

I1.2 = ON jzpf&if T37 u time counting pwifjyKvkyfNyD; 10s MumwJYtcg T37 u


ON jzpfoGm;ygw,f/ ON jzpfNyD;aemuf time counting qufvkyfygw,f/ T37 [m 100ms
timer jzpfwJYtwGuf 1 digit count vkyfzkdY 100ms Mumygw,f/ T37 [m non-retentive
timer jzpfwJYtwGuf I1.2 u OFF jzpfoGm;&if T37 u OFF (reset) jzpfygw,f/

T37u ON jzpfawmY Q0.0 uvnf; ON jzpfoGm;ygw,f/ I1.2 = ON jzpfNyD; 10s


MumawmYrS T37 u ON jzpfvkdY Q0.0 yg ON oGm;wm jzpfygw,f/

T37 &JU current value u 50 eJY nD&ifyJjzpfjzpf? BuD;&ifyJjzpfjzpf? Q0.1 u ON jzpfyg


w,f/ I1.2 = ON jzpfNyD; 5s tMumrSm Q0.1 u ON oGm;wmjzpfygw,f/ Q0.1 u Q0.0
xuf 5s apmNyD; ON ygw,f/

T37 &JU current value u 150 eJYnD&if (okdYr[kwf) current value u 150 xufBuD;&if
Q0.2 u ON jzpfygw,f/ I1.2 = ON jzpfNyD; 15s tMumrSm Q0.2 u ON oGm;wmjzpfyg
w,f/ Q0.0 u Q0.2 xuf 5s apmNyD; ON ygw,f/
I1.2 = ON jzpfNyD; 5s tMumrSm Q0.1 u ON jzpfygw,f/
I1.2 = ON jzpfNyD; 10s tMumrSm Q0.0 u ON jzpfygw,f/
I1.2 = ON jzpfNyD; 15s tMumrSm Q0.2 u ON jzpfygw,f/
T37uawmh r&yfrem; time counting qufvkyfaeNyD; current value = 32767 jzpf
oGm;awmYrS counting vkyfwm&yfoGm;ygw,f/ T37 u quf ON aeygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 127 -
U Soe Tint Siemens PLC S7-200

Example (29) ON-delay Timer Program

On delay Function
ON
INPUT
OFF
OUTPUT ON
OFF
Delay

Input = ON jzpf&if Output u csufcsif; ON rjzpfao;bJeJY tcsdefapmifYqkdif; delay


NyD;rS Output = ON jzpfwmukd ON-delay vkdY ac:ygw,f/ Input = OFF jzpf&if Output u
csufcsif; OFF jzpfygw,f/

Delay ON Program

Status Time Diagram


ON
I0.0
OFF

3s

ON
T37
OFF
Time counting start here
ON
T37 OFF
ON
Q1.0 OFF

I0.0 = ON jzpf&if T37 u time counting pwifjyKvkyfygw,f/ 100ms timer jzpfwJY


twGuf counted digits = 30 digits (3 sec) jynfhrS T37 u ON jzpfoGm;ygw,f/ 100ms ukd
time base vkdY ac:ygw,f/ 1 digit ajymif;vJzkdY MumwJYtcsdef 100ms (0.1s) jzpfygw,f/
T37 = ON jzpfrS Q1.0 = ON jzpfygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 128 -
U Soe Tint Siemens PLC S7-200

Example (30) OFF-delay Timer Program

OFF-Delay Function
ON
INPUT
OFF

ON
OUTPUT
OFF
Delay

Input = ON jzpf&if Output u csufcsif; ON jzpfygw,f/ Input = OFF jzpf&if


Output u csufcsif; OFF rjzpfao;bJeJY tcsdefapmifYqkdif;NyD;rS Output = OFF jzpfwmukd
OFF-delay vkdY ac:ygw,f/
Delay OFF Program (using TON)

OFF-delay function ukd ON-delay timer function code TON eJY a&;jyxm;ygw,f/
S7-200 PLC xJrSm OFF-delay timer function code TOF qkdwm oD;jcm;yg&Sdygw,f/
I0.0 = ON jzpfae&if T37 u time counting rvkyfao;ygbl;/ Q1.0 = ON aewJY
tcsdefrSm I0.0 = OFF jzpfrSom T37 u time counting vkyfNyD; 5s jynfhawmh T37 = ON
jzpfygw,f/ T37 = ON jzpfvkdY Q1.0 u OFF jzpfoGm;ygw,f/
Status Time Diagram (using TON)

ON
I0.0
OFF
ON
T37 Time counting start here
OFF

ON
Q1.0
OFF

The more you learn about PLCs, the more you will be able to solve other control problems.
- 129 -
U Soe Tint Siemens PLC S7-200

Delay OFF Program (using TOF)

txufyg program ukd OFF-delay timer function code TOF eJY a&;jyxm;ygw,f/
Examine_ON eJY a&;xm;wmukd *&kjyKyg/
TOF &JUvkyfaqmifcsuf function u I0.0 = ON jzpf&if T37 ucsufcsif; ON jzpfoGm;
ygw,f/ I0.0 = OFF jzpf&if T37 (TOF) u time counting pwifjyKvkyfygw,f/ Current
value eJY PT eJY nDoGm;awmh T37 u OFF jzpfoGm;ygw,f/
txufyg program wGif I0.0 = OFF jzpfNyD; 5s MumawmYrS T37 u OFF jyefjzpfyg
w,f/
T37 = ON jzpf&if Q1.0 vnf; ON ygw,f/ I0.0 = OFF jzpfNyD; 5s MumawmYrS T37
u OFF jyefjzpfvkdY Q1.0 vnf; OFF ygw,f/
I0.0 = ON &if Q1.0 = ON NyD; I0.0 = OFF jzpfNyD; 5s Mum&if Q1.0 = OFF jzpfyg
w,f/

Status Time Diagram (using TOF)

ON 5s Delay
I0.0 OFF

ON
T37 OFF
Time counting start here
ON
Q1.0 OFF

The more you learn about PLCs, the more you will be able to solve other control problems.
- 130 -
U Soe Tint Siemens PLC S7-200

Example (31) ON-delay/OFF-delay Timer Program

ON/OFF-delay Function

OFF
-delay

ON-delay

Input = ON jzpf&if Output u csufcsif; ON rjzpfao;bJeJY tcsdefapmifYqkdif; delay


NyD;rS Output = ON jzpfygw,f/ Input = OFF jzpf&ifvnf; Output u csufcsif; OFF
rjzpfao;bJeJY tcsdefapmifYqkdif; delay NyD;rS Output = OFF jzpfygw,f/ 'Dvkd function rsKd;
ukd ON/OFF-delay vkdY ac:ygw,f/

Delay ON/Delay OFF Program

t"dyg,f&Sif; vif;csuf

Q1.0 = OFF jzpfaepOf I0.0 = ON jzpfrS T37 u time counting pwifjyKvkyfNyD; 5s


MumwJYtcg T37 = ON jzpfygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 131 -
U Soe Tint Siemens PLC S7-200

Q1.0 = ON jzpfaepOf I0.0 = OFF jzpfrS T38 u time counting pwifjyKvkyfNyD; 3s


Mum&if T38 = ON jzpfygw,f/

T38 = OFF jzpfjyD; T37 = ON jzpf&if Q1.0 = ON jzpfoGm;ygw,f/


Q1.0 = ON jzpfNyD;rS T37 u OFF jzpfoGm;&ifvnf; T38 = OFF jzpfaeoa&GU Q1.0
u qufNyD; ON aeygw,f/
T38 = ON jzpfrSom Q1.0 = OFF jzpfoGm;ygw,f/

Status Time Diagram


ON
I0.0
OFF

ON
T37
OFF

ON

T38
OFF

ON
Q1.0
OFF
5s 3s

The more you learn about PLCs, the more you will be able to solve other control problems.
- 132 -
U Soe Tint Siemens PLC S7-200

Example (32) Self-Resetting ON-Delay Timer Program

PLC ukd RUN vkdufwmeJY wNydKifeuf M0.0 u OFF jzpfaevkdY u true


jzpfNyD; T33 = time counting pwifjyKvkyfygw,f/
T33 u 10ms timer jzpfNyD; PT u 100 jzpfvkdY PLC ukd RUN NyD; (100 x 10ms =
1000ms) 1s MumwJYtcg T33 u ON jzpfygw,f/
T33 time counting vkyfwm 0.4s MumoGm;wJYtcsdefrSm T33 &JU current value u 40

jzpfoGm;vkdY u true jzpfNyD; Q0.0 u ON oGm;ygw,f/ T33 &JU current value u

40 ausmfoGm;&ifvnf; u true jzpfaevkdY Q0.0 uquf ON aeygw,f/


Q0.0 = ON jzpfaewm 0.6s MumoGm;awmh T33 time counting vkyfwmvnf; 1.0s
jynfhoGm;vkdY T33 = ON jzpfoGm;ygw,f/
T33 = ON jzpf&if M0.0 vnf; ON jzpfygw,f/

M0.0 = ON jzpfvkdY u false jzpfNyD; T33 u reset (OFF) jzpfoGm;ygw,f/


Current value uvnf; 0 (reset) jzpfoGm;ygw,f/

T33 &JU current value = 0 jzpfvkdY u false jzpfNyD; Q0.0 = OFF jzpfoGm;yg
w,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 133 -
U Soe Tint Siemens PLC S7-200

t"dyg,f&Sif; vif;csuf

T33 u 10ms timer jzpfygw,f/ M0.0 = OFF jzpf&if T33 time counting pwifvkyf
NyD; (100 x 10ms) 1s MumwJYtcg T33 = ON jzpfygw,f/
M0.0 = ON jzpf&if T33 = OFF jzpfygw,f/ Current value vnf; reset to 0 jzpfyg
w,f/

T33 &JU current value u 40 eJY nD&ifyJjzpfjzpf? 40 xufBuD;&ifyJjzpfjzpf u


true jzpfygw,f/
T33 &JU current value u (40 x 10ms) 0.4s ESifhnDwJY tcsdefupNyD; Q0.0 = ON jzpfyg
w,f/

T33 = ON jzpf&if M0.0 u ON jzpfygw,f/ M0.0 = ON jzpfoGm;awmh T33 u reset


(OFF) jzpfoGm;ygw,f/ T33 = OFF jzpfoGm;vkdY M0.0 vnf; OFF jyefjzpfoGm;ygw,f/
M0.0 = ON jzpfaewm 1 scan time om MumjrifYygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 134 -
U Soe Tint Siemens PLC S7-200

Status Time Diagram

value

value

ON
ON ON ON ON ON

OFF OFF OFF OFF OFF OFF

ON
OFF

PLC ukd RUN vkdufwmeJY wNydKifwnf; M0.0 u OFF jzpfaevkdY T33 u time
counting pwifjyKvkyfygw,f/
T33 u 10ms timer jzpfNyD; PT = 100 jzpfvkdY (100 x 10ms = 1000ms) 1s MumwJYtcg
T33 = ON jzpfygw,f/
T33 time counting vkyfwm 0.4s MumoGm;wJYtcsdefrSm T33 &JU current value u 40
jzpfoGm;vkdY Q0.0 u ON oGm;ygw,f/ T33 &JU current value u 40 ausmfoGm;&ifvnf;
Q0.0 uquf ON aeygw,f/
Q0.0 = ON jzpfaewm 0.6s MumoGm;awmh T33 u time counting vkyfaewmvnf;
1.0s jynfhoGm;vkdY T33 = ON jzpfoGm;ygw,f/
T33 = ON jzpf&if M0.0 vnf; ON jzpfygw,f/
M0.0 = ON jzpfvkdY T33 u OFF (reset) jzpfoGm;ygw,f/ Current value uvnf; 0
(reset) jzpfoGm;ygw,f/
T33 = ON jzpfaewm 1 scan time om MumjrifYygw,f/
T33 = OFF jzpfoGm;vkdY M0.0 vnf; OFF jyefjzpfoGm;ygw,f/
M0.0 = ON jzpfaewmvnf; 1 scan time om MumjrifYygw,f/
T33 &JU current value = 0 jzpfvkdY Q0.0 = OFF jzpfoGm;ygw,f/
Q0.0 = ON jzpfaewm 1.0s 0.4s = 0.6s MumjrifYygw,f/
PLC ukd RUN xm;oa&GU Q0.0 [m OFFtime = 0.4s, ONtime = 0.6s eJY ON vkduf
OFF vkduf qufwkdufjzpfaeygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 135 -
U Soe Tint Siemens PLC S7-200

Example (33) TONR Retentive On-Delay Timer Program

Retentive timer awG[m timer input condition u true jzpf&if time counting pwif
jyKvkyfNyD; timer input condition u false jzpfoGm;wJYtcg time counting vkyfwm &yfoGm;
ygw,f/ Counting vkyfNyD;om;wefzkd; counted value awGukd rSwfxm;ygw,f/ Counted
value ukd accumulated value vkdYvnf; ac:ygw,f/ Counted value ukd current value vkdY
vnf; ac:ygw,f/ Timer reset jzpfawmhrS counted value ukd clear to 0 vkyfygw,f/
u timer input condition false jzpfoGm;wJYtcg time counting vkyf
Retentive timer
wm &yfkHom&yfoGm;wmjzpfNyD; timer u reset jzpfroGm;ygbl;/ Reset instruction oD;jcm;
a&;ay;&ygw,f/

I0.0 = ON jzpf&if T1 u time counting pwifjyKvkyfygw,f/ T1 u 10ms timer


jzpfvkdY (100 x 10ms = 1s) 1s MumrS T1 = ON jzpfygw,f/

T1 = ON jzpfawmh Q0.0 u ON jzpfoGm;ygw,f/

I0.0 = OFF jzpfoGm;&ifvnf; T1 u reset rjzpfygbl;/ T1 ukd reset jzpfatmifvkdY


instruction code R (reset) ukd oD;jcm;a&;ay;&ygw,f/
I0.1 = ON jzpfrS T1 u reset (OFF) jzpfygw,f/ Current value ukdvnf; reset to 0
vkyfygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 136 -
U Soe Tint Siemens PLC S7-200

Status Time Diagram

ON ON ON
OFF OFF OFF

value

value

ON ON
OFF OFF

ON
OFF OFF

I0.0 = ON jzpfNyD; 1s rjynfhrD 0.6s rSm OFF jyefjzpfoGm;cJY&if T1 u time counting


vkyfwmukd &yfvkdufNyD; current value ukd rSwfvkdufygw,f/
aemufwcg I0.0 jyef ON awmhapmapmu rSwfxm;wJY current value = 0.6s uae
a&SUukd time counting qufvkyfygw,f/
pkpkaygif; current value = 100 (PT) = 1s jynfhawmhrS T1 u ON jzpfygw,f/ Time
counting uawmh qufvkyfaeygw,f/ trsm;qkH; current value = 32767 a&mufawmYrS
time countig vkyfwm &yfoGm;ygw,f/
I0.1 = ON jzpf&if T1 = OFF (reset) jzpfygw,f/ Reset jzpfwJYtcg time counting
vnf;&yfw,f? current value ukdvnf; reset to 0 vkyfygw,f/ T1 u ON NyD;om;jzpf
ae&ifvnf; T1 ukd OFF vkyfygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 137 -
U Soe Tint Siemens PLC S7-200

Example (34) One Shot Timer Program


Single Shot Output Program
I1.2 = OFF to ON jzpfrS True

txufyg program wGif I1.2 ukd MumMum ON xm;vnf; Q0.0 u 2s om ON


jzpfaeNyD; 2s jynfhwmeJY OFF jyefjzpfoGm;ygw,f/

I1.2 = ON jzpf&if &JU logic result u true jzpfygw,f/

&JU logic result u false to true jzpfrS &JU logic result u true jzpf
ygw,f/

&JU t"dyg,fu examine Positive transition condition vkdY jzpfygw,f/

tJ'D Instruction Code ESpfckukd AND vkyfvkdY &vmwJY &JU


logic result uawmY I1.2 = OFF to ON jzpfrS true jzpfygw,f/ True jzpfaewJY tcsdef
umv uawmY scan cycle wpfywfvnfzkdY MumwJYtcsdef 1-scan time om MumjrifYygw,f/

Status Time Diagram

ON
I1.2 OFF

ON
Q0.0 OFF
2 sec

The more you learn about PLCs, the more you will be able to solve other control problems.
- 138 -
U Soe Tint Siemens PLC S7-200

Example (35) Re-triggerable One Shot Timer Program


Re-triggerable Single Shot Program

I1.2 = OFF to ON jzpfrS True

Program ukd tckvkda&;xm;cJY&if I1.2 = ON jzpfwmeJYwNydKifwnf; Q0.0 vnf; ON


jzpfygw,f/ I1.2 u tMumBuD; ON jzpfaer,fqkd&ifvnf; Q0.0 uawmY owfrSwfcsdef 5s
jynfhwmeJY OFF jyefjzpfoGm;ygvdrfYr,f/
5s rjynfhao;vkdY Q0.0 u ON jzpfaeao;wJY tcsdefrSm I1.2 u xyfNyD; ON jzpfcJY&if
tJ'D I1.2 = ON jzpfwJYtcsdefu pNyD; aemufxyf 5s MumrSom Q0.0 u OFF rSm jzpfyg
w,f/ tJ'gukd re-triggerable vkdY ac:ygw,f/
tay:qkH;pmaMumif;

rSm a&;xm;
wmu I1.2 = OFF to ON jzpfrS T37 1-ckwnf; ukdom reset vkyfygvkdY t"dyg,f&ygw,f/
'kwd,pmaMumif;

rSm a&;xm;
wmuawmY Q0.0 = ON jzpfrS T37 ukd time counting vkyf ckdif;wmjzpfygw,f/ Preset time
(PT) ukd 50 vkdY a&;xm;wJYtwGuf 5s MumawmY T37 = ON jzpfoGm;ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 139 -
U Soe Tint Siemens PLC S7-200

wwd,pmaMumif;

rSm a&;xm;
wmuawmY I1.2 = OFF to ON jzpfNyD;? T37 = OFF jzpfae&if Q0.0 ukd ON NyD;? I1.2 u
OFF jzpfoGm;&ifvnf; T37 = OFF jzpfaeoa&GU Q0.0 ukd quf ON aezkdY ckdif;xm;wm
jzpfygw,f/ 'gaMumifY T37 = ON jzpfoGm;wmeJY Q0.0 u OFF jzpfoGm;ygw,f/

Status Time Diagram

Q0.0 = OFF rjzpfrD 'kwd,tMudrf


I1.2 = ON jzpfwJYtcg

ON
I1.2 OFF
ON
Q0.0 OFF < 5 sec 5 sec

I1.2 = ON jzpfNyD; 5s rjynfhrD I1.2 ukd xyfcg? xyfcg ON ay;oGm;&if Q0.0 = OFF

jzpfr,fh tcsdefukd qGJqefYoGm;ygw,f/ aemufqkH; I1.2 = ON jzpfwJYtcsdefu pwifa&wGuf


NyD; 5s jynfhawmYrSom Q0.0 u OFF jzpfoGm;ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 140 -
U Soe Tint Siemens PLC S7-200

Example (36) Multi-Vibrator Program

T38 = OFF jzpf&if T37 u time counting vkyfygw,f/ Preset time (PT) ukd 5 vkYd
a&;xm;wJYtwGuf (5 x 100ms = 0.5s) MumawmY T37 = ON jzpfoGm;ygw,f/
T38 = ON jzpf&if T37 u OFF jzpfoGm;ygw,f/ Current value ukd reset to 0 vkyfyg
w,f/

T37 = ON jzpfrS T38 u time counting vkyfygw,f/ Preset time (PT) ukd 5 vkdY
a&;xm;wJYtwGuf 0.5s MumawmY T38 = ON jzpfoGm;ygw,f/
T37 = OFF jzpfoGm;&if T38 u OFF jzpfygw,f/ Current value ukd reset to 0 vkyfyg
w,f/

T37 = ON jzpf&if Q0.0 u ON jzpfygw,f/ T37 = OFF jzpf&if Q0.0 u OFF jzpfyg
w,f/

Status Time Diagram


ON
Q0.0 OFF

0.5 sec 0.5 sec

PLC ukd pwif RUN NyD; 0.5s MumwJYtcg Q0.0 u ON jzpfoGm;ygw,f/ aemufxyf
0.5s MumwJYtcg Q0.0 u OFF jyefjzpfoGm;ygw,f/ 'Dvkd ON vkduf? OFF vkduf? qufwkduf
jzpfaewmrsKd;ukd multi vibrator vkdYac:ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 141 -
U Soe Tint Siemens PLC S7-200

Counter Memory Area (C)

Counter memory xJrSm Current value eJY Counter bit qkdNyD; variable 2-rsKd; yg&Sdyg
w,f/
Current value qkdwmu counter u a&wGufNyD;om; ta&twGuf jzpfygw,f/
Counter twGuf owfrSwfay;xm;wJY 16-bit tpktzGJYjzpfwJY word xJrSm current value ukd
a&;rSwfygw,f/
Counter bit qkdwmuawmh counter u ola&wGuf&r,fh ta&twGuf PV (Preset
Value) ukd a&wGufaeqJqkd&if tJ'D counter bit u OFF jzpfaeygw,f/ Counter u
ola&wGuf&r,fh ta&twGufukd a&wGufvkdY PV eJY nDoGm;&if tJ'D counter bit u ON
jzpfoGm;ygw,f/

Counter eJY ywfoufNyD; odxm;&r,fh tcsufawGuawmh atmufygtwkdif; jzpfyg


w,f/
1/ Counter type (aumifwm trsKd;tpm;)
2/ Counter No. (aumifwm eHygwf)
3/ PV (preset value) (a&wGuf&r,fh digits)
5/ Current value (a&wGufNyD;om;vuf&Sdwefzdk;)

S7-200 CPU224 xJrSmyg&SdwJY counter trsKd;tpm;awGuawmh CTU (Count Up


counter), CTD (Count Down counter), CTUD (Count Up/Down counter), HDEF(High
Speed Counter Definition), HSC (High Speed Counter), eJY PLS (Pulse Output) wkYd jzpf
Muygw,f/
'DpmtkyfrSm tajccHjzpfwJY
Counter 3-rsKd; taMumif;ukdom a&;om;az:jyrSm jzpfyg
w,f/ tJ'gawGuawmh CTU (Count Up counter), CTD (Count Down counter) eJY
CTUD (Count Up/Down counter) wkdY jzpfMuygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 142 -
U Soe Tint Siemens PLC S7-200

Siemens PLC S7-200 xJrSmygwJY Counter taMumif;

1. Counter trsKd;tpm; awGuawmh CTU (Count Up counter), CTD (Count Down


counter) eJY CTUD (Count Up/Down counter) wkdY jzpfMuygw,f/

Up counter Down counter Up_Down counter


2. C0 u Counter Number jzpfNyD; C0 to C255 txd S7-200 CPU224 xJrSm yg&Sdyg
w,f/
3. PV (preset value) qkdwmuawmh counting vkyfwJYtcg a&wGuf&r,fh digit
ta&twGuf jzpfygw,f/
4. Current value qkdwmuawmh counting vkyfNyD;om; vuf&Sdwefzkd; digit ta&
twGuf jzpfygw,f/ Current value ukd present value vkdYvnf; ac:ygw,f/ Accumulated
value vkdYvnf; ac:ygw,f/
5. CTU u Up Counter &JU Instruction Code jzpfygw,f/ CU u count up
vkyfckdif;wJY logic condition input jzpfygw,f/ R u reset to 0 vkyfckdif;wJY logic condition
input jzpfygw,f/
6. CTD u Down Counter &JU Instruction Code jzpfygw,f/ CD u count down
vkyfckdif;wJY logic condition input jzpfygw,f/ LD u load to PV vkyfckdif;wJY logic
condition input jzpfygw,f/
7. CTUD u Up_Down Counter &JU Instruction Code jzpfygw,f/ CU u count up
vkyfckdif;wJY logic condition input jzpfygw,f/ CD u count down vkyfckdif;wJY logic
condition input jzpfygw,f/ R u reset to 0 vkyfckdif;wJY logic condition input jzpfygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 143 -
U Soe Tint Siemens PLC S7-200

Example (37) CTU Up counter

Counter ukd count up vkyfckdif;wJY logic condition input (CU) u false to true jzpfrS
CTU (Up Counter) u 1 digit count up vkyfygw,f/

'D program rSm u counter ukd count up vkyfckdif;wJY logic condition jzpfNyD;
false to true jzpfzkdY qkd&if I1.2 u OFF to ON jzpf&ygr,f/
'gaMumifh I1.2 OFF to ON wpfcg jzpfwkdif; C0 u 1 digit count up vkyfygw,f/

u counter ukd reset vkyfckdif;wJY logic condition jzpfygw,f/


I1.3 = ON jzpf&if C0 ukd reset vkyfygw,f/ I1.3 u ON jzpfaeNyD; I1.2 u OFF to
ON jzpf&if C0 u count up rvkyfygbl;/
PV = 3 vkdY a&;xm;wJYtwGuf C0 ukd 3 digit count vkyfckdif;xm;wm jzpfygw,f/
I1.3 = OFF jzpfaewJYtcsdefrSm I1.2 u OFF to ON wpfcgjzpf&if 1 digit count up
vkyfygw,f/ I1.2 u OFF to ON jzpfwm okH;BudrfjynfhoGm;&if C0 u ON jzpfoGm;ygw,f/
C0 = ON jzpfaepOf I1.3 u ON jzpf&if C0 ukd OFF vkyfygw,f/ C0 &JU current value
uvnf; 0 jzpfoGm;ygw,f/
CTU u reset dominant counter trsKd;tpm; Up Counter jzpfygw,f/

Reset dominant qkdwmu reset condition jzpfwJY u True (I1.3 = ON) jzpf

aewJY tcsdefrSm count up condition u True (I1.2 = ON) jzpfcJY&if counter ukd
1 digit wkd;ray;yg/ (Count up rvkyfyg/)

The more you learn about PLCs, the more you will be able to solve other control problems.
- 144 -
U Soe Tint Siemens PLC S7-200

Status Time Diagram

ON
Count Up I1.2
OFF

ON
Reset I1.3
OFF
3
ON
2
C0 1 1
0 0
OFF

ON
Q0.0
OFF

tajctaeukd tcsdefESifY,SOfwGJaz:jywJY &kyfykH Status time diagram ukd timing


diagram vkdYvnf; ac:Muygw,f/ Time chart vkdYvnf; ac:Muygw,f/ Operation
diagram vkdYvnf; ac:Muygw,f/
txufrSm az:jyxm;wJY ykHukd Munfh&if ppcsif; C0 a&m Q0.0 yg OFF jzpfaeyg
w,f/
I1.3 u ON jzpf&if C0 ukd reset vkyfvkdufwJYtwGuf C0 xJrSm counted value &SdaecJY
&if reset to 0 jzpfoGm;ygw,f/
I1.2 u OFF to ON jzpfwkdif; C0 u 1 digit wkd;wkd;oGm;ygw,f/ Current value u 3
(PV) eJY nDoGm;wJYtcg C0 u ON jzpfoGm;ygw,f/
C0 = ON jzpfNyD;aemuf I1.2 u OFF to ON wpfBudrfxyfjzpf&if C0 &JU current value
u 4 jzpfoGm;ygw,f/ I1.2 u aemufxyf OFF to ON wpfBudrfjzpf&if C0 &JU current
value u 5 jzpfoGm;ygw,f/
I1.2 = OFF to ON jzpfwkdif; 1 digit xyfxyfwkd;aewm current value trsm;qkH;wefzkd;
32767 a&mufawmYrS countig vkyfwm &yfoGm;ygw,f/ C0 uawmh quf ON aeygw,f/
Reset vkyfrSom C0 u OFF jyefjzpfygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 145 -
U Soe Tint Siemens PLC S7-200

Example (38) CTD down counter

Count Down

Reset

CTD u count down vkyfwJY Counter Instruction Code jzpfygw,f/


'D program rSm counter ukd count down vkyfckdif;wJY logic input condition (CD) u

jzpfygw,f/

Counter ukd reset to PV vkyfckdif;wJY logic condition (LD) u jzpfygw,f/


Preset value (PV) u 3 jzpfygw,f/
I1.2 = ON wpfcgjzpf&if 3 xJu 1 avsmhoGm;NyD; current value u 2 jzpfoGm;ygw,f/
I1.2 = ON okH;cgjzpfawmY 3 xJu 3 avsmhoGm;NyD; current value u 0 jzpfoGm;ygw,f/
C0 vnf; ON jzpfoGm;ygw,f/
C0 = ON jzpfawmY Q0.0 = ON jzpfygw,f/
C0 = ON jzpfNyD;rS I1.2 = ON xyfjzpf&if current value u rajymif;vJawmYbJ 0 yJ
jzpfaeygw,f/
I1.3 = ON jzpf&if C0 ukd reset vkyfygw,f/ C0 u OFF jzpfoGm;NyD; current value u
3 (PV) jzpfoGm;ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 146 -
U Soe Tint Siemens PLC S7-200

Status Time Diagram

ON
Count Down I1.2
OFF
ON
Reset I1.3
OFF

OFF OFF
C0 OFF OFF
OFF
ON ON

ON
Q0.0 OFF

txufrSmaz:jyxm;wJY Status Time Diagram ykHukd Munfh&if ppcsif; C0 a&m Q0.0


yg ON jzpfaeygw,f/ Current value uawmY 0 jzpfygw,f/ I1.3 ukd ON vkdufawmhrS
current value u 3 jzpfoGm;ygw,f/
I1.2 = OFF to ON yxr wpfcgjzpf&if C0 &JU current value u 2 jzpfoGm;ygw,f/
I1.2 = OFF to ON 'kwd, wpfcgjzpf&if C0 &JU current value u 1 jzpfoGm;ygw,f/
I1.2 = OFF to ON wwd, wpfcgjzpf&if C0 &JU current value u 0 jzpfoGm;ygw,f/
Current value u 0 jzpfoGm;wJYtcg C0 = ON jzpfoGm;ygw,f/
C0 = ON jzpfNyD;rS I1.2 = ON xyfjzpf&if current value u rajymif;vJawmYbJ 0 om
jzpfaeygw,f/
Reset condition tjzpfowfrSwfxm;wJY I1.3 = ON jzpfrS current value u PV eJY nD
oGm;NyD; C0 uvnf; OFF jzpfoGm;ygw,f/

rSwfcsuf/ / CTU u counter = ON jzpf NyD;rS count up xyfvkyf&if count up qufvkyfoGm;NyD ;


current value u wkd;oGm;ygw,f/ Current value u trsm;qkH;wef zkd; 32767 ukd
a&mufrS count up vkyfwm &yfoGm;ygw,f / CTD uawmh counter = ON jzpf NyD;rS
count down xyfvkyf &if count down rvkyfawmhyJ current value u 0 rSmyJ
&yfaeygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 147 -
U Soe Tint Siemens PLC S7-200

Example (39) CTUD Up_Down counter

Program
Count Up

Count Down

Reset

CTUD u count_up/count_down vkyfwJY Counter Instruction Code jzpfygw,f/

'D program rSm ukd Counting Up condition (CU) tjzpfowfrSwfxm;


ygw,f/

ukd Counting Down condition (CD) tjzpfowfrSwfxm;ygw,f/

ukd Counter Reset condition (R) tjzpfowfrSwfxm; ygw,f/


Preset value (PV) u 3 jzpfygw,f/
(Count Up) I1.2 = ON wpfcgjzpf&if a&wGufNyD;om;wefzkd; counted value xJukd 1
digit wkd;oGm;ygw,f/ Counted value ukd vuf&Sdwefzkd; current value vkdYvnf; ac:yg
w,f/
(Count Down) I1.3 = ON wpfcgjzpf&if counted value xJu 1 digit avsmYoGm;yg
w,f/
(Reset) I1.4 = ON jzpf&if C0 Reset jzpfNyD; counted value u 0 jzpfoGm;ygw,f/
p&ifpcsif; counter C0 xJrSm counted value u 0 jzpfaecJY&if I1.2 = ON av;cgjzpf
awmYrS counted value u 4 jzpfoGm;NyD; C0 = ON jzpfoGm;ygw,f/
C0 = ON jzpfawmY Q0.0 = ON jzpfygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 148 -
U Soe Tint Siemens PLC S7-200

Status Time Diagram

ON
Count Up I1.2 OFF

ON
Count Down I1.3 OFF

ON
Reset I1.4 OFF

ON
ON ON
ON ON ON
C0 OFF

OFF
OFF
ON
Q0.0 OFF

Status time diagram rSm az:jyxm;wmu ueOD;tprSm C0 xJu current value = 0


jzpfaeygw,f/
PV = 4 vkdY a&;xm;wJYtwGuf count up condition = true (I1.2 = ON) jzpfwm 4-cg
jynfhawmh C0 = ON oGm;ygw,f/
C0 = ON jzpfNyD;rS I1.2 = ON (Count Up) 1-cg xyfjzpf&if current value xJukd 1
digit xyfwkd;NyD; 5 jzpfoGm;ygw,f/ C0 uawmY quf ON aeygw,f/

Count down condition = true (I1.3 = ON) 1-cg jzpfawmh current value u 4
jzpfoGm;ygw,f/ Current value eJY PV wefzkd;eJY nDaeao;vkdY C0 u ON jzpfaeygao;
w,f/ aemuf 1-cg I1.3 = ON jzpfawmhrSom current value u 3 jzpfoGm;NyD; C0 vnf;
OFF jzpfoGm;ygw,f/

CTUD &JU vkyfaqmifcsufrSm current value u wkd;vmNyD; PV ESifhnDrS counter u


ON NyD;? current value u avsmhvmNyD; PV xufeJoGm;rS counter u jyefvnf OFF jzpfyg
w,f/
C0 = ON jzpfaepOf reset condition = true (I1.4 = ON) jzpf&if C0 u OFF jzpfNyD;?
current value u 0 jzpfoGm;ygw,f/
rSwfcsuf/ / Counter twGuf Set Value (SV) udk trsm;qkH; 32767txdoma&;vdkY&ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 149 -
U Soe Tint Siemens PLC S7-200

Example (40) 4-Bit Asynchronous Binary Counter Program

atmufaz:jyyg program wGif I1.2 u enable/disable switch jzpfygw,f/ I1.3 u


binary counter input signal jzpfygw,f/
I1.2 = ON jzpf&if I1.3 wGif a&muf&SdvmwJY pulse ukd binary counter u count vkyfyg
w,f/
I1.2 = OFF jzpf&if binary counter ukd count rvkyfatmif wm;jrpfrI disable vkyfyg
w,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 150 -
U Soe Tint Siemens PLC S7-200

The more you learn about PLCs, the more you will be able to solve other control problems.
- 151 -
U Soe Tint Siemens PLC S7-200

t"dyg,f&Sif;vif;csuf

Enable_Disable switch tjzpf tokH;jyKxm;wJY enable jzpfwJY I1.2 u ON jzpfaeNyD;


binary counter input signal jzpfwJY I1.3 wpfcg ON wkdif; C1 u 1 digit count up vkyfyg
w,f/
I1.3 = ON 2-cgjzpfvkdY 2 digits count up vkyfNyD;wJYtcg C1 = ON jzpfygw,f/
Next scan a&mufrS C1 ukd reset vkyfygw,f/ C1 reset jzpfawmh C1 = OFF jzpfoGm;yg
w,f/

C1 wpfcg ON wkdif; C2 u 1 digit count up vkyfygw,f/


C1 2-cg ON jzpfvkdY 2 digits count up vkyfNyD;wJYtcg C2 = ON jzpfygw,f/
Next scan a&mufrS C2 u reset jzpfNyD; OFF jzpfoGm;ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 152 -
U Soe Tint Siemens PLC S7-200

C2 wpfcg ON wkdif; C3 &JU current value ukd 1 digit wkd;apygw,f/


C2 = ON ESpfcgjzpfvkdY C3 u 2 digits count up vkyfNyD;wJYtcg C3 = ON jzpfygw,f/
Next scan a&mufrS C3 ukd reset vkyNf yD; OFF jzpfoGm;ygw,f/

I1.3 = OFF to ON jzpf&if Q0.0 u ON jzpfusefcJYygw,f/

C1 = OFF to ON jzpf&if Q0.1 = ON jzpfaecJYNyD; Q0.0 = OFF (reset) jzpfygw,f/

C2 = OFF to ON jzpf&if Q0.2 = ON jzpfusefcJYNyD; Q0.1 = OFF (reset) jzpfygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 153 -
U Soe Tint Siemens PLC S7-200

C3 = OFF to ON jzpf&if Q0.3 = ON jzpfusefcJYNyD; Q0.2 = OFF (reset) jzpfygw,f/

Q0.0, Q0.1, Q0.2, Q0.3 wkdYukd AND vkyfxm;wJY logic result u True to False jzpf&if
Q0.3 ukd reset vkyfygw,f/ Q0.3 = OFF jzpfoGm;ygw,f/

I1.2 = OFF jzpf&if Q0.0 to Q0.3 ukd reset vkyfNyD;? C1 to C3 ukdvnf; reset vkyfyg
w,f/

Status Time Diagram of Binary Counter

I1.3

Q0.0

Q0.1

Q0.2

Q0.3

The more you learn about PLCs, the more you will be able to solve other control problems.
- 154 -
U Soe Tint Siemens PLC S7-200

Binary counter ukdarmfwmvnfEIef; RPM jywJYrDwmtjzpf LED display eJY qufoG,f


NyD; a&S;tcgu okH;Muygw,f/ armfwmvnfwmukd inductive proximity sensor eJY axmuf
vSrf;NyD; &vmwJY pulse signal ukd binary counter u vufcH&,lygw,f/ Binary counter
u xGufvmwJY signal ukd 7-segment LED display eJY (1, 2, 3, 4, - - display) *Pef; jyef
az:NyD; Motor RPM tjzpf az:jyygw,f/
,aeYacwfrSmawmY HMI ukd tokH;jyKaeMuNyDjzpfvkdY atmufrSmaz:jyxm;ovkd
INC_W eJY MOV_W ukd wGJokH;NyD; program a&;&ygw,f/ VW200 xJu value ukd HMI
wGif Motor RPM tjzpf tvG,fwul ul;,laz:jyay;Ekdifygw,f/

armfwm wpfywfvnf&if one pulse xGufwJY proximity sensor &JU pulse signal ukd
I1.3 rSwqifh PLC u &&Sdygw,f/ armfwmwpfywfvnfwkdif; VW100 xJukd 1 wkd;yg
w,f/

SM0.4 u 1 minute clock pulse jzpfygw,f/ PLC ukd RUN xm;&if 30s_ON NyD;
30s_OFF xyfcg? xyfcg? qufwkdufjzpfaeygw,f/
1 minute wpfcg VW100 xJrSm&SdwJY wefzkd;ukd VW200 xJokdY a&TUajymif;a&;rSwfNyD;rS
VW100 xJu wefzkd;ukd clear vkyfNyD; 0 jzpfapygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 155 -
U Soe Tint Siemens PLC S7-200

Part 3

PROGRAMMING

The more you learn about PLCs, the more you will be able to solve other control problems.
- 156 -
U Soe Tint Siemens PLC S7-200

Program Writing (Programming)

'DpmtkyfrSm y&kd*&rfukd bmomjyefwwfatmif? program reading ukd t"duxm;


a&;xm;wm jzpfayr,fh y&kd*&rfa&;om;jcif; programming ukdvnf; tajccHtqifh
a&;wwfatmif vG,fwmu pNyD; &kyfykHawGeJY ,SOfwGJaz:jyxm;ygw,f/
S7-200 ukd program a&;awmhr,fqkd&if STEP 7 MicroWIN ukd t&ifzGifhyg/

Cursor
Instruction code pa&;&r,fYae&m

tay:qkH;rSm STEP 7-Micro/WIN - Project1 vkdY ay:aeygvdrfhr,f/ rdrdvkyfwJY


tvkyfukd project vkdY ac:ygw,f/ Project xJrSm program block, system block eJY data
block wkdY yg0ifygw,f/ 'Dae&mrSm block qkdwm tpktzGJYukd ajymwmjzpfygw,f/
SIMATIC LAD qkdwmu Siemens &JU SIMATIC Instruction Code eJYa&;wJY Ladder
Diagram Programming Language jzpfygw,f/ Siemens u LAD vkdY ac:ayr,fh IEC u
awmh LD vkdY ac:ygw,f/ 'DpmtkyfrSm Ladder Diagram Programming Language ukd LD
vkdYom okH;EIef;oGm;rSmjzpfygw,f/
Language rSm pm eJY pum; qkdNyD; 2-rsKd;&Sdygw,f/ LD [m Language jzpfaomfvnf;
pmom&SdNyD; pum;r&Sdyg/ PLC ukd olem;vnfwJY pmeJYa&;NyD;ckdif;vkdY &ygw,f/
S7-200 CPU224 u STEP 7-Micro/WIN ukd okH;NyD;a&;wYJ LD pmukd em;vnfyg
w,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 157 -
U Soe Tint Siemens PLC S7-200

Cursor
Instruction code pa&;&r,fYae&m

ykHrSm Cursor vkdY ac:wJY av;axmihfuGufukd b,ftpGefrSm Click csNyD; Program ukd
pwifa&;&ygw,f/
Program a&;wJYtcg tokH;jyK&wJY basic instruction code 3-rsKd; uawmh

1. examine_OFF vkdY ac:wJY closed contact &JU oauFw symbol jzpfygw,f/

2. examine_ON vkdY ac:wJY open contact &JU oauFw symbol jzpfygw,f/


3. OUTPUT vkdY ac:wJY relay coil &JU oauFw symbol jzpfygw,f/
olwkdYukd t"dyg,f&SdwJY oauFw coded symbol vkdY ac:ygw,f/

PLC ukd program a&;NyD;ckdif;wJYtcg

ON jzpfaeovm;?ppfaq;ygvkdY ckdif;csif&if ukd tokH;jyK&ygw,f/


OFF jzpfaeovm;?ppfaq;ygvkdY ckdif;csif&if ukd tokH;jyK&ygw,f/
ON vkdufygvkdY ckdif;csif&if ukd tokH;jyK&ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 158 -
U Soe Tint Siemens PLC S7-200

Project (1) Push Button (N.O) I/O Wiring

PLC &JU Input wGif Pushbutton P.B1 ukd qufoG,fNyD;? PLC &JU Output wGif Lamp L1
udk Fig.1 rSmazmfjyxm;wJhtwdkif; qufoG,fyg/

P.B 1
Lamp L1
0.0 0.0

+
24V
S7-200 CPU224
1L
AC/DC/RLY
24V
+ 1M

Input Terminal Output Terminal


Fig.1 PLC I/O devices connection diagram

Input terminal rSmaz:jyxm;wJY 0.0 u signal vufcHwJY terminal number jzpfNyD;?


1M u common terminal jzpfygw,f/
Input terminal No. 0.0 wGif Pushbutton P.B1 (N.O) ukd qufoG,fxm;ygw,f/
Pushbutton P.B1 (N.O) u rESdyf&if OFF (Open) jzpfaeygw,f/
Sink input jzpfatmif common terminal number 1M rSm sensor supply &JU 24VDC
eJY qufoG,fxm;ygw,f/
Output terminal rSmaz:jyxm;wJY 0.0 u signal xkwfay;wJY terminal No. jzpfNyD;? 1L
u common terminal jzpfygw,f/
Output terminal No. 0.0 wGif Lamp L1 (24vdc, 5w) ukd qufoG,fxm;ygw,f/
Common terminal 1L wGif sink output jzpfatmif actuator supply &JU 24VDC eJY
qufoG,fxm;ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 159 -
U Soe Tint Siemens PLC S7-200

Project (1) Push Button (N.O)


I/O wiring ukd Fig.1 twkdif;qufoG,fyg/ P.B1 ukd ESdyfxm;&if Lamp L1 u rD;
vif;aeNyD; ESdyfxm;wmukd jyefvTwfvkduf&if Lamp L1 u rD;Nidrf;oGm;&rSm jzpfygw,f/
vkyf&r,fhtvkyfukd State Diagram tjzpf atmufrSmaz:jyxm;ygw,f/
ESdyf
P.B1
rESdyf
vif;
Lamp1
rvif;
P.B1 u N.O jzpfvkdY P.B1 ukd ESdyf&if Input terminal No. 0.0 u 24VDC signal &&SdNyD;
Input memory I0.0 u ON jzpfoGm;ygw,f/ Fig.1 ukd jyefMunfhyg/ P.B1 eJY I0.0 wkdY&JU
qufEG,frI Relation Diagram ukd atmufrSmaz:jyxm;ygw,f/
ESdyf
P.B1
rESdyf
ON
I0.0
OFF

Output memory Q0.0 u ON jzpfrSom Output terminal 0.0 u 24VDC &&SdNyD;


Lamp L1 u ON jzpfygw,f/ Fig.1 ukd jyefMunfhyg/ Q0.0 eJY Lamp L1 wkdY&JU qufEG,frI
Relation Diagram ukd atmufrSmaz:jyxm;ygw,f/
ON
Q0.0
OFF
vif;
Lamp L1
rvif;
PLC u memory ukdom zwfEkdif? a&;Ekdif Read/Write vkyfEkdifwmjzpfvkdY P.B1 ukd ESdyf
xm;&if Lamp L1 u rD;vif;aeNyD; ESdyfxm;wmukd jyefvTwfvkduf&if Lamp L1 u rD;Nidrf;
oGm;atmif Program a&;zkdY pOf;pm;wJYtcg I0.0 = ON jzpf&if Q0.0 ukd ON ygvkdY awG;NyD;?
a&;&rSmjzpfygw,f/
a&;&r,fh Program ukd Status Time Diagram tjzpf atmufrSmaz:jyxm;ygw,f/
ON
I0.0
OFF

ON
Q0.0
OFF

Program ukd atmufygtwkdif; a&;&ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 160 -
U Soe Tint Siemens PLC S7-200

atmufyg program ukd computer ay:rSm vufawGY a&;zkdYtwGuf yxrOD;pGm STEP


7-Micro/WIN ukd zGifhyg/

Cursor

Instruction code pwifa&;&r,fYae&m

Instruction code ukd ykHrSmjyxm;wJY Cursor ae&mu pwifNyD;a&;&rSmjzpfygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 161 -
U Soe Tint Siemens PLC S7-200

Instruction code symbol ukd &,lzkdY atmufygtwkdif; aqmif&Gufyg/

Instruction code pwifa&;&r,fYae&m

1. Instruction code pwifa&;&r,fhae&mrSm Cursor csNyD;?

2. Bit Logic &JU b,fbufrSm&SdwJY + ukd click yg/

3. Bit Logic &JU atmufrSm&SdwJY ukd Double Click yg/

Cursor

4.

The more you learn about PLCs, the more you will be able to solve other control problems.
- 162 -
U Soe Tint Siemens PLC S7-200

5. Bit Logic &JU atmufrSm&SdwJY ( ) ukd Double Click yg/

6. 7.

??.? ae&mawGrSm oufqkdif&m Operand &JU Address ukd a&;NyD; Enter acgufyg/

8. 9.

The more you learn about PLCs, the more you will be able to solve other control problems.
- 163 -
U Soe Tint Siemens PLC S7-200

10. 11.

12. Program a&;NyD;&if? tNrJwrf; Compile vkyfyg/

13. pm&GufESpf&Guf
xyfay:rSmtrSefjcpf jyxm;wJY icon ay: Mouse Pointer wifvkduf&if ykHrSmjyxm;ovkd
Compile All ay:vmygw,f/ Compile All icon ukd Click yg/ Compile vkyfw,f
qkdwmu vlem;vnfwJY LD eJY a&;xm;wJY graphical symbolic code awGukd PLC em;vnf
wJY machine code (0,1) tjzpf ajymif;vkdY &? r&? ppfaq;wmjzpfygw,f/
a&;xm;wJY Program ukd PLC u em;vnfEkdifw,fqkd&if atmufrSmaz:jyxm;ovkd
Total Errors: 0 vkdY Computer screen &JU b,fbufatmufajcrSm ay:vmygw,f/

14. Error r&Sd&if Computer eJY PLC ukd


Programming Cable tokH;jyK csdwfqufNyD; program ukd PLC xJokdY Download vkyf&yg
w,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 164 -
U Soe Tint Siemens PLC S7-200

15. Download vkyfzkdY ykHrSmjyxm;wJY download icon ukd


click yg/


16. Download ukd click yg/


17. OK ukd click yg/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 165 -
U Soe Tint Siemens PLC S7-200

18. Program execute vkyfwmukd apmifhMunfhwm monitor


vkyfzkdYtwGuf

The more you learn about PLCs, the more you will be able to solve other control problems.
- 166 -
U Soe Tint Siemens PLC S7-200

19. Debug xJu Start Program Status ukd click yg/

20. PLC ukd RUN rxm;&ao;&if 'Dvkday:ygw,f/

Program ukd PLC xJ download vkyfNyD;&if STEP 7-Micro/WIN u PLC ukd jyef
RUN ray;ygbl;/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 167 -
U Soe Tint Siemens PLC S7-200

21. PLC ukd jyef RUN zkdYtwGuf RUN button ukd click yg/

19. Yes ukd click yg/

20. PLC ukd RUN vkduf&if 'Dvkd ay:ygw,f/

21. I0.0 ukd ON vkduf&if 'Dvkd ay:ygw,f/

Project (2) ukdvnf; txufygenf;twkdif; computer ay:rSm program ukd a&;Munfh


Ekdifygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 168 -
U Soe Tint Siemens PLC S7-200

Project (2) Push Button (N.O)


I/O wiring ukd Fig.1 twkdif;qufoG,fyg/ P.B1 ukd rESdyfyJvTwfxm;&if Lamp L1 u
rD;vif;aeNyD; P.B1 ukd ESdyfxm;rS Lamp L1 u rD;Nidrf;oGm;atmif Program ukd a&;wJYtcg
I0.0 = OFF jzpf&if Q0.0 ukd ON ygvkdY awG;NyD;? a&;&rSm jzpfygw,f/
jzpfapcsifwJYtvkyfukd State Diagram tjzpf atmufrSmaz:jyxm;ygw,f/
ESdyf
P.B1
rESdyf
Lamp1
vif;
rvif;
P.B1 u N.O jzpfvkdY P.B1 ukd ESdyf&if Input terminal No. 0.0 u 24VDC signal ukd
&&SdNyD; Input memory I0.0 u ON jzpfoGm;ygw,f/ Fig.1 ukd jyefMunfhyg/ P.B1 eJY I0.0
wkdY&JU qufEG,frI Relation Diagram ukd atmufrSmaz:jyxm;ygw,f/
ESdyf
P.B1
rESdyf
ON
I0.0
OFF
Output memory Q0.0 u ON jzpfrSom Output terminal No. 0.0 u 24VDC ukd
&&SdNyD; Lamp L1 u ON jzpfEkdifygw,f/ atmufyg Diagram rSm Q0.0 eJY Lamp L1 wkdY&JU
qufEG,frIukd az:jywJY Relation Diagram jzpfygw,f/
ON
Q0.0
OFF
vif;
Lamp L1
rvif;
PLC u memory ukdom zwfEkdif? a&;Ekdif Read/Write vkyfEkdifwmjzpfvkdY P.B1 ukd
rESdyfyJ xm;&if Lamp L1 u rD;vif;aeNyD;? P.B1 ukd ESdyfvkduf&if Lamp L1 u rD;Nidrf; oGm;
atmif Program a&;zkdY pOf;pm;wJYtcg I0.0 = OFF jzpf&if Q0.0 ukd ON ygvkdY awG;NyD;?
a&;&rSm jzpfygw,f/
a&;&r,fh Program ukd Status Time Diagram tjzpf atmufrSmaz:jyxm;ygw,f/
ON
I0.0
OFF

ON
Q0.0
OFF
Program ukd atmufygtwkdif; a&;&ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 169 -
U Soe Tint Siemens PLC S7-200

Project (3) Push Button (N.C) I/O Wiring

PLC &JU Input wGif Pushbutton P.B2 ukd qufoG,fNyD; PLC &JU Output wGif Lamp
L1 udk Fig.2 rSmazmfjyxm;wJhtwdkif; qufoG,fyg/

P.B 2 Lamp L1
0.0 0.0

+
24V
S7-200 CPU224
1L
AC/DC/RLY
24V
+ 1M

Input Terminal Output Terminal


Fig.2 PLC I/O devices connection diagram

Input terminal rSmaz:jyxm;wJY 0.0 u signal vufcHwJY terminal No. 0.0 jzpfNyD;?
1M u common terminal jzpfygw,f/
Input terminal No. 0.0 wGif Pushbutton P.B2 (N.C) ukd qufoG,fxm;ygw,f/
Pushbutton P.B2 (N.C) u rESdyf&if ON jzpfaeygw,f/
Common terminal 1M wGif sink input jzpfatmif sensor supply &JU 24VDC eJY
qufoG,fxm;ygw,f/
Output terminal rSmaz:jyxm;wJY 0.0 u signal xkwfay;wJY terminal No. 0.0 jzpfNyD;?
1L u common terminal jzpfygw,f/
Output terminal No. 0.0 wGif 24VDC Lamp L1 ukd qufoG,fxm;ygw,f/
Common terminal 1L wGif sink output jzpfatmif actuator supply &JU 24VDC eJY
qufoG,fxm;ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 170 -
U Soe Tint Siemens PLC S7-200

Project (3) Push Button (N.C)


I/O wiring ukd Fig.2 twkdif;qufoG,fyg/ P.B2 ukd ESdyfxm;&if Lamp L1 u rD;
vif;aeNyD; rESdyfyJxm;&if Lamp L1 u rD;Nidrf;oGm;&rSm jzpfygw,f/ (ESdyf&if vif;? rESdyf&if
rvif;? jzpfygw,f/) jzpfapvkdwJY Relation Diagram ukd atmufrSmaz:jyxm;ygw,f/
ESdyf
P.B1
rESdyf
vif;
Lamp1
rvif;
P.B2 u N.C jzpfwJYtwGuf rESdyfyJxm;&if Input terminal No. 0.0 u 24VDC signal
ukd &&SdNyD; Input memory I0.0 u ON jzpfaeygw,f/ Fig.2 ukdjyefMunfhyg/ P.B2 eJY I0.0
wkdY&JU qufEG,frI Relation Diagram ukd atmufrSmaz:jyxm;ygw,f/
rESdyf
P.B1
ESdyf
ON
I0.0
OFF

Output memory Q0.0 u ON jzpfrSom Output terminal No. 0.0 u 24VDC ukd
&&SdNyD; Lamp L1 u ON jzpfygw,f/ Fig.2 ukd jyefMunfhyg/ Q0.0 eJY Lamp L1 wkdY&JU
qufEG,frI Relation Diagram ukd atmufrSmaz:jyxm;ygw,f/
ON
Q0.0
OFF
vif;
Lamp L1
rvif;
PLC u memory ukdom zwfEkdif? a&;Ekdif Read/Write vkyfEkdifwmjzpfvkdY P.B1 ukd
ESdyfxm;&if Lamp L1 u rD;vif; aeNyD;? ESdyfxm;wmukd jyefvTwfvkduf&if Lamp L1 u rD;
Nidrf; oGm;atmif Program a&;zkdY pOf;pm;wJYtcg P.B1 ukd ESdyf&if I0.0 u OFF jzpfoGm;vkdY
I0.0 = OFF jzpf&if Q0.0 ukd ON ygvkdY awG;NyD;? a&;&rSmjzpfygw,f/
a&;&r,fh Program ukd Status Time Diagram tjzpf atmufrSmaz:jyxm;ygw,f/
ON
I0.0

ON
Q0.0
OFF

Program ukd atmufygtwkdif; a&;&ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 171 -
U Soe Tint Siemens PLC S7-200

Project (4) Push Button (N.C)

I/O wiring ukd Fig.2 twkdif;qufoG,fyg/ P.B2 ukd rESdyfyJvTwfxm;&if Lamp L1 u


rD;vif;aeNyD; ESdyfvkdufrS Lamp L1 u rD;Nidrf; oGm;&rSm jzpfygw,f/ (rESdyf&if vif;? ESdyf&if
rvif;? jzpfygw,f/) jzpfapvkdwJY Relation Diagram ukd atmufrSmaz:jyxm;ygw,f/
rESdyf
P.B2
ESdyf
vif;
Lamp L1
rvif;
P.B2 u N.C jzpfwJYtwGuf rESdyfyJxm;&if Input terminal 0.0 u 24VDC signal ukd
vufcH &&SdNyD; Input memory I0.0 u ON jzpfygw,f/ Fig.2 ukd jyefMunfhyg/ P.B2 eJY I0.0
wkdY&JU qufEG,frI Relation Diagram ukd atmufrSmaz:jyxm;ygw,f/
rESdyf
P.B2
ESdyf
ON
I0.0
OFF

Output memory Q0.0 u ON jzpfrSom Output terminal 0.0 u 24VDC ukd &&SdNyD;
Lamp L1 u ON jzpfEkdifygw,f/ Fig.2 ukd jyefMunfhyg/ Q0.0 eJY Lamp L1 wkdY&JU qufEG,f
rI Relation Diagram ukd atmufrSmaz:jyxm;ygw,f/
ON
Q0.0
OFF
vif;
Lamp L1
rvif;
P.B2 ukd rESdyfyJxm;&if Lamp L1 u rD;vif;aeNyD;? ESdyfvkduf&if Lamp L1 u rD;Nidrf;
oGm;atmif Program a&;zkdY pOf;pm;wJYtcg P.B2 ukd rESdyf&if I0.0 u ON jzpfaewJY
twGuf I0.0 = ON jzpf&if Q0.0 ukd ON ygvkdY awG;NyD;? a&;&rSmjzpfygw,f/
Program a&;&r,fh Status Time Diagram ukd atmufrSmaz:jyxm;ygw,f/
ON
I0.0
OFF
ON
Q0.0
OFF

Program ukd atmufygtwkdif; a&;&ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 172 -
U Soe Tint Siemens PLC S7-200

P.B1 (N.O) t"d y g ,f & S i f ; vif ; csuf

P.B 1
Lamp L1
0.0 0.0

+
24V
S7-200 CPU224
1L
AC/DC/RLY
24V
+ 1M

Input Terminal Output Terminal


Fig.1 PLC I/O devices connection diagram

I/O wiring ukd Fig.1 twkdif; P.B1 (N.O) ukd input terminal 0.0 wGif qufoG,fNyD;
Program ukd atmufygtwkdif;a&;xm;cJY&if?

P.B1 (N.O) ukd ESdyfrS I0.0 u ON jzpfwJYtwGuf P.B1 (N.O) ukd ESdyfrSom Q0.0 u
ON ygw,f/
P.B1 (N.O) ukd rESdyf&if I0.0 u OFF jzpfwJYtwGuf P.B1 (N.O) ukd rESdyf&if Q0.0
u OFF jzpfygw,f/

I/O wiring ukd Fig.1 twkdif; P.B1 (N.O) ukd input terminal 0.0 wGif qufoG,fNyD;
Program ukd atmufygtwkdif;a&;xm;cJY&if?

P.B1 (N.O) ukd rESdyf&if I0.0 u OFF jzpfwJYtwGuf P.B1 (N.O) ukd rESdyfrSom Q0.0
u ON jzpfygw,f/
P.B1 (N.O) ukd ESdyf&if I0.0 u ON jzpfwJYtwGuf P.B1 (N.O) ukd ESdyfvkduf&if Q0.0
u OFF jzpfygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 173 -
U Soe Tint Siemens PLC S7-200

P.B2 (N.C) t"d y g ,f & S i f ; vif ; csuf

P.B 2 Lamp L1
0.0 0.0

+
24V
S7-200 CPU224
1L
AC/DC/RLY
24V
+ 1M

Input Terminal Output Terminal


Fig.2 PLC I/O devices connection diagram

I/O wiring ukd Fig.2 twkdif; P.B2 (N.C) ukd input terminal 0.0 wGif qufoG,fNyD;
Program ukd atmufygtwkdif;a&;xm;cJY&if?

P.B2 (N.C) ukd rESdyf&if I0.0 u ON jzpfwJYtwGuf P.B2 (N.C) ukd rESdyfrSom Q0.0
u ON jzpfygw,f/

P.B2 (N.C) ukkd ESdyf&if I0.0 u OFF jzpfwJYtwGuf P.B2 (N.C) ukd ESdyfvkduf&if Q0.0
u OFF jzpfygw,f/

I/O wiring ukd Fig.2 twkdif; P.B2 (N.C) ukd input terminal 0.0 wGif qufoG,fNyD;
Program ukd atmufygtwkdif;a&;xm;cJY&if?

P.B2 (N.C) ukd ESdyf&if I0.0 u OFF jzpfwJYtwGuf P.B2 (N.C) ukd ESdyfrSom Q0.0 u
ON jzpfygw,f/
P.B2 (N.C) ukd rESdyf&if I0.0 u ON jzpfwJYtwGuf P.B2 (N.C) ukd rESdyf&if Q0.0 u
OFF jzpfygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 174 -
U Soe Tint Siemens PLC S7-200

Project (5) Logic AND (I/O Wiring)

Fig.3rSmazmfjyxm;wJhtwdkif; PLC &JU Input wGif P.B1 (N.O) eJY P.B2 (N.O) ukd
qufoG,fNyD; PLC &JU Output wGif Lamp L1 udk qufoG,fyg/
P.B 1
Lamp L1
0.0 0.0

+
P.B 2 24V
S7-200 CPU224
0.1 1L
AC/DC/RLY
24V
+ M

Input Terminal Output Terminal


Fig.3 PLC I/O devices connection diagram

Project (5) Logic AND


I/O wiring ukd Fig.3 twkdif;qufoG,fyg/ P.B1 a&m P.B2 yg ESdyfrS ON wJY N.O
pushbutton awGjzpfwJYtwGuf P.B1 ukd ESdyf&if I0.0 u ON NyD;? P.B2 ukd ESdyf&if I0.1 u
ON ygw,f/
tcka&;&r,fh Program u P.B1 eJY P.B2 ukd wGJESdyfrS Lamp L1 u rD;vif;aeNyD;?
P.B1 1-ckwnf; (okdYr[kwf) P.B2 1-ckwnf;ukd ESdyf&ifawmh Lamp L1 u rD;Nidrf;ae&rSm
jzpfygw,f/
jzpfapvkdwJY Relation Diagram ukd atmufrSmaz:jyxm;ygw,f/

P.B1
ESdyf ESdyf ESdyf

P.B2
ESdyf ESdyf ESdyf

Lamp L1 rvif; vif; rvif; vif;

The more you learn about PLCs, the more you will be able to solve other control problems.
- 175 -
U Soe Tint Siemens PLC S7-200

P.B1 u N.O jzpfvkdY P.B1 ukd ESdyf&if Input terminal 0.0 u 24VDC signal ukd
vufcH&&SdNyD; Input memory I0.0 u ON jzpfoGm;ygw,f/
P.B2 uvnf; N.O jzpfvkdY P.B2 ukd ESdyf&if Input terminal 0.1 u 24VDC signal ukd
vufcH&&SdNyD; Input memory I0.1 u ON jzpfoGm;ygw,f/

P.B1 eJY I0.0 wkdY&JU qufEG,frI Relation Diagram ukd atmufrSm az:jyxm;ygw,f/
ESdyf
P.B1
rESdyf
ON
I0.0
OFF

P.B2 eJY I0.1 wkdY&JU qufEG,frI Relation Diagram ukd atmufrSm az:jyxm;ygw,f/
ESdyf
P.B2
rESdyf
ON
I0.1
OFF

Output memory Q0.0 u ON jzpfrSom Output terminal 0.0 u 24VDC ukd vufcH
&&SdNyD; Lamp L1 u ON jzpfEkdifygw,f/ Fig.3 ukd jyefMunfhyg/
Q0.0 eJY Lamp L1 wkdY&JU qufEG,frI Relation Diagram ukd atmufrSm az:jyxm;yg
w,f/
ON
Q0.0
OFF
vif;
Lamp L1
rvif;

The more you learn about PLCs, the more you will be able to solve other control problems.
- 176 -
U Soe Tint Siemens PLC S7-200

P.B1 eJY P.B2 ukd wGJESdyf&if Lamp L1 u rD;vif;aeNyD;? 2-ckwGJESdyfwmr[kwf&if Lamp


L1 u rD;Nidrf;aeatmif Program a&;zkdY pOf;pm;wJYtcg (I0.0 = ON AND I0.1 = ON) jzpf
&if Q0.0 ukd ON ygvkdY awG;NyD;? a&;&rSm jzpfygw,f/
Logical AND &JU t"dyg,fu AND vkyfxm;wJY condition tm;vkH; true jzpfrS logic
AND &JU result u true jzpfygw,f/
Program a&;&r,fh Status Time Diagram ukd atmufrSmaz:jyxm;ygw,f/

I0.0

I0.1

Q0.0

I0.0 vnf; ON jzpf&r,f? I0.1 vnf; ON jzpf&ygr,f? 'Dtajctae 2-ckpvkH; true


jzpfae&r,fvkdY a&;csif&if logical AND vkyf&ygw,f/
LD program a&;wJYtcg logical AND jzpfapcsif&if condition awGukd tpOftwkdif;
wef;pDa&;&ygw,f/

Program ukd atmufygtwkdif; a&;&ygw,f/

a&m yg true jzpfrS Q0.0 ukd ON ygvkdY a&;csifvkdY txufygt


wkdif; logical AND jzpfatmif a&;xm;wmjzpfygw,f/

rSwfcsuf / / STEP 7-Micro/WIN eJY LD program a&;wJYtcg END ukd xnfha&;ay;p&m rvkd
ygbl;/ a&;vkdY vnf; r&ygbl;/ STEP 7-Micro?WIN xJrSm Conditional END
om yg&Sdygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 177 -
U Soe Tint Siemens PLC S7-200

Project (6) Logic OR


I/O wiring ukd Fig.3 twkdif;qufoG,fyg/ P.B1 a&m? P.B2 yg? ESdyfrS ON wJY N.O
pushbutton awGjzpfwJYtwGuf P.B1 ukd ESdyf&if I0.0 u ON NyD;? P.B2 ukd ESdyf&if I0.1 u
ON ygw,f/
tcka&;&r,fh Program u (P.B1 okdYr[kwf P.B2) wpfckckukd ESdyf&if Lamp L1 u
rD;vif;NyD;? wpfckrS rESdyf&ifawmh Lamp L1 u rD;Nidrf;ae&rSm jzpfygw,f/ P.B1 a&m P.B2
yg ESpfckpvkH;ukd ESdyf&ifvnf; Lamp L1 u rD;vif;&rSm jzpfygw,f/ tJ'Dvkd condition 1-ck
okdYr[kwf 2-ckpvkH; true jzpfrS result u true jzpfatmif a&;csif&if Logical OR ukd okH;&
ygw,f/
jzpfapvkdwJY Relation Diagram ukd atmufrSmaz:jyxm;ygw,f/
P.B1
ESdyf ESdyf ESdyf

P.B2
ESdyf ESdyf ESdyf

Lamp L1
vif; vif; vif; vif;
rvif; rvif;
P.B1 u N.O jzpfvkdY P.B1 ukd ESdyf&if Input terminal 0.0 wGif 24VDC signal a&muf&Sd
NyD; Input memory I0.0 u ON jzpfoGm;ygw,f/ Fig.3 ukd jyefMunfhyg/ P.B2 uvnf; N.O
jzpfvkdY P.B2 ukd ESdyf&if Input terminal 0.1 wGif 24VDC signal a&muf&SdNyD; Input memory
I0.1 u ON jzpfoGm;ygw,f/
P.B1 eJY I0.0 wkdY&JU qufEG,frI Relation Diagram ukd atmufrSmaz:jyxm;ygw,f/
P.B1 ukd ESdyfrS I0.0 u ON ygw,f/
ESdyf
P.B1
rESdyf
ON
I0.0
OFF

P.B2 eJY I0.1 wkdY&JU qufEG,frI Relation Diagram ukd atmufrSmaz:jyxm;ygw,f/


P.B2 ukd ESdyfrS I0.1 u ON ygw,f/
ESdyf
P.B2
rESdyf
ON
I0.1
OFF

The more you learn about PLCs, the more you will be able to solve other control problems.
- 178 -
U Soe Tint Siemens PLC S7-200

Output memory Q0.0 u ON jzpfrSom Output terminal 0.0 u 24VDC ukd &&SdNyD;
Lamp L1 u ON jzpfEkdifygw,f/
Q0.0 eJY Lamp L1 wkdY&JU qufEG,frI Relation Diagram ukd atmufrSm az:jyxm;yg
w,f/
ON
Q0.0
OFF
vif;
Lamp L1
rvif;

P.B1 okdYr[kwf P.B2 wpfckckukd ESdyf&if Lamp L1 u rD;vif;aeNyD;? wpfckrS rESdyf&if


awmh Lamp L1 u rD;Nidrf;ae&rSm jzpfygw,f/ P.B1 a&m P.B2 yg ESpfckpvkH;ukd ESdyf&if
vnf; Lamp L1 u rD;vif;ae&rSm jzpfygw,f/ tJ'Dvkd condition 1-ck okdYr[kwf 2-ck
pvkH; true jzpfrS result ukd true jzpfatmif a&;csif&if Logical OR okH;&ygw,f/
Program a&;zkdY pOf;pm;wJYtcg (I0.0 = ON OR I0.1 = ON) jzpf&if Q0.0 ukd ON ygvkdY
awG;NyD;? a&;&rSm jzpfygw,f/
Logical OR &JU t"dyg,fu OR vkyfxm;wJY condition 1-ck okdYr[kwf tm;vkH; true
jzpf&if logic OR &JU result u true jzpfygw,f/
Program a&;&r,fh Status Time Diagram ukd atmufrSm az:jyxm;ygw,f/

I0.0

I0.1

Q0.0

LD program a&;wJYtcg logical OR jzpfapcsif&if condition awGukd txufatmuf


xm;NyD;a&;&ygw,f/
Program ukd atmufygtwkdif; a&;&ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 179 -
U Soe Tint Siemens PLC S7-200

okdYr[kwf wpfckck true jzpfrS Q0.0 ukd ON ygvkdY a&;csif&if logic


OR jzpfatmif atmufygtwkdif; a&;&ygw,f/

'D program ukd computer ay:rSm


a&;r,fqkd&if
1. yxrOD;pGm STEP 7-Micro/WIN ukd zGifhyg/

Cursor

Instruction code pwifa&;&r,fYae&m

2. Instruction code pwifa&;&r,fhae&mrSm Cursor csNyD;?

The more you learn about PLCs, the more you will be able to solve other control problems.
- 180 -
U Soe Tint Siemens PLC S7-200

3. Bit Logic &JU b,fbufrSm&SdwJY + ukd click yg/

4. Bit Logic &JU atmufrSm&SdwJY ukd double click yg/

5. 6. Bit Logic &JU atmuf


rSm&SdwJY ( ) ukd double click yg/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 181 -
U Soe Tint Siemens PLC S7-200

7. ??.? rSm oufqkdif&m Operand &JU Address ukd a&;


yg/ a&;NyD;&if Enter acgufyg/

8. 9.

10. 11.

12. 13.

The more you learn about PLCs, the more you will be able to solve other control problems.
- 182 -
U Soe Tint Siemens PLC S7-200

14. ykHwGifjyxm;ovkd Cursor ukd I0.0 ay:wifyg/

15. ykHwGifjyxm;ovkd Line Down ukd click yg/

16. I0.0 atmufrSm Cursor csNyD; atmufygtwkdif;a&;yg/

17. 18.
Program a&;NyD;&if tNrJwrf; Compile vkyfyg/ Error r&Sd&if PLC xJokdY download
vkyfyg/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 183 -
U Soe Tint Siemens PLC S7-200

Project (7) Logic AND (I/O Wiring)

Fig.4wGifazmfjyxm;wJhtwdkif; PLC &JU Input wGif P.B1 (N.O) eJY P.B2 (N.C) ukd
qufoG,fNyD; PLC &JU Output wGif Lamp L1 udk qufoG,fyg/

P.B 1
Lamp L1
0.0 0.0

+
P.B 2 24V
S7-200 CPU224
0.1 1L
AC/DC/RLY
24V
+ M

Input Terminal Output Terminal


Fig.4 PLC I/O devices connection diagram

Project (7) Logic AND


I/O wiring ukd Fig.4 twkdif;qufoG,fyg/ P.B1 u rESdyf&if OFF jzpfaewJY N.O
pushbutton jzpfvkdY P.B1 ukd ESdyf&if I0.0 u ON jzpfygw,f/ P.B2 u rESdyf&if ON jzpfae
wJY N.C pushbutton jzpfvkdY P.B2 ukd ESdyf&if I0.1 u OFF jzpfygw,f/
tcka&;&r,fh Program u P.B1 eJY P.B2 ukd wGJESdyfrS Lamp L1 u rD;vif;NyD;? P.B1
1-ckwnf; (okdYr[kwf) P.B2 1-ckwnf;ukd ESdyf&ifawmh Lamp L1 u rD;Nidrf;&rSm jzpfyg
w,f/
jzpfapvkdwJY Relation Diagram ukd atmufrSm az:jyxm;ygw,f/
ESdyf
P.B1
rESdyf
ESdyf
P.B2
rESdyf
ON
Lamp L1
OFF

The more you learn about PLCs, the more you will be able to solve other control problems.
- 184 -
U Soe Tint Siemens PLC S7-200

P.B1 u N.O jzpfvkdY P.B1 ukd ESdyf&if Input terminal 0.0 wGif 24VDC signal a&muf&Sd
NyD; Input memory I0.0 u ON jzpfoGm;ygw,f/
P.B1 (N.O) eJY I0.0 wkdY&JU qufEG,frI Relation Diagram ukd atmufrSmaz:jyxm;yg
w,f/ P.B1 ukd ESdyfrS I0.0 u ON ygw,f/

ESdyf
P.B1
rESdyf
ON
I0.0
OFF

P.B2 u N.C jzpfvkdY P.B2 ukd ESdyf&if Input terminal 0.0 u 24VDC signal ukd r&&Sd
awmhyJ Input memory I0.1 u OFF jzpfoGm;ygw,f/

P.B2(N.C) eJY I0.1 wkdY&JU qufEG,frI Relation Diagram ukd atmufrSmaz:jyxm;yg


w,f/ P.B2 ukd rESdyfrS I0.1 u ON ygw,f/ P.B2 ukd ESdyf&if I0.1 u OFF ygw,f/

ESdyf
P.B2
rESdyf
ON
I0.1
OFF

Output memory Q0.0 = ON jzpfrSom Output terminal 0.0 u 24VDC ukd &&SdNyD;
Lamp L1 u ON jzpfEkdifygw,f/

Q0.0 eJY Lamp L1 wkdY&JU qufEG,frI Relation Diagram ukd atmufrSm az:jyxm;yg
w,f/
ON
Q0.0
OFF

vif;
Lamp L1
rvif;

The more you learn about PLCs, the more you will be able to solve other control problems.
- 185 -
U Soe Tint Siemens PLC S7-200

P.B1 eJY P.B2 ukd wGJESdyf&if Lamp L1 u rD;vif;aeNyD;? 2-ckwGJESdyfwmr[kwf&if Lamp


L1 u rD;Nidrf;aeatmif Program a&;zkdY pOf;pm;wJYtcg?
P.B1 u N.O jzpfvkdY P.B1 ukd ESdyf&if I0.0 u ON jzpfoGm;ygw,f/
P.B2 u N.C jzpfvkdY P.B2 ukd ESdyf&if I0.1 u OFF jzpfoGm;ygw,f/
'gaMumifh I0.0 u ON jzpfaeNyD;? I0.1 u OFF jzpfae&ygr,f? 'Dtajctae 2-ckpvkH;
true jzpfae&r,fvkdY a&;&ygw,f/
'gaMumifh (I0.0 = ON AND I0.1 = OFF) jzpf&if Q0.0 ukd ON ygvkdY awG;NyD;? a&;&rSm
jzpfygw,f/
Logical AND &JU t"dyg,fu AND vkyfxm;wJY condition tm;vkH; true jzpfrS logic
AND &JU result u true jzpfygw,f/

Program a&;&r,fh Status Time Diagram ukd atmufrSm az:jyxm;ygw,f/


ESdyf
P.B1
rESdyf
ESdyf
P.B2
rESdyf
ON
Lamp L1
OFF

LD program a&;wJYtcg logical AND jzpfapcsif&if condition awGukd tpOftwkdif;


pDwef;NyD; qufwkdufa&;&ygw,f/
Program ukd atmufygtwkdif; a&;&ygw,f/

a&m yg true jzpfrS Q0.0 ukd ON ygvkdY a&;csif&if txufygt


wkdif; logical AND jzpfatmif a&;&ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 186 -
U Soe Tint Siemens PLC S7-200

Project (8) Logic OR

I/O wiring ukd Fig.4 twkdif;qufoG,fyg/ tcka&;&r,fh Program u P.B1 eJY P.B2
wpfckckukd ESdyf&if Lamp L1 u rD;vif;&rSm jzpfygw,f/ ESpfckpvkH;ESdyf&ifvnf; Lamp L1
u rD;vif;&rSm jzpfygw,f/ P.B1 ESifh P.B2 ESpfckpvkH;ukd rESdyfrS Lamp L1 u rD;Nidrf;aerSm
jzpfygw,f/
P.B1 u rESdyf&if OFF jzpfaewJY N.O pushbutton jzpfvkdY P.B1 ukd ESdyf&if I0.0 u
ON jzpfygw,f/ P.B2 u rESdyf&if ON jzpfaewJY N.C pushbutton jzpfvkdY P.B2 ukd ESdyf&if
I0.1 u OFF jzpfygw,f/
jzpfapvkdwJY Relation Diagram ukd atmufrSm az:jyxm;ygw,f/
ESdyf
P.B1
rESdyf
rESdyf
P.B2
ESdyf
ON
Lamp L1
OFF

P.B1 u N.O jzpfvkdY P.B1 ukd ESdyf&if Input terminal 0.0 wGif 24VDC signal a&muf&Sd
NyD; Input memory I0.0 u ON jzpfoGm;ygw,f/ P.B1(N.O) eJY I0.0 wkdY&JU qufEG,frI
Relation Diagram ukd atmufrSm az:jyxm;ygw,f/ P.B1 ukd ESdyfrS I0.0 u ON ygw,f/

ESdyf
P.B1
rESdyf
ON
I0.0
OFF

P.B2 u N.C jzpfvkdY P.B2 ukd ESdyf&if Input terminal 0.0 wGif 24VDC signal ra&muf
awmhyJ Input memory I0.1 u OFF jzpfoGm;ygw,f/ P.B2 (N.C) eJY I0.1 wkdY&JU qufEG,frI
Relation Diagram ukd atmufrSm az:jyxm;ygw,f/ P.B2 ukd rESdyfrS I0.1 u ON yg
w,f/ P.B2 ukd ESdyf&if I0.1 u OFF ygw,f/
rESdyf
P.B2
ESdyf
ON
I0.1
OFF

The more you learn about PLCs, the more you will be able to solve other control problems.
- 187 -
U Soe Tint Siemens PLC S7-200

Output memory Q0.0 u ON jzpfrSom Output terminal 0.0 u 24VDC ukd &&SdNyD;
Lamp L1 u ON jzpfEkdifygw,f/
Q0.0 eJY Lamp L1 wkdY&JU qufEG,frI Relation Diagram ukd atmufrSm az:jyxm;yg
w,f/
ON
Q0.0
OFF

ON
Lamp L1
OFF

P.B1 eJY P.B2 ukd wGJESdyf&ifjzpfap? wpfckcsif;pDukd ESdyf&ifjzpfap? Lamp L1 u rD;vif;


aeNyD;? 2-ckpvkH;ukd rESdyfawmhrS Lamp L1 u rD;Nidrf;aeatmif Program a&;zkdY pOf;pm;wJY
tcg?
P.B1 u N.O jzpfvkdY P.B1 ukd ESdyf&if I0.0 u ON jzpfoGm;ygw,f/ P.B2 u N.C
jzpfvkdY P.B2 ukd ESdyf&if I0.1 u OFF jzpfoGm;ygw,f/
'gaMumifh (I0.0 = ON OR I0.1 = OFF) jzpf&if Q0.0 ukd ON ygvkdY awG;NyD;? a&;&rSm
jzpfygw,f/
Program a&;&r,fh Status Time Diagram ukd atmufrSm az:jyxm;ygw,f/
ON
I0.0
OFF

ON
I0.1
OFF

ON
Lamp L1
OFF

LD program a&;wJYtcg logical OR jzpfapcsif&if condition awGukd txufatmuf


qifhNyD;a&;&ygw,f/
Program ukd atmufygtwkdif; a&;&ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 188 -
U Soe Tint Siemens PLC S7-200

Project (9) Self Holding (I/O Wiring)


Fig.5rSmazmfjyxm;wJhtwdkif; PLC &JU Input wGif P.B1 (N.O) eJY P.B2 (N.C) ukd
qufoG,fNyD; PLC &JU Output wGif Lamp L1 udk qufoG,fyg/
P.B 1
Lamp L1
0.0 0.0

+
P.B 2 24V
S7-200 CPU224
0.1 1L
AC/DC/RLY
24V
+ M

Input Terminal Output Terminal

Fig.5 PLC I/O devices connection diagram

Project (9) Self Holding


I/O wiring ukd Fig.5 twkdif;qufoG,fyg/ P.B1 u rESdyf&if OFF jzpfaewJY N.O
pushbutton jzpfvkdY P.B1 ukd ESdyf&if I0.0 u ON jzpfygw,f/ P.B2 u rESdyf&if ON jzpfae
wJY N.C pushbutton jzpfvkdY P.B2 ukd ESdyf&if I0.1 u OFF jzpfygw,f/
tcka&;r,fh Program u P.B1 ukd ESdyfNyD; jyefvTwfvkduf&ifvnf; Lamp L1 u quf
wkduf rD;vif;aeNyD;? P.B2 ukd ESdyfvkdufawmhrS Lamp L1 u rD;Nidrf;oGm;&rSm jzpfygw,f/
jzpfapvkdwJY Relation Diagram ukd atmufrSm az:jyxm;ygw,f/

ESdyf ON
P.B1
rESdyf
rESdyf ON
P.B2
ESdyf OFF

ON
Lamp L1
OFF

P.B1 u Start P.B jzpfNyD;? P.B2 u Stop P.B jzpfygw,f/ Stop P.B ukd fail-safe jzpf
atmifvkdY N.C ukd tokH;jyK&ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 189 -
U Soe Tint Siemens PLC S7-200

Program a&;&r,fh Status Time Diagram ukd atmufrSm az:jyxm;ygw,f/


ON ON
I0.0
OFF

ON
I0.1
OFF OFF

ON
Q0.0
OFF

Program ukd a&;zkdY awG;wJYtcgrSm


1. I0.0 = ON jzpf&if Q0.0 = ON ygvkdY awG;NyD; pa&;ygw,f/

2. I0.0 = OFF jzpfoGm;&ifvnf; Q0.0 ukd quf ON aeapzkdYtwGuf I0.0 eJY Q0.0 wkdY
wckck ON jzpfae&if Q0.0 ukd ON ygvkdY atmufygtwkdif;a&;ygw,f/ 'Dvkda&;wmukd
self-holding vkyfw,fvkdY ac:ygw,f/

3. Q0.0 = ON aewmukd OFF jzpfzkdYtwGuf (I0.0 = ON OR Q0.0 = ON) &JU logic


result u true jzpfaewJYtcsdef P.B2 ukd ESdyf&if Q0.0 ukd OFF jzpfatmif atmufygtwkdif;

a&;ygw,f/ P.B2 ukd ESdyf&if u False jzpfygw,f/ Fig.5 ukd jyefMunfhyg/

P.B1 ukd ESdyf&if I0.0 u ON jzpfygw,f/ P.B2 ukd ESdyf&if I0.1 u OFF jzpfygw,f/
P.B1 ukd ESdyfwJYtcsdefrSm P.B2 ukd rESdyfygbl;/ P.B2 ukd ESdyfwJYtcsdefrSm P.B1 ukd rESdyfyg
bl;/
The more you learn about PLCs, the more you will be able to solve other control problems.
- 190 -
U Soe Tint Siemens PLC S7-200

Project (10) Self Holding (I/O Wiring)


Fig.6rSmazmfjyxm;wJhtwdkif; PLC &JU Input wGif P.B1 (N.O) eJY P.B2 (N.O) ukd
qufoG,fNyD; PLC &JU Output wGif Lamp L1 udk qufoG,fyg/
P.B 1
Lamp L1
0.0 0.0

+
P.B 2 24V
S7-200 CPU224
0.1 1L
AC/DC/RLY
24V
+ M

Input Terminal Output Terminal


Fig.6 PLC I/O devices connection diagram
Project (10) Self Holding
I/O wiring ukd Fig.6 twkdif;qufoG,fyg/ P.B1 u rESdyf&if OFF jzpfaewJY N.O
pushbutton jzpfvkdY P.B1 ukd ESdyf&if I0.0 u ON jzpfygw,f/ P.B2 uvnf; rESdyf&if OFF
jzpfaewJY N.O pushbutton jzpfvkdY P.B2 ukd ESdyf&if I0.1 u ON jzpfygw,f/
tcka&;r,fh Program u P.B1 ukd ESdyfNyD; jyefvTwfvkduf&ifvnf; Lamp L1 u quf
wkduf rD;vif;aeNyD;? P.B2 ukd ESdyfawmhrS Lamp L1 u rD;Nidrf;oGm;&rSm jzpfygw,f/
jzpfapvkdwJY Relation Diagram ukd atmufrSm az:jyxm;ygw,f/
ESdyf ON
P.B1
rESdyf
ESdyf ON
P.B2
rESdyf
ON
Lamp L1
OFF

Start_Stop program ukd instruction code awG&JUoabmem;vnfatmif a&;jywm


jzpfvkdY Stop P.B ukd N.O okH;xm;wmjzpfygw,f/
vufawGU tokH;jyKwJYtcg Stop P.B ukd tNrJwrf; N.C ukdom tokH;jyKygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 191 -
U Soe Tint Siemens PLC S7-200

Program a&;&r,fh Status Time Diagram ukd atmufrSm az:jyxm;ygw,f/


ON ON
I0.0
OFF

ON ON
I0.1
OFF

ON
Q0.0
OFF

Program ukd a&;zkdY awG;wJYtcgrSm


1. I0.0 = ON jzpf&if Q0.0 = ON ygvkdY awG;NyD; pa&;ygw,f/

2. I0.0 = OFF jzpfoGm;&ifvnf; Q0.0 ukd qufNyD; ON aeapzkdYtwGuf I0.0 = ON


okdYr[kwf Q0.0 = ON jzpf&if? Q0.0 ukd ON ygvkdY a&;ygw,f/ 'Dvkda&;wmukd self-holding
vkyfw,fvkdY ac:ygw,f/

3. (I0.0 = ON OR Q0.0 = ON) &JU logic result u true jzpfaewJYtcsdef P.B2 ukd
ESdyf&if Q0.0 ukd OFF jzpfatmif atmufygtwkdif; a&;&ygw,f/ P.B2 ukdESdyf&if I0.1 u

ON wmjzpfwJYtwGuf P.B2 ukd ESdyf&if u False jzpfygw,f/

P.B1 eJY P.B2 u rESdyf&if OFF jzpfaewJY N.O pushbutton awGjzpfvkdY P.B1 ukd ESdyf&if
I0.0 u ON jzpfygw,f/ P.B2 ukd ESdyf&if I0.1 u ON jzpfygw,f/ P.B1 ukd ESdyfwJYtcsdef
rSm P.B2 ukd rESdyfygbl;/ P.B2 ukd ESdyfwJY tcsdefrSm P.B1 ukd rESdyfygbl;/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 192 -
U Soe Tint Siemens PLC S7-200

Project (11) TON ON-Delay


I/O wiring ukd Fig.6 twkdif;qufoG,fyg/ P.B1 eJY P.B2 u rESdyf&if OFF jzpf aewJY
N.O pushbutton awG jzpfvkdY P.B1 ukd ESdyf&if I0.0 u ON jzpfygw,f/ P.B2 ukd ESdyf&if
I0.1 u ON jzpfygw,f/
tcka&;r,fh Program u P.B1 ukd ESdyfNyD; jyefvTwfvkduf&if P.B1 ukd ESdyfwJYtcsdefu
pNyD; 10-rdepfMumatmif Lamp L1 u qufwkdufrD;vif;aeygr,f/ rD;vif;wm 10-rdepf
jynfhwJYtcg Lamp L1 u olYtvkdvkd rD;Nidrf; oGm;&rSm jzpfygw,f/
jzpfapvkdwJY Relation Diagram ukd atmufrSm az:jyxm;ygw,f/
ESdyf ON
P.B1
rESdyf
ON
Lamp L1 10 minutes
OFF

Program a&;&r,fh Status Time Diagram ukd atmufrSm az:jyxm;ygw,f/


ON ON
I0.0
OFF

ON
Q0.0 10 minutes
OFF

Program ukd a&;zkdY awG;wJYtcgrSm 10-rdepf 10min qkdwJY tcsdefygvmwJYtwGuf


Timer function ukd tokH;jyK&rSmjzpfygw,f/ Timer rSm TON eJY TOF 2-rsKd;&Sdygw,f/ tck
Project (11) ukd a&;wJYtcg TON ukd tokH;jyKygr,f/

&JU obm0rSm
TON &JU IN condition u true jzpfaeoa&GUom time
counting vkyfaeNyD;? IN condition u false jzpf&if time counting vkyfwm&yfoGm;NyD; timer
reset jzpfoGm;ygw,f/ Timer reset jzpf&if ON jzpfaewJY timer u OFF jzpfoGm;ygw,f/
Time counting vkyfaewJY timer u time counting vkyfwm&yfoGm;NyD; current value
tm;vkH;ukd zsufypfygw,f/ Reset current value to 0 vkyfypfygw,f/
ON-delay Timer (TON) twGuf?
T37 to T63, T101 to T255 wkdYu 100ms timer rsm;jzpfMuygw,f/
T33 to T36, T97 to T100 wkdYu 10ms timer rsm;jzpfMuygw,f/
T32 eJY T96 u 1ms timer jzpfygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 193 -
U Soe Tint Siemens PLC S7-200

Program ukd internal memory ukdokH;NyD; atmufygtwkdif;a&;&ygw,f/

ukd a&;csif&if Instructions &JUatmuf Timers &JU


a&SUu + ukd click yg/

a&;r,fhae&mrSm cursor csNyD; Timers &JUatmufu TON ukd double


click yg/ Timer No. ukd T37 vkdY a&;NyD; PT ukd 6000 vkdY a&;yg/
PT ukd trsm;qkH; 32767 txdom a&;vkdY &ygw,f/
Program a&;NyD;wkdif; compile vkyfyg/ Error r&Sd&if PLC xJukd download vkyfyg/
P.B1 ukd ESdyfNyD; jyefvTwfvkduf&if Lamp L1 u P.B1 ukd ESdyfwJYtcsdefupNyD; 10-rdepf
Mumatmif qufwkdufrD;vif;aeygw,f/ rD;vif;wm 10-rdepf jynfhwJYtcg Lamp L1 u
olYtvkdvkd rD;Nidrf;oGm;ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 194 -
U Soe Tint Siemens PLC S7-200

t"dyg,f&Sif;vif;csuf

M0.0 u internal memory bit jzpfygw,f/ P.B1 ukd ESdyfNyD; jyefvTwfvkduf&if I0.0 u
ceom ON NyD; OFF jyefjzpfoGm;ygvdrfhr,f/ Timer u time counting qufjzpfaezkdYtwGuf
P.B1 ukd ESdyfNyD; jyefvTwfvkdufwJYtcg ON jzpfusefcJYwJY internal bit &&Sdatmif M0.0 ukd
self-hold vkyfNyD;a&;wmjzpfygw,f/ T37 = ON jzpfwJYtcg M0.0 u OFF jyefjzpfoGm;yg
w,f/

M0.0 = ON jzpfaerSom T37 u time counting vkyfaerSmjzpfygw,f/ M0.0 = ON


jzpfaewm 10min MumoGm;&if T37 = ON jzpfygw,f/ 100ms timer u 1 digit count vkyf
zkdY 100ms (0.1s) Mumygw,f/ tJ'gukd time base vkdY ac:ygw,f/ 10 minutes (600s) qkdwJY
tcsdefowfrSwfrI twGuf PT ukd 6000 vkdY a&;&ygw,f/ t"dyg,fu 6000 digits jzpfyg
w,f/
PT wGufenf; PT = Desired Seconds Time Base
PT = 600s 100ms = 600s 0.1s = 6000
100ms timer u 1 digit count vkyfzkdY 100ms (0.1s) MumwJYtwGuf PT ukd 10 vkdY a&;
&if 1s jzpfygw,f/ PT ukd 100 vkdY a&;&if 10s jzpfygw,f/ PT ukd 1000 vkdY a&;&if 100s
jzpfygw,f/ PT ukd 6000 vkdY a&;xm;awmh 600s (10min) jzpfygw,f/

tckvkd ukd xnfha&;xm;wJYtwGuf M0.0 = ON jzpfaeNyD; T37 = OFF jzpf


rSom Q0.0 u ON jzpfygw,f/ M0.0 uvnf; P.B1 ukd ESdyfvkdufvkdY I0.0 = ON jzpfoGm;rS
ON jzpfygw,f/

rygbJeJY T37 = OFF jzpf&if Q0.0 ukd ON ygvkdY a&;xm;cJY&if PLC ukd
RUN vkdufwmeJY Q0.0 u ON jzpfaeygvdrfhr,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 195 -
U Soe Tint Siemens PLC S7-200

Project (12) TOF OFF-Delay


I/O wiring ukd Fig.6 twkdif;qufoG,fyg/ P.B1 eJY P.B2 u rESdyf&if OFF jzpf aewJY
N.O pushbutton awGjzpfvkdY P.B1 ukd ESdyf&if I0.0 u ON jzpfygw,f/ P.B2 ukd ESdyf&if I0.1
u ON jzpfygw,f/
tcka&;r,fh Program u P.B1 ukd ESdyfNyD; jyefvTwfvkduf&if P.B1 ukd jyefvTwfwJY
tcsdefupNyD; 30-puefYMumatmif Lamp L1 u qufwkduf rD;vif;aeygr,f/ rD;vif;wm
30-puefY jynfhawmh Lamp L1 u olYtvkdvkd rD;Nidrf;oGm;&rSm jzpfygw,f/
jzpfapvkdwJY Relation Diagram ukd atmufrSm az:jyxm;ygw,f/
ESdyf
P.B1 OFF ON OFF
rESdyf
ON
Lamp L1
OFF 30 seconds

Program a&;&r,fh Status Time Diagram ukd atmufrSm az:jyxm;ygw,f/


ON
I0.0 OFF ON OFF
OFF

ON
Q0.0
OFF 30 seconds

Program ukd a&;zkdY awG;wJYtcgrSm 30-puefY 30s qkdwJY tcsdefygvmwJYtwGuf


Timer function ukd tokH;jyK&rSmjzpfygw,f/ Timer rSm TON eJY TOF 2-rsKd;&Sdygw,f/ tck
Project (12) ukd a&;wJYtcg TOF ukd tokH;jyKygr,f/

&JU obm0rSm TOF &JU IN condition u true jzpfwmeJY T37 csufcsif;


ON oGm;ygw,f/ IN condition u false jzpfoGm;&ifawmh T37 u time counting ukd pwif
vkyfygw,f/ Time counting vkyfaewJY wcsdefvkH; T37 u ON jzpfaeygw,f/ Current
value eJY PT eJY nDoGm;rS Timer u OFF jzpfoGm;ygw,f/
OFF-delay Timer (TOF) twGuf?
T37 to T63, T101 to T255 wkdYu 100ms timer rsm;jzpfMuygw,f/
T33 to T36, T97 to T100 wkdYu 10ms timer rsm;jzpfMuygw,f/
T32 eJY T96 u 1ms timer jzpfygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 196 -
U Soe Tint Siemens PLC S7-200

Program ukd atmufygtwkdif;a&;&ygw,f/

ukd a&;csif&if Instructions &JUatmufrSm &SdwJY


Timers &JUa&SUu + ukd click yg/

a&;r,fhae&mrSm cursor csNyD; Timers &JUatmufu TOF ukd double


click yg/ Timer No. ukd T37 vkdY a&;NyD; PT ukd 300 (for 30s) vkdY a&;yg/
PT ukd trsm;qkH; 32767 txdom a&;vkdY &ygw,f/
Program a&;NyD;wkdif; compile vkyfyg/ Error r&Sd&if PLC xJukd download vkyfyg/
P.B1 ukd ESdyfNyD; jyefvTwfvkduf&if P.B1 ukd jyefvTwfwJY tcsdefupNyD; 30-puefY
Mumatmif Lamp L1 u qufwkduf rD;vif;aeygw,f/ rD;vif;wm 30-puefY jynfhawmh
Lamp L1 u olYtvkdvkd rD;Nidrf;oGm;ygw,f/
Staircase lighting avScg;rD;zGifhwJY ae&mrsKd;rSm tokH;jyKvkdY&ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 197 -
U Soe Tint Siemens PLC S7-200

t"dyg,f&Sif;vif;csuf

I0.0 = ON &if T37 = ON jzpfygw,f/ I0.0 = OFF jzpfNyD; 30s MumrS T37 = OFF
jzpfygw,f/

PT wGufenf; PT = Desired Seconds Time Base


PT = 30s 100ms = 30s 0.1s = 300

T37 u 100ms timer jzpfygw,f/ 100ms timer u 1 digit count vkyfzkdY 100ms (0.1s)
Mumygw,f/ tJ'gukd time base vkdY ac:ygw,f/ 30 seconds qkdwJY tcsdefowfrSwfrI
twGuf PT ukd 300 vkdY a&;&ygw,f/ t"dyg,fu 300 digits jzpfygw,f/
P.B1 ukd ESdyfNyD; jyefvTwfvkduf&if ESdyfwkH;ceom I0.0 u ON NyD;? jyefvTwfvkdufwJY
tcgrSm I0.0 u OFF jyefjzpfoGm;ygvdrfhr,f/

&JU obm0rSm TOF &JU IN condition u true (I0.0 = ON) jzpfwmeJY


T37 csufcsif; ON oGm;ygw,f/ IN condition u false (I0.0 = OFF) jzpfoGm;awmhrS T37
u time counting ukd pwifvkyfygw,f/ Time counting vkyfaewJY wcsdefvkH; T37 u ON
jzpfaeygw,f/ Current value eJY PT eJY nDoGm;rS Timer u OFF jzpfoGm;ygw,f/ Time
counting vnf; qufrvkyfawmhygbl;/

T37 = ON jzpfrSom Q0.0 u ON jzpfygw,f/ T37 uvnf; P.B1 ukd ESdyfvkdufwmeJY


csufcsif; ON jzpfygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 198 -
U Soe Tint Siemens PLC S7-200

Project (13) Same function either using TON or TOF


P.B1 ukd ESdyfvkdufvkdY I0.0 = ON jzpfwmESifhwNydKifwnf; Lamp L1 u rD;vif;NyD;?
rD;vif;aewm 30-puefY jynfhawmhrS Lamp L1 u olYtvkdvkd rD;Nidrf;oGm;&ygr,f/ tJ'Dvkd
jzpfatmif TON ukd okH;NyD;a&;vkdY &ovkd TOF ukd okH;NyD;a&;vkdYvnf; &ygw,f/
TON uk d okH;NyD;a&;r,fqkd&if

tckvkda&;&ygw,f/

I0.0 = OFF to ON jzpfrS &JU logic result u true jzpfwJY

twGuf I0.0 u tcsdeftMumBuD; ON jzpfae&ifvnf; u one


scan time om true jzpfygw,f/
TOF uk d okH;NyD;a&;r,fqkd&if

tckvkda&;&ygw,f/

I0.0 u tcsdeftMumBuD; ON jzpfae&ifvnf; &JU logic result


u 1 scan om true jzpfNyD;? csufcsif; false jyefjzpfoGm;ygw,f/
'gaMumifh P.B1 ukd rvTwfwrf;ESdyfxm;vkdY I0.0 = ON jzpfaewm tcsdefb,favmuf
MumMum TON (T37) = ON jzpfwmeJY TOF (T37) = ON jzpfwmwkdY[m 30s tcsdefuGufwd
wlygw,f/ 30s jynfhwmeJY T37 = OFF jyefjzpfygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 199 -
U Soe Tint Siemens PLC S7-200

Siemens PLC S7-200 CPU224 xJrSm ygwJY Timer trsKd;tpm;awGukd atmufrSm


azmfjyxm;ygw,f/

TONR twGuf Timer Number eJY oufqkdifwJY Time Base awGuawmh


T0 & T64 twGuf 1ms Time Base jzpfygw,f/
T1 to T4 & T65 to T68 twGuf 10ms Time Base jzpfygw,f/
T5 to T31 & T69 to T95 twGuf 100ms Time Base jzpfygw,f/

Retentive ON-delay Timer &JU vkyfaqmifcsufu TONR (T5) &JU IN


condition u true jzpf&if TONR (T5) u time counting vkyfaeNyD;? IN condition u false
jzpfoGm;&if TONR (T5) ukd reset vkyfrypfygbl;/ Time counting vkyfwmom &yfoGm;yg
w,f/ Current value ukd vuf&Sdtwkdif; xdef;odrf;xm;ygw,f/ IN condition u aemuf
wpfcg true jyefjzpf&if &Sd&if;pGJ current value rSpwifNyD; time counting qufvkyfygw,f/
Current value eJY PT eJY nDoGm;wJYtcg TONR (T5) u ON jzpfoGm;ygw,f/

TONR (T5) ukd reset jzpfatmif reset instruction okH;NyD; instruction line
wpfck xyfa&;ay;&ygw,f/
TONR ukdokH;NyD; a&;xm;wJY Project (18) TONR Retentive ON-Delay ukd pmrsufESm
(136 ESifh 219) rSm az:jyxm;ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 200 -
U Soe Tint Siemens PLC S7-200

Project (14) Sequential Delay Output Program

A
1st Oil pump motor run
Oil Pump Motor

B
2nd Main motor run
Main Motor

C
3rd Auxiliary motor run
Auxiliary Motor

tckvkyfr,fh project u Start pushbutton ukd wpfcsufESdyfvkdufwmeJY Motor 3-vkH;


wpfvkH;NyD; wpfvkH; tcsdefjcm;NyD; tvkdtavsmuf x vnfatmif PLC ukd ckdif;xm;wJY
program jzpfygw,f/ yxr Oil pump motor pwif vnfywfygr,f/ Oil pump motor
vnfNyD; 10sec MumwJYtcg Main motor xyfrH vnfywfygr,f/ Main motor vnfNyD; 5sec
MumwJYtcg Auxiliary motor xyfrH vnfywfygr,f/ Stop pushbutton ukd ESdyfvkduf&if
motor tm;vkH; NydKifwl&yfoGm;&ygr,f/
'D program wGif Input device u P.B1 (N.O) eJY P.B2 (N.C) jzpfNyD;? 4if;wkdYukd Input
terminal 0.0 eJY 0.1 rSmtoD;oD; qufoG,fxm;ygw,f/ P.B1 ukd ESdyf&if I0.0 = ON jzpfyg
w,f/ P.B2 ukd ESdyf&if I0.1 = OFF jzpfygw,f/
Output device awGu MC1 (for oil pump), MC2 (for main compressor) eJY MC3
(for aux. motor) wkdY jzpfMuygw,f/ MC1 ukd Output terminal 0.0 wGif4if;? MC2 ukd
Output terminal 0.1 wGif4if;? MC3 ukd Output terminal 0.2 wGif4if;? toD;oD;wwfqif
xm;ygw,f/ Q0.0 = ON jzpfrS Output terminal 0.0 rSm qufxm;wJY MC1 u energized
jzpfygw,f/ xkdYtwl Q0.1 for MC2 eJY Q0.2 for MC3 wkdYjzpfMuygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 201 -
U Soe Tint Siemens PLC S7-200

tck project rSm vkyfaqmif&r,fhvkyfief; operation &JU tajctaeukd tcsdefESifhwuG


az:jyay;wJY status time diagram ukd MunfhNyD; program a&;zkdY wqifhNyD;wqifh step by
step pOf;pm;ykH? pOf;pm;enf;ukd atmufrSmaz:jyxm;ygw,f/

Status Time Diagram

ON
Start P.B I0.0
OFF

ON
Stop P.B I0.0
OFF

ON
Oil Pump Q0.0
OFF

ON
Main Q0.1
OFF

ON
Auxiliary Q0.2
OFF

Start P.B (N.O) ukd ESdyf&if Oil Pump vnfcsifwmjzpfvkdY I0.0 = ON &if Q0.0 ukd ON
ygvkdY pwifa&;ygw,f/
Network 1 (1st step)

Start P.B (N.O)

The more you learn about PLCs, the more you will be able to solve other control problems.
- 202 -
U Soe Tint Siemens PLC S7-200

Start P.B ukd ESdyfNyD;&if jyefvTwfrSmjzpfvkdY I0.0 = OFF jzpfoGm;&ifvnf; Q0.0 u


quf ON aezkdY self-hold jzpfatmif program &JU Network 1 ukd atmufygtwkdif; jyifa&;
ygw,f/
Network 1 (2nd step)

Start P.B (N.O)

Q0.0 = ON jzpfwmESifhwNydKifwnf; Timer uvnf; 10s Mumatmif time counting


vkyf&rSmjzpfvkdY 100ms ON-delay timer T37 ukd PT = 100 xm;NyD; Network 1 ukd atmuf
ygtwkdif; xyfjyifygw,f/
Network 1 (3rd step)

Start P.B (N.O)

Input terminal 0.1 wGif qufxm;aom Stop P.B (N.C) ukd ESdyfwJYtcg Q0.0 vnf;
OFF jzpfoGm;atmif (self-hold jyKwfoGm;atmif) Network 1 ukd atmufygtwkdif; xyfjyif
vkdufygw,f/
Network 1 (4th step)

Start P.B (N.O) Stop P.B (N.C)

The more you learn about PLCs, the more you will be able to solve other control problems.
- 203 -
U Soe Tint Siemens PLC S7-200

Q0.0 = ON jzpfNyD; 10s MumvkdY T37 = ON jzpfwJYtcg Q0.1 uvnf; ON & self-hold
jzpf&rSmrkdYvkdY Network 2 ukd atmufygtwkdif; pwifa&;ygw,f/
Network 2 (1st step)

Q0.1 = ON jzpfNyD;oGm;&if T37 u qufNyD; ON aezkdY rvkdawmhwJYtwGuf T37 ukd


reset jzpfatmif Network 1 ukd atmufygtwkdif; jyifa&;ygw,f/
Network 1 (5th stage)

Start P.B (N.O) Stop P.B (N.C)

Q0.1 = ON jzpfwmESifhwNydKifwnf; Timer (T38) uvnf; 5s Mumatmif time


counting vkyf&rSmjzpfvkdY 100ms ON-delay timer (T38) ukd PT = 50 xm;NyD; Network 2 ukd
atmuf ygtwkdif; jyifa&;ygw,f/
Network 2 (2nd stage)

The more you learn about PLCs, the more you will be able to solve other control problems.
- 204 -
U Soe Tint Siemens PLC S7-200

Input terminal 0.1 wGif qufxm;aom Stop P.B (N.C) ukd ESdyfwJYtcg Q0.1 vnf;
OFF jzpfoGm;atmif (self-hold jyKwfoGm;atmif) Network 2 ukd atmufygtwkdif; jyifa&;
ygw,f/
Network 2 (3rd stage)

Stop P.B (N.C)

Q0.2 = ON jzpfNyD;&if T38 u qufNyD; ON aezkdY rvkdawmhwJYtwGuf T38 ukd reset


vkyfzkdY Network 2 ukd atmufygtwkdif; jyifa&;ygw,f/
Network 2 (4th stage)

Stop P.B (N.C)

T38 = ON jzpf&if Q0.2 = ON jzpfNyD; self-hold jzpfatmif? Stop P.B (N.C) ukd
ESdyf&if Q0.2 = OFF jzpfatmif? Network 3 ukd atmufygtwkdif; a&;ygw,f/
Network 3

Stop P.B (N.C)

The more you learn about PLCs, the more you will be able to solve other control problems.
- 205 -
U Soe Tint Siemens PLC S7-200

Program tjynfhtpkHrSm atmufygtwkdif;jzpfygw,f/

Network 1
Start P.B Stop P.B
(N.O) (N.C) Oil Pump Motor

Oil Pump Motor Main Motor

Network 2

Stop P.B
(N.C) Main Motor

Main Motor Auxiliary Motor

Network 3
Stop P.B
(N.C) Auxiliary Motor

Auxiliary Motor

The more you learn about PLCs, the more you will be able to solve other control problems.
- 206 -
U Soe Tint Siemens PLC S7-200

txufyg program ukd compile vkyfvkduf&if atmufygykHvkd jzpfoGm;ygw,f/

Start P.B Stop P.B


(N.O) (N.C) Oil Pump Motor

Oil Pump Motor Main Motor

Stop P.B
(N.C) Main Motor

Main Motor Auxiliary Motor

Stop P.B
(N.C) Auxiliary Motor

Auxiliary Motor

The more you learn about PLCs, the more you will be able to solve other control problems.
- 207 -
U Soe Tint Siemens PLC S7-200

t"dyg,f&Sif;vif;csuf

Network 1

Start P.B Stop P.B


(N.O) (N.C) Oil Pump Motor

Main Motor

Oil Pump Motor

Network 1-ckwnf;rSm execution 2-ck eJY ukd txufyg


ykHrSm jyxm;ovkda&;wmrsKd;ukd output branching vkdY ac:ygw,f/
'D program rSm Stop P.B u NC jzpfvkdY rESdyf&if I0.1 u ON aeygw,f/ Start P.B
ukd ESdyfvkdufwmeJY I0.0 u ON jzpfoGm;vkdY Q0.0 vnf; ON NyD; self-hold jzpfoGm;ygw,f/
Q0.0 = ON jzpf&if MC1 contact closed jzpfNyD; Oil pump motor vnfygw,f/
ON delay timer T37 uvnf; time counting pwifjyKvkyfygw,f/
PT qkdwmu preset time jzpfygw,f/ SV (set value) eJY twlwlyJ jzpfygw,f/ PT ukd
100 vkdY a&;xm; wJYtwGuf 10s MumwJYtcg T37 = ON jzpfoGm;ygw,f/
T37 = ON jzpf&if Q0.1 u ON jzpfNyD;? Self-hold jzpfoGm;ygw,f/
Q0.1 = ON jzpfNyD; next scan rSm T37 u OFF jyefjzpfygw,f/
T37 = ON jzpfwJY tcsdefumv duration u 1 scan cycle omMumygw,f/
Q0.1 = ON jzpf&if MC2 contact closed jzpfNyD; Main motor vnfygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 208 -
U Soe Tint Siemens PLC S7-200

Network 2
Stop P.B
(N.C) Main Motor

Main Motor Auxiliary Motor

T37 = ON jzpfwmeJYwNyKdifwnf; Q0.1 vnf; ON jzpfNyD; self-hold jzpfoGm;ygw,f/


Q0.1 = ON jzpf&if MC2 contact closed jzpfNyD; Main motor vnfygw,f/
T37 = ON jzpfwmeJYwNyKdifwnf; T38 vnf; time counting pwifjyKvkyfygw,f/
T38 &JU PT ukd 50 vkdY
a&;xm;wJYtwGuf 5s MumwJYtcg T38 u ON jzpfoGm;ygw,f/
T38 = ON jzpfawmh Q0.2 u ON NyD; self-hold jzpfoGm;ygw,f/
Q0.2 = ON jzpf&if T38 u OFF jzpfygw,f/ T37 = ON jzpfwJYtcsdefumv duration
[m 1 scan cycle omMumjrifhygw,f/

Network 3
Stop P.B
(N.C) Auxiliary Motor

Auxiliary Motor

T38 = ON jzpfawmh Q0.2 u ON NyD; self-hold jzpfygw,f/ Q0.2 = ON jzpf&if MC3


&JU contact closed jzpfNyD; Auxiliary motor vnfygw,f/
Stop pushbutton P.B2 (N.C) ukd ESdyfvkdufawmhrS I0.1 = OFF jzpfNyD; motor tm;vkH;
&yfoGm;ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 209 -
U Soe Tint Siemens PLC S7-200

Project (15) CTU Up Counter

I/O wiring ukd Fig.6 twkdif;qufoG,fyg/ P.B1 eJY P.B2 u rESdyf&if OFF jzpfaewJY
N.O pushbutton awGjzpfvkdY P.B1 ukd ESdyf&if I0.0 u ON jzpfygw,f/ P.B2 ukd ESdyf&if I0.1
u ON jzpfygw,f/
tcka&;r,fh Program u P.B1 ukd 1-cgESdyf&if Counter u 1 digit count up vkyfNyD;
P.B1 ukd ESdyfwm 5-cg jynfhawmhrS Lamp L1 u rD;vif;&rSmjzpfygw,f/ P.B2 ukd ESdyf&if
Lamp L1 u rD;Nidrf;oGm;&rSm jzpfygw,f/

jzpfapvkdwJY Relation Diagram ukd atmufrSm az:jyxm;ygw,f/


1 2 3 4 5
ESdyf
P.B1 OFF ON ON ON ON ON OFF
rESdyf
ESdyf
P.B2 OFF ON
rESdyf
ON
Lamp L1 ON OFF
OFF

Program a&;&r,fh Status Time Diagram ukd atmufrSm az:jyxm;ygw,f/


1 2 3 4 5
ON
I0.0 ON ON ON ON ON
OFF

ON
I0.1 ON
OFF

ON
Q0.0 ON
OFF

Program ukd a&;zkdY awG;wJYtcgrSm 5-cg qkdwJY tBudrfta&twGuf ygvmwJYtwGuf


Counter function ukd tokH;jyK&rSm jzpfygw,f/ Counter rSm CTU, CTD eJY CTUD qkdNyD;
3-rsKd;&Sdygw,f/ tck Project (15) ukd a&;wJYtcg CTU ukd tokH;jyKygr,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 210 -
U Soe Tint Siemens PLC S7-200

Program ukd atmufygtwkdif; a&;&ygw,f/

tckvkd a&;xm;&if I0.0 = ON 1-cg jzpf&if C0 u 1 digit count up vkyfygw,f/


I0.0 = ON 5-cg jzpf&if current value u 5 jzpfoGm;NyD; C0 u ON jzpfoGm;ygw,f/
'DtcsdefrSm I0.1 = ON jzpf&if C0 u OFF jzpfoGm;ygw,f/ Current value u 0 jzpf
oGm;ygw,f/
C0 = ON jzpfoGm;&if Q0.0 u ON jzpfygw,f/

t"dyg,f&Sif;vif;csuf

&JU aqmif&GufykHrSm CTU &JU CU (count up input condition) u true


wpfcg jzpf&if C0 u 1 digit count up vkyfygw,f/ CU condition u true 5-cg jzpf&if
current value u PV eJY nDoGm;vkdY C0 u ON oGm;ygw,f/ C0 = ON jzpfNyD;&ifvnf;
count up input condition = true jzpfwkdif; CTU u count up qufvkyfygw,f/
CTU &JU R (reset input condition) u true jzpf&if C0 ukd reset vkyfygw,f/ C0 u
ON NyD;om;jzpfae&if C0 u OFF jzpfoGm;ygw,f/ Counting vkyfaeqJ current value ukd
reset to 0 jzpfapygw,f/
CTU &JU PV (preset value input) ae&mrSm counter u a&wGuf&r,fh digit ta&t
wGufukd a&;&ygw,f/
PV wefzkd;ukd trsm;qkH; 32767 txdom a&;vkdY&ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 211 -
U Soe Tint Siemens PLC S7-200

Project (16) CTD Down Counter

I/O wiring ukd Fig.6 twkdif;qufoG,fyg/ P.B1 eJY P.B2 u rESdyf&if OFF jzpf aewJY
N.O pushbutton awGjzpfvkdY P.B1 ukd ESdyf&if I0.0 u ON jzpfygw,f/ P.B2 ukd ESdyf&if I0.1
u ON jzpfygw,f/
tcka&;r,fh Program u P.B1 ukd 1-cg ESdyf&if Counter u 1 digit count down
vkyfNyD; P.B1 ukd ESdyfwm 5-cg jynfhawmhrS Lamp L1 u rD;vif;&rSm jzpfygw,f/ P.B2 ukd
ESdyf&if Lamp L1 u rD;Nidrf;oGm;&rSm jzpfygw,f/

jzpfapvkdwJY Relation Diagram ukd atmufrSm az:jyxm;ygw,f/


1 2 3 4 5
ESdyf
P.B1 OFF ON ON ON ON ON OFF
rESdyf
ESdyf
P.B2 OFF ON
rESdyf
ON
Lamp L1 ON OFF
OFF

Program a&;&r,fh Status Time Diagram ukd atmufrSm az:jyxm;ygw,f/


1 2 3 4 5
ON
I0.0 ON ON ON ON ON
OFF

ON
I0.1 ON
OFF

ON
Q0.0 ON
OFF

Program ukd a&;zkdY awG;wJYtcgrSm 5-cg qkdwJY tBudrfta&twGuf ygvmwmjzpfvkdY


Counter function ukd tokH;jyK&rSm jzpfygw,f/ Counter rSm CTU, CTD eJY CTUD okH;rsKd;
&Sdygw,f/ tck Project (16) ukd a&;wJYtcg CTD ukd tokH;jyKygr,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 212 -
U Soe Tint Siemens PLC S7-200

Program ukd atmufygtwkdif; a&;&ygw,f/

tckvkd a&;xm;&if I0.0 = ON 1-cg jzpf&if C0 u 1 digit count down vkyfygw,f/


I0.0 = ON 5-cg jzpf&if current value u 0 jzpfoGm;NyD; C0 u ON jzpfoGm;ygw,f/
I0.1 = ON jzpf&if C0 u OFF jzpfoGm;ygw,f/ Current value u 5 jyefjzpfoGm;yg
w,f/
C0 u ON jzpfoGm;&if Q0.0 = ON jzpfygw,f/

t"dyg,f&Sif;vif;csuf

&JU aqmif&GufykHrSm
CTD &JU CD (count down input condition) u true
1-cg jzpf&if C0 u 1 digit count down vkyfygw,f/ CD condition u true 5-cg jzpf&if
current value u 0 jzpfoGm;vkdY C0 = ON jzpfoGm;ygw,f/ 'DtcsdefrSm count down input
condition u true 1-cg xyfjzpf&if C0 u count down qufrvkyfawmhygbl;/
CTD &JU LD (load input condition) u true jzpf&if C0 ukd load to PV vkyfygw,f/
C0 u ON NyD;om;jzpfae&if C0 u OFF jyefjzpfoGm;ygw,f/ Counting vkyfaeqJ current
value ukd load to 5 (PV) jzpfapygw,f/
CTD &JU PV (preset value input) ae&mrSm counter u a&wGuf&r,fh digit ta&
twGufukd a&;&ygw,f/ PV ukd trsm;qkH; 32767 txdom a&;vkdY&ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 213 -
U Soe Tint Siemens PLC S7-200

Project (17) CTUD Up_Down Counter

Fig.7 rSmazmfjyxm;wJhtwdkif; PLC &JU Input wGif Car IN sensor (N.O) eJY Car
OUT sensor (N.O) wkdYukd qufoG,fNyD; PLC &JU Output wGif Parking Full Lamp L1 udk
qufoG,fyg/
Car IN Full L1
0.0 0.0
sensor
+
24V
Car OUT
0.1 1L
sensor S7-200 CPU224

Reset AC/DC/RLY
0.2
switch

24V
+ M

Input Terminal Output Terminal


Fig.7 PLC I/O devices connection diagram

CTUD (Car Parking Information)


I/O wiring ukd Fig.7 twkdif;qufoG,fyg/ Car IN eJY Car OUT wkdYu rawGY&if OFF
jzpfaewJY N.O sensor awGjzpfvkdY um;0ifvmwmukdawGY&if I0.0 u ON jzpfygw,f/
um;xGufoGm;wmukdawGY&if I0.1 u ON jzpfygw,f/ Reset switch ukd ON xm;&if car
parking information system ukd disable vkyfxm;rSmjzpfygw,f/
tcka&;r,fh Program u atmufygtwkdif;jzpfygw,f/
t0ifwpfayguf? txGufwpfayguf&SdwJY a[mfw,fwpfckrSm um;&yfp&mae&m 5-pD;
pmyJ &Sdygw,f/ Car IN sensor u N.O jzpfNyD; input terminal 0.0 eJY qufoG,fxm;yg
w,f/ Car OUT sensor uvnf; N.O jzpfNyD; input terminal 0.1 eJY qufoG,fxm;yg
w,f/ um;0ifvmwm 5-pD;jynfhoGm;wJYtcg um;&yfp&m ae&mr&SdawmhvkdY Parking Full
rD; L1 vif;vm&rSm jzpfygw,f/ um;wpfpD; jyefxGufoGm;vkdY um;&yfp&mae&mwpfck
vGwfoGm;&if Parking Full rD; jyefNidrf;oGm;&rSmjzpfygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 214 -
U Soe Tint Siemens PLC S7-200

um;wpfpD;0if&if Car IN sensor 1-cg ON NyD; CTUD u 1 digit count up vkyf&rSm


jzpfygw,f/ um;wpfpD;xGuf&if Car OUT sensor 1-cg ON NyD; CTUD u 1 digit count
down vkyf&rSmjzpfygw,f/ Current value u 5 jzpfoGm;awmhrS Parking Full L1 rD;vif;
&rSm jzpfygw,f/

jzpfapvkdwJY Relation Diagram ukd atmufrSm az:jyxm;ygw,f/


1 2 3 4 5
ON
IN ON ON ON ON ON
OFF

ON
OUT ON
OFF

ON
Full L1 ON
OFF

Program a&;&r,fh tajctaeeJYtcsdeftcgukd ,SOfwGJaz:jyxm;wJY Status Time


Diagram ukd atmufrSm az:jyxm;ygw,f/
Status Time Diagram

1 2 3 4 5
ON
I0.0 ON ON ON ON ON
OFF

ON
I0.1 ON
OFF

ON
Q0.0 ON
OFF

Program ukd a&;zkdY awG;wJYtcgrSm 5-cg qkdwJY tBudrfta&twGuf ygvmwJYtwGuf


Counter function ukd tokH;jyK&rSm jzpfygw,f/ Counter rSm CTU, CTD, CTUD okH;rsKd;
&Sdygw,f/ tck Project (17) ukd a&;wJYtcg CTUD ukd tokH;jyKygr,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 215 -
U Soe Tint Siemens PLC S7-200

Program ukd atmufygtwkdif; a&;&ygw,f/

I0.0 = ON 1-cg jzpf&if C0 u 1 digit count up vkyfNyD; current value u 1 jzpfoGm;


ygw,f/
I0.0 = ON 5-cg jzpf&if current value u 5 jzpfoGm;NyD; C0 u ON oGm;ygw,f/
'DtcsdefrSm I0.1 = ON 1-cg jzpf&if C0 u 1 digit count down vkyfNyD; current value
u 4 jzpfoGm;ygw,f/ C0 uvnf; OFF jyefjzpfoGm;ygw,f/
I0.2 = ON jzpf&if C0 ukd reset vkyfygw,f/ Current value u 0 jyefjzpfoGm;ygw,f/
C0 = ON jzpfoGm;&if Q0.0 u ON jzpfygw,f/
C0 = ON jzpfNyD;ae&ifvnf; count up input condition = true jzpfwkdif; CTUD u
count up qufvkyfygw,f/
C0 &JU current value = 0 jzpfae&ifvnf; count down input condition = true jzpfwkdif;
CTUD u count down vkyfygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 216 -
U Soe Tint Siemens PLC S7-200

t"dyg,f&Sif;vif;csuf

C0 u up/down counter &JU counter number jzpfygw,f/


CTUD u up/down counter &JU instruction code jzpfygw,f/
CU u up/down counter &JU count up input condition a&;&r,fh
ae&m jzpfygw,f/
CD u up/down counter &JU count down input condition a&;&r,fh
ae&m jzpfygw,f/

R u up/down counter &JU reset input condition a&;&r,fhae&m jzpfygw,f/


PV u up/down counter &JU preset value a&;&r,fhae&m jzpfygw,f/ PV wefzkd;ukd
trsm;qkH; 32767 txdom a&;vkdY&ygw,f/
CU (count up input condition) = true jzpf&if CTUD u 1 digit count up vkyfyg
w,f/
CD (count down input condition) = true jzpf&if CTUD u 1 digit count down vkyf
ygw,f/
R (reset input condition) = true jzpf&if CTUD ukd reset vkyfygw,f/ Current value
ukd 0 jzpfapygw,f/
Current value = PV jzpf&if CTUD u ON jzpfygw,f/
Current value > PV jzpf&ifvnf; CTUD u ON jzpfaeygw,f/
Current value < PV jzpf&if CTUD u OFF jzpfoGm;ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 217 -
U Soe Tint Siemens PLC S7-200

Status Time Diagram

IN
I0.0 1 2 3 4 5 6 7 8 9 10
OUT
I0.1 1 2 3 4
Reset
I0.2

7
6 6
5 5
4 4 4
C0 3 3 3
2 2
1

Q0.0
ON ON

I0.0 u car IN sensor (N.O) jzpfygw,f/ I0.1 u car OUT sensor (N.O) jzpfNyD; I0.2
u reset switch jzpfygw,f/ Q0.0 u Parking Full Lamp jzpfygw,f/
txufygykHrSm az:jyxm;wmu um; 5-pD; 0ifNyD;wJYtcg Q0.0 (Parking Full Lamp)
u ON jzpfoGm;ygw,f/
tJ'Daemuf um; 1-pD; xGufoGm;vkdY Q0.0 (Parking Full Lamp) u OFF jyefjzpfoGm;
ygw,f/ aemufxyf um; 2-pD; xGufoGm;NyD;rS um; 3-pD; jyef0ifvmwJYtcg Q0.0
(Parking Full Lamp) u jyef ON ygw,f/
um; 2-pD; xyf0ifvmNyD; 1-pD; xGufoGm;wJYtcsdefxd Q0.0 (Parking Full Lamp) u
ON aeygw,f/ 0ifvmwJYum; pkpkaygif;u 10-pD;? xGufoGm;wJYum;u 4-pD;omjzpfaevkdY
6-pD;u a[mfw,f0if;xJrSm &Sdaeygao;w,f/ 'gaMumifh Q0.0 (Parking Full Lamp) u
ON aewmjzpfygw,f/
Reset switch ukd switch ON vkyfvkdufawmhrS Q0.0 u OFF jzpfoGm;ygw,f/
C0 &JU current value u 5 eJY nD&if? 'grSr[kwf 5 xuf BuD;&if? C0 u ON jzpfyg
w,f/
C0 &JU current value u 5 xuf i,f&if C0 u OFF jzpfygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 218 -
U Soe Tint Siemens PLC S7-200

Project (18) TONR Retentive ON-Delay

Compressor wpfvkH;&JU vnfywfrI running hour ukd apmifhMunfhwkdif;wmNyD; owfrSwf


em&DjynfhwJYtcg alarm jrnfwJY program a&;NyD; TONR (Retentive ON-delay Timer)
taMumif;ukd &Sif;jyygr,f/
Program a&;w,fqkdwm owfrSwfxm;wJY ae&mwpfckukd a&mufatmifoGm;wmrsKd;eJY
wlnDygw,f/ tJ'Dae&mukd bmeJYoGm;rvJ? b,fvkdoGm;rvJ? tokH;jyKwJY,mOf? oGm;wJYvrf;
aMumif;u wrsKd;wnf;&Sdwmr[kwfvkdY wOD;eJYwOD; oGm;ykHoGm;enf;csif; wlMurSmr[kwfyg
bl;/ 'DvkdygyJ program ukd a&;wJYtcg okH;jyKwJY instruction code awG? awG;ykHawG;enf;?
a&;ykHa&;enf;awG wOD;eJYwOD; rwlMuygbl;/
Compressor wpfvkH;ukd em&Daygif; 10000 (10000 Hr) armif;NyD;&if Frame Oil qD
vJvS,f&r,fvkdY owfrSwfxm;cJY&if Running hour ukd wkdif;wJY program ukd TONR okH;NyD;
Timer eJY Counter ukd cascade vkyfa&;wJYenf;ukd az:jyrSmjzpfygw,f/
Program rSm tokH;jyKr,fh timer a&m counter yg retentive memory device awGjzpfzkdY
vkdtyfygw,f/ Retentive Timer, Retentive Counter jzpfatmif System Block xJu
Retentive Ranges ukd Default All vkyf&ygw,f/
System Block rSm Retentive Ranges ukd Default All vkyfvkduf&if T0 to T31 eJY T64
to T95 txd retentive timer awGjzpfoGm;ygw,f/ C0 to C255 uvnf; retentive counter
awGjzpfMuygw,f/
Retentive ON-delay Timer (TONR) twGuf? T0 eJY T64 u 1ms timer jzpfygw,f/
T1 to T4, T65 to T68 wkdYu 10ms timer rsm;jzpfMuygw,f/ T5 to T31, T69 to T95 wkdYu
100ms timer rsm;jzpfMuygw,f/
Compressor wpfvkH;ukd em&Daygif; 10000 (10000 Hr) armif;NyD;&if Frame Oil qD
vJvS,f&r,fvkdY owfrSwfxm;cJY&if Running hour ukd wkdif;wJY program ukd TONR okH;NyD;
atmufygtwkdif; Timer eJY Counter ukd cascade vkyfa&;&ygw,f/
Retentive ON-delay timer ukd okH;xm;wJYtwGuf aeYcif;buf tvkyfvkyfNyD; nae
tvkyfodrf;csdefrSm power supply ukd ydwfNyD;xm;cJY&ifvnf; TONR eJY CTU wkdYu retentive
memory awGjzpfaeMuvkdY power r&Sdvnf; current value ukd raysmufrysufyJ odrf;qnf;
xm;ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 219 -
U Soe Tint Siemens PLC S7-200

Retentive Timer, Retentive Counter jzpfatmif System Block xJu Retentive


Ranges ukd Default All vkyfr,fqkd&if?

1. ykHrSmjyxm;ovkd View Component System Block ukd click yg/

2. System Block Retentive Ranges Default All ukd click yg/


rSwfcsuf/ / Default qkdwmu puf&kH u owfrS wfay;vkdufwJY Factory Setting jzpfygw,f/
Retentive memory taMumif;ukd pmrsufESm (102) rSm Munfhyg/ TONR taMumif ;
ukd pmrsuf ESm (136) rS m Munfh yg/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 220 -
U Soe Tint Siemens PLC S7-200

Running Hour Monitor Program

Start P.B (N.O) Stop P.B (N.C) Compressor

Alarm output

PT eJY PV ukd trsm;qkH; 32767 txdom a&;vkdY&ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 221 -
U Soe Tint Siemens PLC S7-200

t"dyg,f&Sif;vif;csuf

Start P.B (N.O) Stop P.B (N.C) Compressor

PLC &JU input terminal 0.0 rSm qufxm;wJY Start pushbutton (N.O) ukd ESdyf&if Input
Image Memory I0.0 u ON jzpfygw,f/
PLC &JU input terminal 0.1 rSm qufxm;wJY Stop pushbutton (N.C) ukd ESdyf&if Input
Image Memory I0.1 u OFF jzpfygw,f/
I0.0 = ON jzpf&if a&;xm;wJY Program t& Q0.0 u ON jzpfoGm;NyD; I0.1 = OFF
jzpfrSom Q0.0 u OFF jyefjzpfygw,f/

T5 = ON jzpf&if a&;xm;wJY Program t& T5 ukd Reset vkyfygw,f/ Reset ukd 30


minutes timer TONR (T5) &JU txufrSma&;xm;wm jzpfwJYtwGuf T5 = ON jzpfNyD; next
scan a&mufrS T5 ukd reset vkyfygw,f/

Compressor

Q0.0 = ON jzpfaeorSsumvywfvkH; T5 u time counting vkyfygw,f/ Q0.0 = OFF


jzpfoGm;&if T5 u time counting rvkyfawmhyJ? vkyfNyD;om; current value ukd xdef;odrf;
xm;ygw,f/ pkpkaygif; current value = 18000 (1800s) jynfhawmhrS T5 u ON jzpfygw,f/
T5 = ON jzpfNyD; next scan rSm T5 u OFF jyefjzpfygw,f/ T5 = ON jzpfaewJY umv[m
1 scan cycle om Mumjrifhygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 222 -
U Soe Tint Siemens PLC S7-200

T5 1-cg ON &if C0 u 1 digit count up vkyfygw,f/ M0.0 = ON jzpfaewJY tcsdef


pkpkaygif; 18000 = 1800s = 30mins MumrS T5 1-cg ON ygw,f/ 'gaMumifh C0 &JU current
value = 1 digit u 30-rdepfeJY nDygw,f/ C0 &JU counted value (current value) u 20000
jynfhawmhrS C0 = ON jzpfygw,f/ C0 &JU current value 20000 u (20000 x 30min =
600000min = 10000Hr) em&Daygif; 10000 jzpfygw,f/

Alarm output
C0 = ON jzpfrS Q0.1 u ON ygw,f/ Compressor Run wm em&D 10000 jynfhwJY
tcg Alarm jrnfygw,f/ PLC &JU input terminal 0.2 rSm qufxm;wJY Reset pushbutton
(N.O) ukd ESdyf&if I0.2 u ON jzpfNyD; Alarm jrnfwm&yfoGm;ygw,f/
Timer &JU preset time PT eJY counter &JU preset value PV wkdYukd trsm;qkH; 32767 txd
om a&;vkdY&ygw,f/ 'gaMumifh T5 &JU PT ukd 1800s (18000 digits) = 30 minutes vkdY a&;
NyD;? C0 &JU PV ukd 20000 vkdY cGJa&;xm;wmjzpfygw,f/
Timer &JU preset time ukd Timer eJY Counter ukd pOfquf cascade vkyfNyD; tcsdef&Snf
MumwJY &ufawG? vawGukd rSwfom;apckdif;vkdY&ygw,f/
S7-200 CPU224 xJrSm jyu'def real time clock (RTC) yg&Sdygw,f/ RTC ukd
tcsdefwkdufcsif&if SET_RTC ukd okH;&ygw,f/ ESpf? v? &uf? em&D ukd &,ltokH;jyKcsif&if
READ_RTC ukd okH;&ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 223 -
U Soe Tint Siemens PLC S7-200

Running Hour Monitor Program ukd atmufrSmjyxm;ovkd ra&;&ygbl;/

Start P.B (N.O) Stop P.B (N.C) Compressor

Alarm output

Program ukd txufrSmjyxm;ovkd 30 minutes Timer (T5) ukd t&ifa&;NyD;? Timer


reset ukd olUatmufrSm a&;xm;cJY&if T5 = ON jzpfwmeJY T5 ukd csufcsif; reset vkyfypfyg
w,f/ 'gaMumifh T5 = ON jzpfwmukd C0 u rawGU&awmhygbl;/
PLC &JU vkyfaqmifykH Scan Cycle ukd aoaocsmcsm em;vnfxm;zkdYvkdtyfygw,f/

rSwfcsuf/ / PLC tvkyfvkyfykH Scan Cycle taMumif ;twkdcsKyf&Sif;vif;csufukd pmrsufESm (77) rS m


Munfhyg/ Scan Cycle taMumif;tao;pd yfukd PLC vrf;nTefpmtkyf ? pmrsuf ESm (180)
rSm az:jyxm;ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 224 -
U Soe Tint Siemens PLC S7-200

Project (19) Motor Forward_Reverse Control Program

Program a&;wJYtcg operand &JU wnfae&mukdnTefjywJY address a&;enf; 2-rsKd;&Sdyg


w,f/ Direct addressing eJY indirect addressing jzpfygw,f/ Indirect address ukd
symbolic address vkdYvnf; ac:ygw,f/
Direct addressing eJY a&;&if memory xJu bit ukd wkduf&kdufnTefjywmjzpfygw,f/

Indirect addressing eJY a&;&if xyfqifhnTefjywJYoauFw pointer ukd tokH;jyKNyD;


memory xJu bit ukd nTefjywmjzpfygw,f/ tJ'D pointer ukd Symbol Table xJu Symbol
qkdwJY pmwkdif column atmufrSm a&;&ygw,f/
Symbol Table xJu Address qkdwJY pmwkdif column atmufrSm a&;aeustwkdif;
direct address ukd a&;&ygw,f/

'D project ukd Symbolic Address ukdokH;NyD; a&;jyrSmjzpfygw,f/ Symbolic address ukd
Indirect addressing vkdYvnf; ac:ygw,f/ Indirect address ukd okH;&if address wpfckpD
twGuf processing time 22s ykdMumygw,f/
Symbolic address ukd okH;NyD;a&;EkdifwJY operand awGuawmh I, Q, V, M, S, T (current
value only), and C (current value only) wkdY jzpfMuygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 225 -
U Soe Tint Siemens PLC S7-200

Operand ukd Symbolic address eJY a&;csif&if Symbol Table ukd tokH;jyK&ygw,f/
1. STEP 7-Micro/WIN ukd zGifhyg/
2. View Component Symbol Table ukd click yg/

3. Symbol Table xJu Symbol pmwkdif atmufrSm FWD_Run vkdY a&;yg/ Address
pmwkdif atmufrSm Q0.1 vkdY a&;yg/ usefwmawGukd atmufygZ,m;twkdif;qufa&;yg/

4. Symbol Table ukd right click Apply Symbols to Project ukd click yg/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 226 -
U Soe Tint Siemens PLC S7-200

5. ukd click vkduf&if atmufrSmvkday:vmygw,f/

a&;wkH;u 'Dvkda&;xm;wmjzpfygw,f/

Options xJu Program Editor rSm Symbolic addressing ukd display symbol and
address vkdY a&G;cs,fxm;vkdY Symbolic address a&m Direct address yg 2-ckwGJay:vmwm
jzpfygw,f/
Symbolic address wpfrsKd;wnf;om az:jyapcsif&if Options xJu Program Editor
rSm Symbolic addressing ukd display symbol only vkdY a&G;cs,fxm;&ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 227 -
U Soe Tint Siemens PLC S7-200

Options xJu Program Editor rSm Symbolic addressing ukd display symbol and
address vkdY a&G;cs,fxm;csif&if

Tools Options ukd click vkdufNyD;

Program Editor Symbolic Addressing Display Symbol and Address ukd


a&G;NyD; OK ESdyfyg/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 228 -
U Soe Tint Siemens PLC S7-200

'DtcgrSm atmufygykHvkd ay:vmygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 229 -
U Soe Tint Siemens PLC S7-200

Options xJu Program Editor rSm Symbolic addressing ukd display symbol only ukd
a&G;cs,fxm;csif&if

Tools Options ukd click vkdufNyD;

Program Editor Symbolic Addressing Display Symbol Only ukd a&G;NyD; OK


ESdyfyg/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 230 -
U Soe Tint Siemens PLC S7-200

'DtcgrSm atmufygykHvkd ay:vmygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 231 -
U Soe Tint Siemens PLC S7-200

View Symbolic Addressing ukd click vkyfrxm;&if atmufygykHvkd ay:vmyg


w,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 232 -
U Soe Tint Siemens PLC S7-200

Direct Address eJY Indirect Address ukd ajymif;Munfhcsif&if View Symbolic


Addressing ukd Check or Uncheck vkyf&ygw,f/

ykHygtwkdif; Symbolic Addressing ukd check


vkyfxm;&if indirect address tjzpfatmufygykHvkd ay:vmygw,f/

Symbolic AddresseJY a&;xm;&if program ukd zwfNyD; vkyfaqmifcsufawGukd


em;vnfatmifvkyf&wm operator twGuf ykdrkdvG,fulapygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 233 -
U Soe Tint Siemens PLC S7-200

Direct Address eJY Indirect Address ukd ajymif;Munfhcsif&if View Symbolic


Addressing ukd Check or Uncheck vkyf&ygw,f/

ykHygtwkdif; Symbolic Addressing ukd


uncheck vkyfxm;&if direct address tjzpfatmufygykHvkd ay:vmygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 234 -
U Soe Tint Siemens PLC S7-200

Input device awG t jzpf


Start_FWD (Forward run) push button u (ESdyfrS ON jzpfwJY) N.O jzpfNyD; Input
terminal 0.0 wGif qufoG,fxm;ygw,f/ Start_REV (Reverse run) push button uvnf;
(ESdyfrS ON wJY) N.O jzpfNyD; Input terminal 0.2 wGif qufoG,fxm;ygw,f/ Stop_Motor
pushbutton u (ESdyfrS OFF jzpfwJY) N.C jzpfNyD; Input terminal 0.1 wGif qufoG,fxm;yg
w,f/ Motor_Stop sensor uvnf; (Motor &yfrS ON jzpfwJY) Proximity Sensor (N.C)
jzpfNyD; Input terminal 0.4 wGif qufoG,fxm;ygw,f/

Output device awG t jzpf


Motor ukd forward vnfckdif;wJY MC1 ukd Output terminal 0.1 wGif qufoG,fwwf
qifxm;ygw,f/
Motor ukd reverse vnfckdif;wJY MC2 ukd Output terminal 0.2 wGif qufoG,fxm;yg
w,f/
Motor stop sensor xnfhrxm;&if FWD_Run Q0.1 = ON aepOfwGif Stop_Motor
ESdyfNyD;&if NyD;csif; Start_REV P.B ukd ESdyfvkdufr,fqkd&if motor r&yfcifrSm csufcsif;?
ajymif;jyefvnfapwJY twGuf Motor Overload jzpfoGm;ygw,f/
tck program rSmawmh motor vkH;0&yfrSom run vkdY &wJYtwGuf safe jzpfygw,f/
vufawGUtokH;jyKMuwJYtcgrSm Program interlock tjyif? Mechanical interlock ukdyg
wGJzuf tokH;jyKavY&Sdygw,f/
Mechanical interlock qkdwmu magnetic contactor MC1 eJY magnetic contactor
MC2 ukd NydKifwlruyfEkdifatmif? NydKifwl energize rjzpfEkdifatmif? interlocking bar xnfh
oGif;wwfqifxm;wJh MC pkHwGJukd tokH;jyKwmjzpfygw,f/ Mechanical interlock ygwJY
magnetic contactor (MC) pkHwGJukd twGJvkduf0,f,ltokH;jyK&ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 235 -
U Soe Tint Siemens PLC S7-200

t"dyg,f&Sif;vif;csuf
Motor Forward Start / Stop

Start FWD Stop Motor REV Run Motor Stop FWD Run

FWD Run
Start_FWD P.B (N.O) ukd ESdyfwJYtcsdefrSm Stop_Motor P.B (N.C) ukd rESdyfwJYtwGuf
I0.1 u ON jzpfaeygw,f/ Motor_Stop sensor (N.C) uvnf; armfwmrvnfao;wJY
twGuf I0.4 u ON jzpfaeygw,f/ armfwmrvnfao;wJYtwGuf REV_Run (Q0.2)
uvnf; OFF jzpfaeygw,f/
'gaMumifh Start_FWD P.B ukd ESdyfvkduf&if AND vkyfxm;wJY condition 4-ck pvkH;
True jzpfNyD; FWD_Run (Q0.1 = ON) jzpfoGm;ygw,f/ Next scan a&mufawmh OR
vkyfxm;wJY I0.0 a&m Q0.1 yg ON jzpfygw,f/ I0.0 = OFF jzpfoGm;wJY tcsdefrSm
FWD_Run (Q0.1) u ON NyD;om;jzpfaewJY twGuf Q0.1 u qufNyD; ON aewmjzpfyg
w,f/
REV_Run (Q0.2) u ON t&ifjzpfae&if FWD_Run (Q0.1) ukd ON vkdYr&ygbl;/

Motor Reverse Start / Stop

Start REV Stop Motor FWD Run Motor Stop REV Run

REV Run
Start_REV P.B (N.O) ukd ESdyfwJYtcsdefrSm Stop_Motor P.B (N.C) ukd rESdyfwJYtwGuf
I0.1 u ON jzpfaeygw,f/ Motor_Stop sensor (N.C) uvnf; armfwmrvnfao;
wJYtwGuf I0.4 u ON jzpfaeygw,f/ armfwmrvnfao;wJYtwGuf FWD_Run (Q0.1)
uvnf; OFF jzpfaeygw,f/
'gaMumifh Start_REV P.B ukd ESdyfvkduf&if AND vkyfxm;wJY condition 4-ck pvkH;
True jzpfNyD; REV_Run (Q0.2) u ON jzpfoGm;ygw,f/ Next scan a&mufawmh OR
vkyfxm;wJY I0.2 a&m Q0.2 yg ON jzpfygw,f/ I0.2 = OFF jzpfoGm;wJY tcsdefrSm
REV_Run (Q0.2) u ON jzpfaewJY twGuf Q0.2 u qufNyD; ON aewmjzpfygw,f/
FWD_Run (Q0.1) u ON t&ifjzpfae&if REV_Run (Q0.2) ukd ON vkdYr&ygbl;/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 236 -
U Soe Tint Siemens PLC S7-200

Project (20) Motor Sequence Run Program

'D project &JU &nf&G,fcsufu Oil Pump vnfNyD;rSom Main Compressor ukd vnfvkdY
&apcsifwmjzpfygw,f/

A
Motor_A (Oil Pump) run NyD;rSom
Oil Pump Motor

Main Compressor
Motor_B (Main Compressor) ukd
run vkdY &atmif program a&;&rSmjzpfygw,f/

Hardware Configuration
Motor_A ukd drive vkyfwJY magnetic contactor MC1 ukd PLC &JU output terminal 0.1
wGif qufoG,fxm;NyD;? Motor_B ukd drive vkyfwJY magnetic contactor MC2 ukd PLC &JU
output terminal 0.2 wGif qufoG,fxm;ygw,f/

Motor_A twGuf Start pushbutton (A_1) u (ESdyf&if ON wJY) N.O jzpfNyD;? PLC &JU
input terminal 0.0 wGifqufoG,fxm;ygw,f/ Motor_A twGuf Stop P.B (A_0) uawmh
(ESdyfrS OFF wJY) N.C jzpfNyD;? PLC &JU input terminal 0.1 wGifqufoG,fxm;ygw,f/

Motor_B twGuf Start pushbutton (B_1) u (ESdyf&if ON wJY) N.O jzpfNyD;? PLC &JU
input terminal 0.2 wGifqufoG,fxm;ygw,f/ Motor_B twGuf Stop P.B (B_0) uawmh
(ESdyfrS OFF wJY) N.C jzpfNyD;? PLC &JU input terminal 0.3 wGifqufoG,fxm;ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 237 -
U Soe Tint Siemens PLC S7-200

Program Creation

Symbolic addressing ukd tokH;jyKNyD; program ukd a&;rSmjzpfwJYtwGuf Symbol


Table ukd t&ifwnfaqmuf&ygw,f/
View Component Symbol Table ukd zGifhyg/ Symbol Table wGif atmufyg
twkdif; a&;yg/

Program Comments ae&mwGif 2 Motors in sequence RUN


vkdY a&;NyD; Network Title ae&mwGif Lubricating Pump vkdY a&;yg/ Network Comment
wGif Oil Pump Motor vkdY a&;yg/
Network 1 rSm Program ukd atmufygtwkdif;a&;yg/

txufygtwkdif; a&;vkdufwJYtcg I0.0 u A_1, I0.1 u A_0, Q0.1 u Motor_A


toD;oD; jzpfoGm;ygw,f/ Symbol, Address eJY Comment awGvnf; atmufrSmaz:jyxm;
ovkd ay:vmygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 238 -
U Soe Tint Siemens PLC S7-200

Network 2 rSm Program ukd atmufygtwkdif;a&;yg/

txufygtwkdif; a&;vkdufwJYtcg atmufrSmaz:jyxm;ovkd jzpfoGm;ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 239 -
U Soe Tint Siemens PLC S7-200

t"dyg,f&Sif;vif;csuf

'D program rSm Instruction pmaMumif;ESpfaMumif;yg&Sdygw,f/ yxrpmaMumif;u


Motor_A ukd Start/Stop vkyfckdif;wmjzpfygw,f/
'kwd,pmaMumif;u Motor_B ukd Start/Stop vkyfckdif;wmjzpfygw,f/ tJ'DrSmygwJY

u Motor_A vnfae&r,fvkdY condition owfrSwfxm;wJYtwGuf Motor_A


rvnf&ao;&if Motor_B ukd vnfvkdYr&atmif wm;jrpfxm;ygw,f/
Motor_A (Oil pump) &yfoGm;&if Motor_B (Compressor) yg &yfoGm;ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 240 -
U Soe Tint Siemens PLC S7-200

Project (21) Auto_Manual Draining Process

puf&kHawGu pGefYxkwfwJYa&qkd;awGukd ajrmif;eJYoG,fNyD; pit xJrSm pkxm;&ygw,f/


pHowfrSwfcsufeJYnDatmif oefYpifrI treatment vkyfNyD;awmhrS jrpfxJ? acsmif;xJukd pGefYxkwf
&ygw,f/
tck project u waste water treatment vkyfNyD;om; pit xJua&ukd pump eJY pkyfxkwf
zkdY jzpfygw,f/
Pump Low High
Running Level Level

SYSTEM
ON/OFF High level sensor

MAN/AUTO
Low level sensor

MAN qkd&if I0.1 = ON


AUTO qkd&if I0.2 = ON

Pump Motor

Project wpfck vkyfawmhr,fqkd&if I/O devices awGukd t&ifa&G;cs,fNyD; PLC &JU


b,f terminal awGeJY qufoG,f&r,fqkdwmukd t&ifowfrSwf&ygw,f/ tck project
rSmu awmh Input device 4-ck eJY Output device 4-ck yg0ifygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 241 -
U Soe Tint Siemens PLC S7-200

Input Devices
1. System ON_OFF switch ukd Input terminal 0.0 eJY qufxm;ygw,f/
2. Manual_Automatic switch ukd Input terminal 0.1 for MAN, 0.2 for AUTO eJY
qufxm;NyD; MAN qkd&if I0.1 = ON ygw,f/ AUTO qkd&if I0.2 = ON ygw,f/
3. Low Level Sensor (N.O) ukd Input terminal 0.3 eJY qufxm;ygw,f/
4. High Level Sensor (N.C) ukd Input terminal 0.4 eJY qufxm;ygw,f/

Output Devices
1. Pump Running Lamp (Green) ukd Output terminal 0.0 eJY qufxm;ygw,f/
2. Low Level Lamp (Red) ukd Output terminal 0.1 eJY
qufxm;ygw,f/
3. High Level Lamp (Yellow) ukd Output terminal 0.2 eJY qufxm;ygw,f/
4. Pump Motor (MC1) ukd Output terminal 0.3 eJY qufxm;ygw,f/

Program a&;wJYtcg Alarm awGukd yxr a&;&ygw,f/ NyD;rS Manual Operation ukd
'kwd, a&;&ygw,f/ Automatic Operation ukd wwd, a&;&ygw,f/ 'Dvkda&;wJY tcg
Internal Memory ukd okH;NyD; a&;&ygw,f/ aemufqkH;rS Output xkwf&ygw,f/ 'Dvkdenf;eJY
a&;xm;&if program ukd tjypf&SmjyKjyif&wm debugging vkyfwJYtcg vG,fulygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 242 -
U Soe Tint Siemens PLC S7-200

Alarm Operation
1. Pit xJu waste water level = low jzpf&if Low level lamp (Red Lamp) u ON
jzpfygw,f/
2. PitxJu waste water level = high jzpf&if High level lamp (Yellow Lamp) u
ON jzpfygw,f/

Level low jzpf&if Low level sensor (I0.0) u OFF jzpfygw,f/


Level high jzpf&if High level sensor (I0.1) u OFF jzpfygw,f/
Symbolic Addressing eJY a&;&if atmufygtwkdif; awGY&ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 243 -
U Soe Tint Siemens PLC S7-200

Manual Operation
1. Manual_Automatic switch ukd MAN rSmxm;yg/ I0.1 = ON jzpfygw,f/
2. System ON/OFF switch ukd ON vkduf&if I0.0 u ON jzpfNyD; Pump Motor vnfyg
w,f/
3. System ON/OFF switch ukd OFF vkduf&if I0.0 u OFF jzpfNyD; Pump Motor vnf
ygw,f/

Manual_Automatic switch ukd MAN rSmxm;wJYtcg operator u level &JU tajc


taeukd *&kjyKMunfh&INyD; Pump ukd armif;&wmjzpfygw,f/

Symbolic Addressing eJY a&;&if atmufygtwkdif; awGY&ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 244 -
U Soe Tint Siemens PLC S7-200

Automatic Operation
1. Manual_Automatic switch ukd AUTO rSm xm;yg/ I0.2 = ON jzpfygw,f/
2. Pit xJu waste water level = low jzpf&if Low level sensor u I0.3 ukd OFF jzpf
apNyD; Pump Motor vnfygw,f/
3. Pit xJu waste water level = high jzpf&if High level sensor u I0.4 ukd OFF jzpf
apNyD; vnfaewJY Pump Motor &yfoGm;ygw,f/

Manual_Automatic switch ukd AUTO rSmxm;wJYtcg level sensor awGu level &JU
tajctaeukd *&kjyKMunfh&Ippfaq;NyD; Pump ukd armif;wmjzpfygw,f/

Symbolic Addressing eJY a&;&if atmufygtwkdif; awGY&ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 245 -
U Soe Tint Siemens PLC S7-200

Output

MAN (Manual mode) rSmxm;&if M0.3 u armfwmukd ON/OFF vkyfygw,f/


AUTO (Automatic mode) rSm xm;&if M0.4 u armfwmukd ON/OFF vkyfygw,f/

Symbolic Addressing eJY a&;&if atmufygtwkdif; awGY&ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 246 -
U Soe Tint Siemens PLC S7-200

Auto_Manual Draining Program tjynf h t pk H r S m

The more you learn about PLCs, the more you will be able to solve other control problems.
- 247 -
U Soe Tint Siemens PLC S7-200

Project (22) Continuous Filling System

Inlet Valve
Q0.5

Red
Run
High Level Q0.2
Sensor I0.5
(N.C) Green
Stand-by
Q0.3
Low Level
Sensor I0.4
(N.O) Blue
Full
Q0.4
Full sensor
Solenoid I0.3 (N.C)
Valve
Q0.1

Bucket

Bucket
Sensor
I0.2 (N.O)

Conveyor
Motor
Q0.0

Start P.B (N.O) I0.0


Stop P.B (N.C) I0.1

Push button awGeJY sensor awGtm;vkH;twGuf N.O/N.C ukd Fail-Safe jzpfatmif


a&G;cs,f tokH;jyKxm;ygw,f/

(rSwfcsuf/ / Fail Safe taMumif;ukd PLC vrf;nT efpmtkyf? pmrsufESm (102) rS maz:jyxm;ygw,f/)

The more you learn about PLCs, the more you will be able to solve other control problems.
- 248 -
U Soe Tint Siemens PLC S7-200

Project wpfckukd pwifa&;awmhr,fqkd&if I/O Table u pwif&ygw,f/ Input


terminal eJY qufoG,f&r,fh Sensor trsKd;tpm;awG? Output terminal eJY qufoG,f&r,fh
Actuator trsKd;tpm;awG? tJ'gawGukd t&ifqkH;a&G;cs,fowfrSwfay;&ygw,f/ b,f
Sensor eJY b,f Input Terminal ukd qufr,f? b,f Actuator eJY b,f Output Terminal
ukd qufr,fvkdY owfrSwfaz:jyxm;wJY Z,m;ukd I/O Table vkdY ac:wmjzpfygw,f/
I/O Table
Sensor Type Input Terminal
Start P.B (N.O) I0.0
Stop P.B (N.C) I0.1
Bucket Found sensor (N.O) I0.2
Bucket Full sensor (N.C) I0.3
Hopper Level Low sensor (N.O) I0.4
Hopper Level High sensor (N.C) I0.5

Actuator Type Output Terminal


Conveyor Motor (MC1) Q0.0
Solenoid Valve (SV1) Q0.1
Run Lamp (Red) Q0.2
Standby Lamp (Green) Q0.3
Full Lamp (Blue) Q0.4
Inlet Valve (SV2) Q0.5

tcka&;r,fh project &JU vkyfaqmifykHrSm atmufygtwkdif;jzpfygw,f/


Start P.B (N.O) ukd ESdyfvkduf&if tvkdtavsmufqufwkdufjznfhwJYpepf Automatic
Continuous Filling System u pwiftvkyfvkyfygw,f/
Zvm; Hopper xJrSm yJ? ajymif;? *sKH? pyg;? tp&SdwJY grains awG tjynfh&Sdae&if High
level switch u high jzpfaMumif;odNyD; Run rD;vif;ygw,f/
Hopper xJrSm grains eJoGm;&if Low level switch u low jzpfaMumif;odNyD; Stand-by
rD;vif;ygw,f/ Hopper xJrSm grains eJoGm;&if Inlet Valve yGifhNyD; hopper xJukd grains
xyfjznfhygw,f/ Grains level high jzpfwJYtcg Inlet Valve jyefydwfoGm;ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 249 -
U Soe Tint Siemens PLC S7-200

1. Start P.B (N.O) ukd ESdyfvkduf&if tvkdtavsmufqufwkdufjznfhwJYpepf Automatic


Continuous Filling System u pwiftvkyfvkyfygw,f/
2. Hopper xJrSm grains tjynfh&Sdae&if Run rD;vif;NyD; conveyor vnfygw,f/
3. Conveyor motor vnfvkdY Hopper atmufwnfhwnfh cHcGuf bucket a&muf&Sdvm
wmukd Photo switch u awGYwJhtcg motor &yfoGm;ygw,f/
4. Motor &yfoGm;awmh Solenoid valve yGifhNyD; bucket xJukd grains awGjznfhygw,f/
5. Bucket xJrSm grains level jynfhvm&if Full level switch u odNyD; Solenoid valve
jyefydwfoGm;ygw,f/
6. Solenoid valve jyefydwfoGm;rS motor jyefvnfNyD; bucket aemufwpfck a&GUvmyg
w,f/
7. Hopper xJrSm grains awG&Sdaeao;&if Step 3 to Step 6 ukd qufvkyfygw,f/
8. Hopper xJu grains level low jzpfoGm;vkdY jyefjznfhaewJYtcsdefrSm Stand-by rD;
vif;NyD; Solenoid valve vnf;ydwf? Motor vnf;&yfaeygw,f/
9. Hopper xJu grains level high jzpfoGm;&if Step 2 ukd jyefvkyfygw,f/
10. Stop P.B (N.C) ukd ESdyfawmhrS motor &yfoGm;NyD; Automatic Continuous Filling
System yg &yfqkdif;oGm;ygw,f/
Program rSm atmufygtwkdif;jzpfygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 250 -
U Soe Tint Siemens PLC S7-200

The more you learn about PLCs, the more you will be able to solve other control problems.
- 251 -
U Soe Tint Siemens PLC S7-200

t"dyg,f&Sif;vif;csuf
Program ukd zwf&I&wm vG,fulatmif Symbolic address eJYa&;xm;ygw,f/
a&;ykHa&;enf;? awG;ykHawG;enf; uawmh wOD;eJYwOD; wlMurSmr[kwfygbl;/
tajccHtm;jzifh 'Dvkda&;vkdY&w,fqkdwmukdom jyovkd&if;jzpfygw,f/

System Start/Stop ukd Start_PB u N.O jzpfNyD; Input Terminal 0.0 rSmqufxm;yg
w,f/ Stop_PB u N.C jzpfNyD; Input Terminal 0.1 rSmqufxm;ygw,f/ Ready u
internal memory bit M0.0 jzpfygw,f/
Start_PBukd ESdyfwJYtcsdefrSm Stop_PB ukd rESdyfwJYtwGuf Ready bit (M0.0) u ON
jzpfoGm;ygw,f/

Ready bit (M0.0) = ON jzpfaeNyD; Standby_Lamp bit (Q0.3) u OFF jzpfcJY&if


Run_Lamp (Q0.2) u ON ygw,f/ Hopper xJrSm grains awG&Sdae&if Standby_Lamp bit
(Q0.3) u OFF jzpfaeygw,f/ Hopper xJrSm grains awGavsmhoGm;vkdY Low_Sensor (I0.4)
= OFF jzpfoGm;&if Standby_Lamp bit (Q0.3) u ON jzpfoGm;ygw,f/
Standby_Lamp (Q0.3) = ON wJYtcg Run_Lamp (Q0.2) u Nidrf;oGm;rSm jzpfygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 252 -
U Soe Tint Siemens PLC S7-200

Run_Lamp (Q0.2) = ON, Full_Sensor (I0.3) = ON, Bucket_Found (I0.2) = ON,


Motor (Q0.0) = OFF, Standby_Lamp (Q0.3) = OFF jzpf&if Valve bit (Q0.1) u ON
jzpfoGm;ygw,f/
Symbol letter awGeJYoufqkdifwJY memory bit awGukd Symbol Table rSmaz:jyxm;yg
w,f/
Program ukd zwfwJYtcg N.O/N.C ukd xnfhoGif;pOf;pm;&ygw,f/ Full_Sensor u
N.C jzpfwJYtwGuf Bucket full rjzpf&if I0.3 = ON jzpfaeygw,f/ Bucket full jzpfoGm;
awmhrS I0.3 = OFF jzpfygw,f/

Motor (Q0.0) = ON jzpfzkdYtwGuf Run_Lamp (Q0.2) = ON, Valve (Q0.1) = OFF,


Run_Lamp (Q0.2) = ON wkdYtoD;oD;jzpfaeMuNyD; Bucket_Found (I0.2) okdYr[kwf
Full_Sensor (I0.3) wckck OFF jzpfae&ygr,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 253 -
U Soe Tint Siemens PLC S7-200

Run_Lamp (Q0.2) = ON, Full_Sensor (I0.3) = OFF jzpf&if Bucket_Full_Lamp


(Q0.4) u ON jzpfygw,f/

Ready (M0.0) = ON, Low_Sensor (I0.4) = OFF, High_Sensor (I0.5) = OFF jzpf&if
Inlet bit (Q0.5) u ON NyD; self-hold jzpfoGm;ygw,f/
Inlet bit (Q0.5) = ON jzpfNyD;rS Standby_Lamp bit (Q0.3) = ON ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 254 -
U Soe Tint Siemens PLC S7-200

Project (23) Fire Water Tank Level Alarm System



LSHH (Level Switch for High High)

LSH (Level Switch for High)

LSL (Level Switch for Low)

LSLL (Level Switch for Low Low)

'D Project rSm Level switch for high high (LSHH) ukd fail-safe jzpfatmif N.O ukd
okH;rvm;? N.C ukd okH;rvm;? a&G;cs,fwJYtcg Process tay:rlwnfNyD; pOf;pm;&ygw,f/
puf&kHBuD;awGrSmqkd&if Process Engineer eJY nSdEIdif;NyD;rS qkH;jzwf&ygw,f/ Process fail jzpf
wJYtcg Safe condition ukd Process Engineer u wm0ef,lowfrSwfay;&ygw,f/
tck Project u Fire water tank xJrSma&tjynfh&SdaezkdYvkdtyfwJYtwGuf water level
ukd alarm system u apmifhMunfhaeNyD; tvkdtavsmuftcsufjywJYpepf fire water level
alarm system jzpfygw,f/
Fail-safe twGufpOf;pm;r,fqkd&if Fire Water jzpfwJYtwGuf a&tNrJ jynfhae&rSmjzpf
ygw,f/
Fail-Safe jzpfatmif sensor awG&JU N.O/N.C ukd 'Dvkd pOf;pm;a&G;cs,fygw,f/
1. a& level tedrfhqkH;ukd ppfaq;apmifhMunfhwJY sensor (float switch) LSLL ukd
N.O vkdY owfrSwfNyD; Program ukd a&;xm;rSom a& level teJqkH;jzpfoGm;vkdY
LSLL u OFF signal ukd xkwfay;wJYtcg level low low jzpfwmukd PLC u
odNyD; heavy warning ay;ygvdrfhr,f/ wu,fvkdY tJ'D LSLL eJY PLC ukd quf
oG,fxm;wJY 0g,mBudK; jywfoGm;&ifvnf; OFF signal ukd PLC u &&SdNyD;? a&
level teJqkH;jzpfaeNyDvkdY PLC u rSm;odwJYtcg heavy warning ay;ygvdrfhr,f/
'DtcgrSm BuKd;jywfwmukd csufcsif;odNyD; jyKjyifEkdifygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 255 -
U Soe Tint Siemens PLC S7-200

2. a& level eJwmukd ppfaq;apmifhMunfhwJY sensor (float switch) LSL ukd N.O vkdY
owfrSwfNyD; Program ukd a&;xm;rSom a& level eJoGm;vkdY LSL u OFF signal
ukd xkwfay;wJYtcg PLC u level low jzpfwmukdodNyD; level low alarm ay;yg
vdrfhr,f/ wu,fvkdY tJ'D LSL eJY PLC ukd qufoG,fxm;wJY 0g,mBudK; jywf
oGm;&ifvnf; OFF signal ukd PLC u &&SdNyD;? a& level eJaeNyDvkdY PLC u
rSm;odwJYtcg level low alarm ay;ygvdrfhr,f/ 'DtcgrSm BuKd;jywfwmukd
csufcsif;odNyD; jyKjyifEkdifygw,f/
3. a& level rsm;wmukd ppfaq;apmifhMunfhwJY sensor (float switch) LSH ukd N.C
vkdY owfrSwfNyD; Program ukd a&;xm;rSom a& level rsm;oGm;vkdY LSH u OFF
signal ukd xkwfay;wJYtcg level high jzpfwmukd PLC uodNyD; level high alarm
ay;ygvdrfhr,f/ wu,fvkdY tJ'D LSL eJY PLC ukd qufoG,fxm;wJY 0g,mBudK;
jywfoGm;&ifvnf; OFF signal ukd PLC u&&SdNyD;? a& level rsm; aeNyDvkdY PLC u
rSm;odwJYtcg level low alarm ay;ygvdrfhr,f/ 'DtcgrSm BuKd;jywfwmukd
csufcsif;odNyD; jyKjyifEkdifygw,f/
4. a& level tjrifhqkH;ukd ppfaq;apmifhMunfhwJY sensor (float switch) LSHH ukd
N.C vkdY owfrSwfNyD; Program ukd a&;xm;rSom a& level trsm;qkH;jzpfoGm;vkdY
LSHH u OFF signal ukd xkwfay;wJYtcg level high high jzpfwmukd PLC u
odNyD; level high high alarm ay;ygvdrfhr,f/ wu,fvkdY tJ'D LSHH eJY PLC ukd
qufoG,fxm;wJY 0g,mBudK; jywfoGm;&ifvnf; OFF signal ukd PLC u &&SdNyD;?
a& level rsm;vGef;aeNyDvkdY PLC u rSm;odwJYtcg level high high alarm ay;yg
vdrfhr,f/ 'DtcgrSm BuKd;jywfwmukd csufcsif;odNyD; jyKjyifEkdifygw,f/
'Dvkdr[kwfygyJeJY LSL eJY LSLL wkdYukd N.O rokH;yJ N.C okH;r,fqkd&if a& level eJwJh
tcg LSL eJY LSLL wkdYu ON signal ukd xkwfay;rSmjzpfygw,f/ a& level ykHrSefqkd&if
LSL, LSLL wkdY u OFF signal ukd xkwfay;ygvdrfhr,f/ tJ'Dawmh LSL, LSLL wkdYeJY PLC
ukd qufoG,fxm;wJY 0g,mBudK; jywfoGm;&if PLC u OFF signal ukd tNrJ&&SdaeawmhrSm
jzpfygw,f/ 'Dtcg a& level ykHrSefjzpfaew,fvkdY PLC u rSm;odaeygvdrfhr,f/ a& level
ykHrSefjzpfae&ifvnf; OFF signal ukdxkwfay;ygw,f/ BudK;jywf&ifvnf; OFF signal ukd
xkwfay;yg w,f/ 'Dvkd wlnDwJY signal ukdxkwfay;wJYtwGuf BudK;jywfwmukdvnf;
rodEkdifyg/ BudK;jywfaewJYtcgrSm a& level eJoGm;vkdY LSL, LSLL wkdYu ON signal
xkwfay;ayr,fhvnf; BudK;jywfaewJYtwGuf PLC u OFF signal ukdom &&SdaerSmjzpfNyD;
a& level ykHrSef&Sdw,fvkdYom PLC u odaewmjzpfvkdY bm alarm bm warning rS PLC u
xkwfay;rSmr[kwfygbl;/
xkdYtwl LSH eJY LSHH wkdYukd N.C rokH;yJ N.O ukd okH;cJYr,fqkd&if BuKd;jywfwm eJY
a&rsm;wmukd cGJjcm;rodEkdifyg/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 256 -
U Soe Tint Siemens PLC S7-200

'gaMumifh Industrial Alarm System awG[m Open-to-Alarm ukd okH;avh&Sdygw,f/


Open to Alarm qkdwmu signal wire open jzpf&ifvnf; alarm jrnfr,f/ Alarm condition
jzpf&ifvnf; OFF signal xkwfay;atmif N.O/N.C ukd a&G;cs,fwwfqifxm;wm jzpfvkdY
alarm jrnfygw,f/
Water level low eJY water level high jzpf&if buzzer jrnfNyD; alarm ay;ygw,f/ Water
level low low eJY water level high high jzpf&if bell (or) horn jrnfNyD; alarm ay;ygw,f/
Buzzer jrnf&if warning jzpfNyD;? Bell (or) Horn jrnf&if serious (or) heavy alarm jzpfyg
w,f/

Program ukd ra&;cif I/O List ukd atmufygtwkdif; t&ifowfrSwf&ygw,f/


Float switch for level low low u N.O jzpfNyD; input terminal 0.0 eJY qufoG,fxm;
ygw,f/ (LSLL = I0.0)
Float switch for level low uvnf; N.O jzpfNyD; input terminal 0.1 eJY qufoG,f
xm;ygw,f/ (LSL = I0.1)
Float switch for level high u N.C jzpfNyD; input terminal 0.2 eJY qufoG,fxm;
ygw,f/ (LSH = I0.2)
Float switch for level high high u N.C jzpfNyD; input terminal 0.3 eJY qufoG,f
xm;ygw,f/ (LSHH = I0.3)
Acknowledgement pushbutton (ACKG) u N.O jzpfNyD; input terminal 0.4 rSm quf
oG,fxm;ygw,f/ (ACKG = I0.4)
Lamp test pushbutton (LT) uvnf; N.O jzpfNyD; input terminal 0.5 rSm qufoG,f
xm;ygw,f/ (LT = I0.5)
Buzzer ukd output terminal 0.0 eJY qufoG,fxm;NyD;? Bell ukd output terminal 0.1 eJY
qufoG,fxm;ygw,f/ (Buzzer = Q0.0, Bell = Q0.1)
Low low level lamp ukd output terminal 0.2 eJY qufoG,fxm;ygw,f/ (Extreme
Low = Q0.2)
Low level lamp ukd output terminal 0.3 eJY qufoG,fxm;ygw,f/ (Low = Q0.3)
High level lamp ukd output terminal 0.4 eJY qufoG,fxm;ygw,f/ (High = Q0.4)
High high level lamp ukd output terminal 0.5 eJY qufoG,fxm;ygw,f/ (Extreme
High = Q0.5)
Alarm condition jzpfay:vm&if oufqkdif&m Lamp awGu vif;vkduf?rSdwfvkduf?
flashing jzpfaeNyD;? ACKG ukd ESdyfvkdufwJYtcg tNrJvif;usefaecJYygw,f/ Alarm
condition r[kwfawmhrS Nidrf;oGm;ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 257 -
U Soe Tint Siemens PLC S7-200

Annunciator Lamps
2 Lamps in each annunciator

Test P.B Acknowledge P.B

Annunciator wpfuGufpDrSm rD;vkH; 2-vkH;pD wwfqifxm;ygw,f/ rD;vkH; 2-vkH; pvkH;


NyKdifwluRrf;zkdY jzpfcJygw,f/ rD;vkH;uGsrf;aevkdY b,f Alarm vmvkdY vmrSef;rod? rjzpf&
atmif rD;vkH;uGuf Annunciator wpfuGufwkdif;pDrSm rD;oD; 2-vkH; wwfqifxm;wmjzpfyg
w,f/ 'Dvkd pDrHxm;wmukd Redundancy vkdY ac:ygw,f/
rD;vkH; uRrf;? ruRrf;? od&atmif? Buzzer, Horn toH jrnf? rjrnf? od&atmif Test
button wwfqifay;xm;ygw,f/
Test ukd ESdyfvkduf&if ESdyfxm;wJY tckduftwHhrSm Lamp tm;vkH; rD;vif;NyD; Buzzer
toHjrnfygw,f/
Test ukd ESdyfxm;wmukd jyefvTwfvkduf&if Lamp rD;Nidrf;NyD; Buzzer jrnfwmvnf;
&yfoGm;ygw,f/
Alarm condition jzpfwJYtcg Lamp u vif;vkduf? rSdwfvkdufeJY flashing jzpfaeNyD;?
Buzzer jrnfygw,f/
ACKG ukd ESdyfvkduf&if Buzzer jrnfoHwdwfNyD;? flashing jzpfaewJY Lamp u rD;vif;
usefcJYygw,f/
Alarm condition r[kwfawmhrS vif;aewJY Lamp u olYtvkdvkd rD;jyefNidrf;oGm;yg
w,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 258 -
U Soe Tint Siemens PLC S7-200

Program in direct addressing

I0.0 = ON to OFF jzpfrS True

I0.1 = ON to OFF jzpfrS True

I0.2 = ON to OFF jzpfrS True

I0.3 = ON to OFF jzpfrS True

The more you learn about PLCs, the more you will be able to solve other control problems.
- 259 -
U Soe Tint Siemens PLC S7-200

The more you learn about PLCs, the more you will be able to solve other control problems.
- 260 -
U Soe Tint Siemens PLC S7-200

Program in symbolic addressing

The more you learn about PLCs, the more you will be able to solve other control problems.
- 261 -
U Soe Tint Siemens PLC S7-200

The more you learn about PLCs, the more you will be able to solve other control problems.
- 262 -
U Soe Tint Siemens PLC S7-200

rSwfcsuf / / STEP 7-Micro/WIN eJY LD program a&;wJYtcg END ukd xnfha&;ay;p&m rvkd
ygbl;/ a&;vkdYvnf; r&ygbl;/ STEP 7-Micro/WIN xJrSm Conditional END
om yg&Sdygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 263 -
U Soe Tint Siemens PLC S7-200

Project (24) Liquid Mixing Tank Control

1. Start P.B ukd ESdyfvkduf&if Pump-1 eJY Pump-2 wYkd NydKifwlarmif;NyD; Mixing Tank
xJrSm t&nf 2-rsKd;ukd a&mpyfygw,f/
2. owfrSwfcsdef 10 minutes jynfh&if Pump 2-vkH;pvkH; &yfNyD; ESrfhpyfatmif Mixer
Motor u arTygw,f/
3. owfrSwfcsdef 15 minutes jynfh&if Mixer Motor &yf? Drain Valve yGifhNyD; Pump-3
ukd tvkdtavsmufarmif;ygw,f/ Mixer Tank xJu a&mpyfNyD;om; t&nfawGukd ykvif;
jznfhwJY Bottling Station qDokdY ykdYygw,f/
4. Stop P.B ukd ESdyfvkduf&if Pump tm;vkH;&yfoGm;NyD;? Drain Valve jyefydwfoGm;yg
w,f/
Mixing Tank Process Control Program ukd atmufrSm a&;jyxm;ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 264 -
U Soe Tint Siemens PLC S7-200

Program in Direct Addressing

The more you learn about PLCs, the more you will be able to solve other control problems.
- 265 -
U Soe Tint Siemens PLC S7-200

Program &JU vkyfaqmifcsufukd PLC eJY vufawGY prf;MunfhzkdY tqifrajyao;wJY


Advanced learner awGukd tBuHay;yg&ap/
A Guide to PLC pmtkyfrSmaz:jyxm;wJY Simulation vkyfenf;twkdif; txufyg
program ukd WPLSoft eJY ajymif;a&;NyD; vkyfaqmifcsuf rSef? rrSef prf;MunfhvkdY &ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 266 -
U Soe Tint Siemens PLC S7-200

Program in Symbolic Addressing

The more you learn about PLCs, the more you will be able to solve other control problems.
- 267 -
U Soe Tint Siemens PLC S7-200

The more you learn about PLCs, the more you will be able to solve other control problems.
- 268 -
U Soe Tint Siemens PLC S7-200

Project (25) Mixing Tank Semi-Auto Control

'D Project &JU vkyfaqmifykHrSm Start_1 ukd ESdyfvkduf&if Pump_1 vnfNyD; yxrt&nf
jznfhygr,f/ Tank Heating twGuf Steam_Valve vnf; yGifhygr,f/ Low_Level a&mufwJY
tcg Pump_1 &yfNyD;? Alarm jrnfygr,f/ Start_2 ukd ESdyfvkdufawmh Pump_2 vnfNyD;
'kwd,t&nfvnf;jznfh? Mixer_Motor vnf; vnfygr,f/ High_Level a&mufawmh
Pump_2 &yfNyD;? Drain_Valve yGifhygr,f? Drain_Pump vnfygr,f/
Draining vkyfzkdYowfrSwfxm;wJYtcsdef 10 minutes jynfhawmh Drain_Valve ydwfyg
r,f? Drain_Pump vnf; &yfygr,f/ Tank Heating twGuf Steam_Valve vnf; jyefydwf
oGm;ygr,f/

(N.C)

(N.C)
For Tank Heating

Pushbutton awG&JU N.O/N.C ukd ykHwGifMunfhyg/ Liquid level u Low level txuf
rSm &Sdae&if Low_Level Switch u ykHrSmjyxm;ovkd open jzpfaeygr,f/ Liquid level u
low level atmuf a&mufae&if Low_Level Switch u closed jzpfaeygr,f/ Low_Level
Switch u N.C jzpfygw,f/ Liquid level jynfhoGm;&if High_Level Switch u ykHrSmjyxm;
ovkd open jzpfaeygr,f/ High_Level Switch uvnf; N.C jzpfygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 269 -
U Soe Tint Siemens PLC S7-200

Programukd atmufrSm az:jyxm;ygw,f/ PLC Advanced Learner awGtwGuf


&nf&G,fygw,f/


Start_1 ukd ESdyfwJYtcsdefrSm Stop_1 ukd rESdyfwJYtwGuf I0.0 a&m I0.2 yg ON jzpfyg
w,f/ Mixing Tank xJrSm Liquid vkH;0r&Sdao;vkdY Low_Level switch u closed jzpfaeyg
w,f/ 'gaMumifh I0.5 u ON jzpfaeygw,f/ Condition 3-ckpvkH; True jzpfvkdY M0.0 u
ON NyD; self-hold jzpfoGm;ygw,f/
Liquid level u Low_Level &JU txufukd a&mufwJYtcg I0.5 = OFF jzpfoGm;NyD;
M0.0 u OFF jzpfoGm;ygw,f/


Network 2 uvnf; Network 1 &JU vkyfaqmifcsufeJY wlnDygw,f/
I0.3 = ON, I0.5 = OFF, I0.4 = ON jzpfaerSom M0.1 u ON & Hold jzpfygw,f/
Liquid level u High_Level &JU txufukd a&mufwJYtcg I0.4 = OFF jzpfoGm;vkdY M0.1
u OFF jzpfoGm;ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 270 -
U Soe Tint Siemens PLC S7-200

Start_1ukd ESdyfvkdY M0.0 = ON jzpfoGm;wJYtcsdefrSm liquid level u low level txd


ra&mufao;&if I0.5 = ON jzpfaevkdY Pump_1 vnfNyD; Mixing Tank xJukd Liquid 1 jznfh
oGif;ygw,f/ Level u low level txufa&mufoGm;&if I0.5 = OFF jzpfvkdY Pump_1 &yf
oGm;ygw,f/

Pump_1 &yfoGm;&if (Q0.0 = ON to OFF jzpf&if) T37 vnf; OFF jzpfaeao;&if


Mixer_Motor (Q0.2 = ON) vnfygw,f/ 10 minutes MumvkdY T37 = ON jzpfawmhrS
Mixer_Motor (Q0.2) u OFF jzpfygw,f/ Q0.0 = ON to OFF jzpfrS qkdwJY condition ukd
&nfnTef;NyD; N xnfha&;xm;wm jzpfygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 271 -
U Soe Tint Siemens PLC S7-200

Low_Level sensor u N.C jzpfwJYtwGuf liquid level u low sensor xuf edrfhae
ao;&if I0.5 u ON jzpfaeNyD; low sensor ukd liquid level u ausmfvGefoGm;rS I0.5 u
OFF jzpfygw,f/ pmrsufESm (269) u ykHukd Munfhyg/ Pump_2 (Q0.1) rvnfrD liquid
level u Low_Level sensor ukd ausmf&if Q0.6 = ON NyD; Alarm jrnfygw,f/
Q0.1 = ON jzpfvkdY Pump_2 vnf&if Alarm (Q0.6) = OFF jzpfygw,f/ Liquid 2
Feed Pump vnfwJYtcg Alarm jrnfwm &yfoGm;ygw,f/

Start_2 ukd ESdyfvkdY M0.1 = ON jzpfwJYtcsdef level high rjzpfao;&if I0.4 u ON jzpf
aeNyD; Pump_2 vnfygw,f/ Level high jzpfawmh I0.4 = OFF jzpfNyD; Q0.1 = OFF
jzpfygw,f/ Q0.1 = OFF jzpfvkdY Liquid 2 Feed Pump &yfoGm;ygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 272 -
U Soe Tint Siemens PLC S7-200

N ukd xnfha&;xm;wJYtwGuf I0.4 = ON to OFF jzpfNyD; T37 u OFF jzpfae&if


M0.2 = ON & Hold jzpfoGm;ygw,f/ Drain_Valve yGifhNyD; Drain_Pump vnfygw,f/
T37 time counting pwifvkyfygw,f/

M0.2 = ON jzpfwJYtcg T37 u time counting pwifjyKvkyfygw,f/ PT ukd 6000 vkdY


a&;xm;vkdY 10 minutes jynfhawmh T37 = ON NyD; Drain_Valve vnf;ydwf? Drain_Pump
vnf; &yfoGm;ygw,f/
10 minutes qkdwmu Mixing Tank xJu liquid awG ukefavmufwJY tcsdefumv
jzpfygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 273 -
U Soe Tint Siemens PLC S7-200

Start_1 ukd ESdyfvkdY M0.0 = ON jzpfoGm;wJYtcsdefrSm liquid level u low level txd
ra&mufao;&if I0.5 = ON jzpfaevkdY Pump_1 pwif vnfwmeJYwNydKifxJ Mixing tank
heating vkyfwJY Steam_Valve yGifh ygw,f/ Mixing Tank xJu liquid awG ukefawmh
Steam_Valve jyefydwfygw,f/

The more you learn about PLCs, the more you will be able to solve other control problems.
- 274 -
U Soe Tint Siemens PLC S7-200

Terminology
Sensor A sensor is a device that converts a physical condition into an electrical
signal for use by the PLC. Sensors are connected to the input of a PLC. A pushbutton is
one example of a sensor that is connected to the PLC input. An electrical signal is sent
from the pushbutton to the PLC indicating the condition (open/ closed) of the
pushbutton contacts.
Actuators Actuators convert an electrical signal from the PLC into a
physical condition. Actuators are connected to the PLC output. A motor starter is one
example of an actuator that is connected to the PLC output. Depending on the output
PLC signal the motor starter will either start or stop the motor.
Discrete Input A discrete input, also referred to as a digital input, is an input that
is either in an ON or OFF condition. Pushbuttons, toggle switches, limit switches,
proximity switches, and contact closures are examples of discrete sensors which are
connected to the PLCs discrete or digital inputs. In the ON condition a discrete input
may be referred to as a logic 1 or a logic high. In the OFF condition a discrete input
may be referred to as a logic 0 or a logic low.
Analog Inputs An analog input is an input signal that has a continuous signal.
Typical analog inputs may vary from 0 to 20 milliamps, 4 to 20 milliamps, or 0 to 10
volts. In the following example, a level transmitter monitors the level of liquid in a tank.
Depending on the level transmitter, the signal to the PLC can either increase or decrease
as the level increases or decreases.
Discrete Outputs A discrete output is an output that is either in an ON or
OFF condition. Solenoids, contactor coils, and lamps are examples of actuator devices
connected to discrete outputs. Discrete outputs may also be referred to as digital
outputs. In the following example, a lamp can be turned on or off by the PLC output it
is connected to.
Analog Outputs An analog output is an output signal that has a continuous
signal. The output may be as simple as a 0-10 VDC level that drives an analog meter.
Examples of analog meter outputs are speed, weight, and temperature. The output signal
may also be used on more complex applications such as a current-topneumatic
transducer that controls an air-operated flow-control valve.
CPU The central processor unit (CPU) is a microprocessor system that
contains the system memory and is the PLC decisionmaking unit. The CPU monitors
the inputs and makes decisions based on instructions held in the program memory. The
CPU performs relay, counting, timing, data comparison, and sequential operations.
Programming A program consists of one or more instructions that accomplish a
task. Programming a PLC is simply constructing a set of instructions. There are several
ways to look at a program such as ladder logic, statement lists, or function block
diagrams.

The more you learn about PLCs, the more you will be able to solve other control problems.
- 275 -
U Soe Tint Siemens PLC S7-200

Function Block Diagrams Function Block Diagrams (FBD) provide another


view of a set of instructions. Each function has a name to designate its specific task.
Functions are indicated by a rectangle. Inputs are shown on the left-hand side of the
rectangle and outputs are shown on the right-hand side. The function block diagram
shown below performs the same function as shown by the ladder diagram and statement
list.
Statement list A statement list (STL) provides another view of a set of
instructions. The operation, what is to be done, is shown on the left. The operand, the
item to be operated on by the operation, is shown on the right. A comparison between
the statement list shown below, and the ladder logic shown on the previous page,
reveals a similar structure. The set of instructions in this statement list perform the same
task as the ladder diagram.
PLC Scan The PLC program is executed as part of a repetitive process
referred to as a scan. A PLC scan starts with the CPU reading the status of inputs. The
application program is executed using the status of the inputs. Once the program is
completed, the CPU performs internal diagnostics and communication tasks. The scan
cycle ends by updating the outputs, then starts over. The cycle time depends on the size
of the program, the number of I/Os, and the amount of communication required.
Software Software is any information in a form that a computer or PLC can
use. Software includes the instructions or programs that direct hardware.
Software A software program is required in order to tell the PLC what
instructions it must follow. Programming software is typically PLC specific. A software
package for one PLC, or one family of PLCs, such as the S7 family, would not be useful
on other PLCs. The S7-200 uses a Windows based software program called STEP 7-
Micro/WIN32. The PG 720 and PG 740 have STEP 7 software pre-installed.
Micro/WIN32 is installed on a personal computer in a similar manner to any other
computer software.
Hardware Hardware is the actual equipment. The PLC, the programming
device, and the connecting cable are examples of hardware.
Memory Size Kilo, abbreviated K, normally refers to 1000 units. When talking
about computer or PLC memory, however, 1K means 1024. This is because of the
binary number system (210 = 1024). This can be 1024 bits, 1024 bytes, or 1024 words,
depending on memory type.
1 K Bit = 1024 Bits 1 K Byte = 1024 Bytes 1 K Word = 1024 Words
RAM Random Access Memory (RAM) is memory where data can be directly
accessed at any address. Data can be written to and read from RAM. RAM is used as a
temporary storage area. RAM is volatile, meaning that the data stored in RAM will be
lost if power is lost. A battery backup is required to avoid losing data in the event of a
power loss.

The more you learn about PLCs, the more you will be able to solve other control problems.
- 276 -
U Soe Tint Siemens PLC S7-200

ROM Read Only Memory (ROM) is a type of memory that data can be read
from but not written to. This type of memory is used to protect data or programs from
accidental erasure. ROM memory is nonvolatile. This means a user program will not
lose data during a loss of electrical power. ROM is normally used to store the programs
that define the capabilities of the PLC.
EPROM 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.
Changing EPROM data requires a special effort. UVEPROMs (ultraviolet erasable
programmable read only memory) can only be erased with an ultraviolet light.
EEPROM (electronically erasable programmable read only memory), can only be
erased electronically.
Firmware Firmware is user or application specific software burned into
EPROM and delivered as part of the hardware. Firmware gives the PLC its basic
functionality.

The more you learn about PLCs, the more you will be able to solve other control problems.
- 277 -
U Soe Tint Siemens PLC S7-200

Reference
1. PLCs Theory and Implementation 2nd Ed (L. A. Bryan) 1997
2. Lessons In Industrial Instrumentation (Tony R. Kuphaldt) 15 June 2014
http://openbookproject.net/books/socratic/sinst/book/
3. S7-200 Programmable Controller System Manual C79000-G7076-C233-02
(2000)
4. S7-200 Programmable Controller System Manual 6ES7298-8FA24-8BH0
(8_2008)
5. S7-200 CPU221 Microsystem One Hour Primer [July 1999]
6. S7-200 CPU221 Microsystem Two Hour Primer [Jan 2000]
7. SIEMENS STEP 2000 Basic of PLCs
8. Beginners Guide to PLC Programming (Neal Babcock) 2008
9. A PLC Primer www.industrialtext.com
10. Basics of PLC Programming - Industrial Control Systems, Fall 2006
11. FX-Series PLC Training Manual using GX-Developer, 2006
12. Micro PLC Self Teach Manual - GFK-0811, June 1993
13. NAIS FP series PLC Programming Manual, 2000
14. GE Fanuc Micro PLC Programmers Guide, April 1994
15. FX PLC Applications and Programming (John Ridley) 2004
16. EC Series Micro-PLC Programming Manual (Emerson) 2007
17. Programmable Controllers - An engineers guide 3rd Edition (E.A. Parr) 2003
18. IEC 61131-3 Programming - Industrial Automation Systems (Karl-Heinz John)
2010
19. PLC Programming Methods and Applications (John R. Hackworth)
20. Industrial Electronics (Frank D. Petruzella) International Editions 1996

The more you learn about PLCs, the more you will be able to solve other control problems.
- 278 -