Microsystem Simatic S7-200: One Hourprimer 7/99
Microsystem Simatic S7-200: One Hourprimer 7/99
Microsystem Simatic S7-200: One Hourprimer 7/99
Microsystem
SIMATIC S7-200
One HourPrimer 7/99
Safety Guidelines The One Hour Primer was created as a quick introduction to the world of S7-200 and
has deliberately been kept short. It is not a substitute for the S7-200 manual.
Therefore, please observe the instructions given in the S7-200 manual, especially the
safety guidelines.
Trademarks SIMATIC® and SIMATIC NET® are registered trademarks of Siemens AG.
Third parties using for their own purposes any other names in this document which
refer to trademarks might infringe upon the rights of the trademark owners.
Edition 07/1999
Preface
The Micro PLC S7-200, in particular, is being used for more and more applications
because it combines power with an attractive price and simple operation.
To make your first steps in the world of S7-200 as simple as possible, we have
created a special Starter Kit.
This One Hour Primer is intended to help you learn enough basic skills to be able
to use the S7-200 within the shortest possible time.
And now, we wish you a simple and quick start and every success.
Good luck!
Mounting rail
Base plate
1. Mount the enclosed mounting rail on a base plate as shown in the drawing.
S7-200
CPU
Training model
Simulator
Output Power
terminals Supply
Analog
potentiometer
Warning
Training ! Danger of injury
model and material damage.
Ground (blue)
grey
Simulator
5. Connect the cables shown in boldface type as shown in the above diagram.
The gray wire is only fixed on the training model mechanically.
Any end of the gray wire can be connected to L+ and 1L.
Training
model
- +
+
DC 24 V
M Power supply
85 to 264 V AC/ 47 to 63 Hz
Always connect PE !
L1
N
PE
Simulator
Output side
Input side
+ + Power supply
24 V DC/ 180 mA
for sensors or expansion modules
8 inputs E0.0 to E0.7 (24 V DC)
Relay outputs
6ES7 211-0BA20-0XB0
Sie
ST men
Mi EP 7 s
cro -
/W
IN
SIEMENS
1. PG / PC
2. Call up the start menu by selecting Start from the task bar. 2.
3.
3. Open the Control Panel
from the menu Settings.
4.
Follow the instructions of the installation program. At the end of the installation,
the entry “STEP 7-Micro/WIN 32 V3.0” appears in the menu Start > SIMATIC .
In the folder Simatic, which you can call up from the Start menu, you will find the folder
STEP 7-Micro/WIN 32 V3.0. This folder contains the start icons for STEP 7-Micro/WIN 32.
If your computer has access to the Internet you can download or retrieve information about
catalogs, tips and tricks, etc., using the S7-200 on the Web menu item in the Help menu,
3*3&
6&38
56&
&20&20
SRUW
3&33,FDEOH
',3VZLWFK
VHWWLQJ
ELWV
7KH3&33,FDEOHFRQQHFWVWKH3&
WRWKH63/&
2Q\RXUSURJUDPPLQJGHYLFH3&\RXVKRXOGXVHWKHVHULDOSRUWZLWKWKHSLQVXE'VRFNHW
RUWKHSLQVXE'VRFNHWZLWKDQDGDSWHUHJ&20
7KH6VHQGVDQGUHFHLYHVGDWDDWELWV3OHDVHUHIHUWRWKHGLDJUDPDERYHWRVHWWKH
WUDQVPLVVLRQUDWHRQWKH3&33,7KHQSOXJWKH3&33,FDEOHLQWRWKH3&DQG3/&DVVKRZQDERYH
8VHWKHVDPHSKDVHIRUWKHSRZHUVXSSO\RIWKHSURJUDPPLQJGHYLFH3&DQGWKHSURJUDPPDEOH
ORJLFFRQWUROOHUFRQQHFWVKRUWHQGRIWKHFDEOHWRWKH3&3*LQRUGHUWRDYRLGYROWDJHGLIIHUHQFHV
6XSSO\WKH3/&ZLWKWKHRSHUDWLQJYROWDJH7KH6723RU581/('OLJKWVXS
&20SRUWRQWKH3*OHIWVLGH
&OLFNWRWKH&RPPXQLFDWLRQVLFRQLQWKHQDYLJDWLRQEDU
&KHFNWKHFRPPXQLFDWLRQVVHWWLQJV
5HIUHVKWKHFRPPXQLFDWLRQVE\GRXEOHFOLFNLQJWKHFRUUHVSRQGLQJILHOG7KHFRQQHFWHG&38VKRXOG
QRZEHUHFRJQL]HGDQGUHJLVWHUHGDXWRPDWLFDOO\
,IWKH&38KDVQRWEHHQUHFRJQL]HGRULIDSRSXSZLQGRZWHOOV\RXWKDWFRPPXQLFDWLRQLVQRW
SRVVLEOHGRXEOHFOLFNWKHILHOG3&33,FDEOH
0DUN3&33,FDEOHLQWKH3*3&,QWHUIDFH6HWWLQJPHQXDQGVHOHFW3URSHUWLHV
,QWKH33,PHQXVHWWKH&38DGGUHVVWRDQGWKHWUDQVPLVVLRQUDWHWRNESV,QWKH
/RFDO&RQQHFWLRQPHQXVHOHFWWKHSRUWWRZKLFK\RXKDYHFRQQHFWHGWKH3&33,FDEOHWR
&RQILUPDOOVHWWLQJVE\FOLFNLQJWKH2.EXWWRQ
5HIUHVKWKHFRPPXQLFDWLRQVE\GRXEOHFOLFNLQJDJDLQWKHFRUUHVSRQGLQJILHOGLQWKH
FRPPXQLFDWLRQVOLQNPHQX7KH&38ZLOOQRZEHUHFRJQL]HGDQGUHJLVWHUHGDXWRPDWLFDOO\7KH
SURFHVVFRXOGWDNHDIHZVHFRQGV1RZFORVHWKHPHQXIRUWKHFRPPXQLFDWLRQVOLQNV
7(50
581
/('581
/('6723
3&33,FDEOHWR
WKH3&
)URPWKH3&VZLWFKWKH6WR6723PRGH
DQGEDFNWR581
581 6723
7KHJUHHQ581/('RQWKH3/&OLJKWVXSLQ581PRGH7KH\HOORZ6723/('RQWKH3/&
OLJKWVXSLQ6723PRGH,I\RXFDQVZLWFKWKH3/&RSHUDWLQJPRGHVIURPWKH3&WKH
FRQQHFWLRQEHWZHHQWKH3&DQGWKH3/&LVFRQILJXUHGFRUUHFWO\
,IWKHPRGHGRHVQRWFKDQJHFKHFNWKHFRQQHFWLQJFDEOHEHWZHHQWKH3&DQG3/&DQGWKH
EDXGUDWHVHWWLQJRQWKH3&33,FDEOHDQGHQVXUHWKDWWKHFRUUHFW&20SRUWLVVHOHFWHGLQWKH
PHQX6HWXS!&RPPXQLFDWLRQV
m
gra
Pro isk
D
Pro
gr
Dis am 3.5” diskette drive
k a:\
1. Insert the exercise diskette from the starter kit in your 3.5” diskette drive.
The diskette is in the envelope on the last page of the manual.
2. From the menu item Project > Open load the 1st exercise program from the diskette into the
STEP 7-Micro/WIN Editor. The letter of the program name indicates the language
of the comments in the program (for English pick E.PRJ). You will need to select
your 3.5” diskette drive first.
It is only possible to
transfer a program to the
S7-200 in STOP mode !
Click this icon with the mouse to switch the PLC to STOP mode when the mode selector
on the PLC is set to TERM or RUN and the PLC was in RUN mode (LED STOP lights
up).
Caution: This action means that a connected machine is no longer controlled.
Click this icon with the mouse to download the (open) program, which is displayed on
the monitor, onto the PLC.
Click this icon with the mouse to switch the PLC to RUN mode when the mode selector
on the PLC is set to TERM or RUN and the PLC was in STOP mode (LED RUN lights
up).
Caution: A connected machine may start moving immediately, depending on the
effect of your program.
Warning
! Danger of injury
and material damage.
You can also load a program from the PLC onto your programming device/PC.
Click this icon with the mouse to upload the program on the PLC onto the programming
device/PC. It overwrites the program currently displayed on the monitor.
You should therefore always make sure that you always have a current version of your
program on the hard disk or diskette when you leave a plant.
Actions Reactions
Switch S0 operated LED E0.0 lights up LED A0.0 lights up Motor spins
Switch S0 & S1 LEDs E0.0 & E0.1 LED´s A0.0 & A0.1 Motor spins in the
operated light up light up opposite direction
Scan:
Is current flowing ?
If yes, then the result
of the scan is true.
(Result is “1”)
Scan:
Is no current flowing ?
If yes (no current), then the
result of the scan is true.
(Result is “0”)
Coil:
If the value “true” (current) is
passed to a coil
it is activated
( )
(The coil starts up).
Series circuit:
(AND logic).
The first switch AND the
second switch must be closed
in order to pass current.
Parallel circuit
(OR logic).
The first switch OR the
second switch must be closed
in order to pass current.
“0” or “1” are the only states in digital control logic. The “0” state is designated as false and the
“1” state is true. This is why we say “scan” is “0” (false) or “1” (true).
S0 S1
K1
S7-200
A0.0 A0.1 M
+
K0
-
S0
S1 K1
M
K0 K1
-
Circuit without PLC
K1
M
K0
K1
S0
+
-
K0
E0.1 A0.1
Change in direction of
Motor on/off:
rotation: Switch S1 is E0.0 A0.0 Switch S0 is connected to
connected to input E0.1 of
input E0.0. In our example,
the PLC. Contactor C1 is
contactor
actuated by output relay
C0 can be replaced by PLC
A0.1 inside the PLC.
output relay A0.0.
NETWORK
LD E0.1
= A0.1
Very fast events cannot be tracked in this way, because the transfer time required to output the data
on the screen is too long.
In the representation type function block diagram (FBD) a status view is possible, too.
Control Statements
The control statement is the smallest unit of a PLC user program. A statement consists of an
operation part and an operand part.
E0.0
Operation Operand
(Do what ?) (... to what ?)
The operation part of a statement (in this The operand part of a statement (in this case
case an AND logic operation) determines input 0.0) contains the additional information
the function that is performed when the for the control statement. It consists of an
control statement is executed. operand identifier and a parameter.
I 0.0
Structure of an operand
I 0.2
Bit address: bit number in the byte (0 to 7)
Decimal point: separates byte address & bit number
Byte address: Number of a group of 8 bits
Operand identifier
(area identifier)
Possible areas: inputs, outputs,
Internal bit memories, special
memories, variable memories
S2
K1
K0 K1 M
2. 3.
1.
5. 4.
K0 K1 M
OR logic operation
Your program is now as shown on the previous page. Save your program and load it onto the PLC.
Test the function.
K1
K2 K1
K0 M
Timebase Txx
1 ms T0, , T32, T64, T96 Every timer in the S7-200 has a
10 ms T1-T4, T33-T36, T65-68, T97-T100 status bit (time elapsed/not
100 ms T5-T31, T37-T63, T69-T95, T101-T255 elapsed). This bit is called the
timer bit. For the time T34 it is
called T34.
Input E0.3 must have the value “1”,
that is 1 s, before timer bit T34 is
“1”. If the delay has not elapsed
For CPU 212, timers
when the enable signal “IN” is
with timebases of canceled, the timer is set to “0”
1 ms, 10 ms and and the timer bit is not set (see the
100 ms are available.
timing chart below). You can use
Timer must not be put
the timer bit like
to a dual use. normal operands. T34
IN e.g. E0.3
5
4
PT=5
i.e. 3
5 x 10 ms 2
in T34
1
Txx e.g. T34
0
with base 10 ms
T34 10 ms 1
Timer bit of T34
2. A window is displayed in which you can edit the symbol table. Enter the element that you want to
appear as plain text later on under “name”. Under address, enter the operand that you want to
have replaced by a symbolic name. Under comment, you can enter a text that you find helpful.
Don’t forget to save your work.
3.
4. If you have selected the symbolic
addressing and changed to LAD, STL or
FBD, the symbolic addresses should now
be visible.
4.
5. The figure above shows the ladder diagram of the user program with symbolic addressing.
You can, of course, also program with symbolic addresses.
As the operand, you must then enter “S3”, for example, you only have to make sure
that this operand has already been entered in the symbol table.
A S7-200 project contains, next to the program file, all additional information to your project, as it is,
for example, symbol table, comments etc. .
1.
2.
You will find more information in the manuals for the S7-200.
For further training you can attend a S7-200 course in your
Siemens Training Center or with your SIMATIC representative.
Unanswered questions?
Technical problems?
The SIMATIC representatives
will be glad to help.
A light switch, for example, only has the states “light on” or “light off”, i.e. the value of the light switch in
answer to the question “Is the light on?” is either true (the light is switched on) or false
(the light is switched off). The light switch thus has an information width of one bít. The state “light
switch on but bulb defective” is ignored in this example.
The numbers in this system are binary numbers, i.e they are counted to base 2.
20 If this bit position is “0” (= false or untrue ...) it has the value 0
1 bit = because 0 * 20 = 0 (contents * value of bit position).
If this bit position is “1” (=true) it has the value 1 because 1*20 = 1
This is the position of the byte with the maximum value 255 in a word !
A word in a PLC can represent a number from -32768 to +32767. The bit with the value 215 is used
to denote a negative number (when position 215 has the value “1” the number is negative).
Inputs: E0.
Onboard inputs (E0.0 to E0.5)
E1.
Address area of
E2. expansion modules for CPU 221
not possible as no expansion
E3.
modules can be connected.
E4.
Free area in process-image input
E5.
table for CPU 221 (E0.6 to E7.7)
.
.
.
E15.
Bit address (corresponds to
7 6 5 4 3 2 1 0 the exponent of the bit value)
Outputs: A0.
Onboard outputs (A0.0 to A0.4)
A1.
Address area of
A2. expansion modules for CPU 221
A3. not possible as no expansion
modules can be connected.
A4.
A5. Free area in process-image output
.
.
table for CPU 221 (A0.4 to A 15.7)
.
A15.
The address areas of a PLC are the memory areas in which the inputs and outputs of the control are
mapped. For example, if a voltage is applied to a physical input, this “1” signal is mapped at an
address in the memory that is assigned to this input.
The memory areas which form the interface with the terminals (inputs and outputs) of the PLC are
called the “process image of the inputs” (PII) and the “process image of the outputs” (PIO). These
memory areas contain an image of the signals from the process.
Begin of cycle
Inputs
0 1 2 n
STEP 7 program,
- Bit memories
- Timers
- Counters
- ...
0 1 2 n
Outputs
End of cycle
All SIMATIC PLCs operate cyclically. During each cycle, the switch states are first read in from the
inputs, and then stored in the process-image input table. The control program is then executed on the
basis of this information.
The outputs in the process-image output table are subsequently controlled in accordance with the
circuit logic of the program. The last step is to transfer the states from the process-image output table
to the physical outputs. The cycle is then repeated.
90475 Nuremberg
Federal Republic of Germany
A&D AS MVM
From
My suggestions:
A&D AS MVM/0699