SIEMENS plc programming

Transcription

SIEMENS plc programming
 D13551
The RS Siemens Simatic S5 PLC range
The Siemens Simatic S5 is a powerful flexible
programmable logic controller (PLC) range for
industrial and commercial control and automation
applications.
The S5-90U and S5-95U are compact and economical
especially suited for small or simple automation tasks.
The S5-95U can be used with all the S5-100U modules.
The S5-100U maintains the flexibility of a fully modular
system, ideal for medium sized applications or using
specific modules to obtain the optimum solution.
l Small and easy to use, its size makes it ideal for
applications where there is limited physical space.
This compact, 'brick' PLC is a complete PLC within
the one box, having 8 digital inputs, 6 relay outputs,
processor, one interrupt input and one counter input.
Also included are inputs for 110V/240Vac power
supply, an on-board 24Vdc supply for sensors used
for inputs, and a slot to take the EEPROM memory
cassette.
l The S5-95U provides a powerful and cost-efficient
way for solving complex tasks. Requiring only an
external 24Vdc power supply the S5-95U has
standard features required for a compact stand
alone system, but has the flexibility to use all the S5100U modules, up to a total number of 256 inputs
and outputs. In addition to the processor and
programming interface, the S5-95U has 16 digital
inputs, 16 digital outputs, 8 analogue inputs, 1
analogue output, 4 interrupt inputs and 2 counter
inputs.
l The S5-100U has flexibility in the choice of central
processor unit, the accompanying power supply
and modules for input and output (digital and
analogue), timers, counters, counter positional
modules, ASCII/printer output module and
simulator.
l The S5-90U, the S5-95U and S5-100U modules are
small, easy to use and ruggedly constructed. They
do not require fan cooling and are not susceptible to
electromagnetic interference. Expansion modules
are plugged into bus units and screwed tightly so
they are vibration resistant. The bus units snap onto
special DIN rail (supplied).
RS Siemens Simatic S5 programming
A range of programming methods are available using
the structured STEP-5 programming language with its
comprehensive operation set.
l for IBM¨ or compatible
personal computers (PC) provide programming in
either advanced ladder or statement list. The S590U has its own low-cost package, whilst another
package can program the S5-90U, the S5-95U and
the S5-100U. Software packages are increasingly
becoming the standard for programming,
especially for new users.
l . These are ideal for quick
on-site monitoring and fault finding for a few lines of
program. Where a handheld programmer is used
for programming, the larger 4-line display
programmer is recommended except perhaps for
simple programming applications.
l ! . The large LCD screen
provides more information to the programmer at a
glance, the 31/2 inch DSDD disk drive accepts the
programming software package disks, and full
qwerty keyboard gives easy keying of program.
D13551
! "
# $
%
& '
& (
! %
& ) (( && *! ( &+ *! ( & *! (,( &- ! ( &. ! ( &/ 0
&/ ( &/ &/& &1 & ( ( & *!
& 2 && $
$
&+ 3345' & #( &- ' ! *6 &. 78 9
+ ! (!! + :- (!! (
+ :- (!! ( (!
+& :. (! ++ (!! $) $
+ 5$$ (! (
+- 5&1& ( (
+. 5&1& ( ( ! $
!!
2
9! ! % (!
& !! ;(
& 6* (
& 54 (
&& 6* $ 54 (
&+ 3,433 (
& ( ((
&- (
&. ! 9 ( %
&/ 0! # !
&1 $ ! ( !
+ !! (
+ 5! #
+ ! #
+& 0
#
++ (!!
+ (!!
- (
((
- ((
- ! $
# ((
. $ RS 2
D13551
1. Introduction
A programmable logic controller is a system for
controlling industrial and production processes,
electromechanical equipment and automated
assembly operations. This control function is
performed by continuously monitoring the states of all
the input devices connected to the controller (eg.
proximity switches and mechanical contacts).
Following the user instructions stored in the controller
(known as the program), the states of all of its output
devices are set as appropriate (eg. relays, solid state
relays or transistors). These output elements can in turn
control the operation of an external system.
Due to the simplicity of entering and modifying the
programmed instructions to suit the requirements of
the process under control, the PLC is a truly versatile
and flexible device that can be employed easily and
efficiently to repeatedly control tasks that vary in nature
and complexity.
A schematic diagram of the basic PLC control system is
shown in Figure 1.
In this representation the central processing unit
controls the overall operation of the system. Input
devices may be switches, relay contacts, timers, solid
state switches, proximity and limit switches, sensors,
analogue to digital converters or other electronic
circuits. The output devices may be external relays,
heating elements, lights, alarms, sub-assemblies,
electronic and electrical circuits, motors or other
electromechanical devices.
To illustrate the advantages of using a PLC over a
traditional electromechanical system consider a
control system with 20 input/output points. This
assembly could comprise 60-80 relays, some counters
and/or timers and a great deal of wiring. This assembly
would be cumbersome with a power consumption of
30-40VA. A considerable time would be required to
design, build, test and commission the assembly and
once it is in full working order any desired
modifications, even of a minor nature, could require
major hardware changes. Alternatively, in the majority
of applications the same control function can be
performed using the Siemens PLC utilising
l A central processing unit
l Power supply module
l Digital input and output modules
l System DIN mounting rail, and finally a
l Hand held programming panel or PC based
programming software.
A choice of input and output modules is available
within the system to cater for the most popular type of
signal inputs and outputs expected within general
control applications. Once programmed the PLC
system can be directly connected to the input and
output devices.
Programming will typically take 1-2 hours, any
alterations to the control function of the system can be
simply implemented within minutes by modifying the
stored program. Other advantages over more
conventional systems include compact size, low power
consumption, fast response, versatility and lower
overall cost. As the input/output requirements of a
system increase, the advantage of using a PLC
becomes much more significant due to the complexity
of the equivalent hardwired system and its labour and
material costs.
Figure 1 Â ­ ¨ ø ¡ ± 2. The RS Siemens Simatic S5-100U PLC
system
Unlike other programmable logic control systems the
key to the discrete modularity of the system is its 'data
bus' modular approach. Internal signal transmission
between input and output modules and the CPU is
integrated into individual bus modules. Each unit has
two slot receptacles, as well as adjustable mechanical
coding devices for the particular type of module used,
plus terminal blocks for the field cables.
Using the 'bus modules' the data bus can be extended
to the number of slots/modules actually required.
Additional system expansion may easily be
accommodated at any time by simply adding extra bus
units.
The modular concept of the PLC also gives a choice of
three Depending on the task
required either the 100 ( stock no. 628-002), 102 (
stock no. 628-018) or 103 ( stock no. 628-024) may
be used.
The is for simple automation tasks requiring
four auxiliary relays or more. Up to 128 digital inputs
and outputs can be connected and in the first eight
slots, up to eight analogue inputs and outputs may be
configured. The execution time for one binary
operation is approximately 70µs. If time critical
operations are to be carried out then the CPU102
should be adopted.
The is ideal for tasks which require shorter
processing times and larger memory capacity. Its
memory is twice as large as that of the CPU100 and its
execution time per binary operation is approximately
7µs. This makes this CPU ten times as fast with twice as
many inputs and outputs (up to 256). The CPU102 also
incorporates 'function blocks' into the operating system
to support analogue value processing and calculation.
Finally, for complex systems requiring control there is
the CPU103.
The is for complex and demanding systems.
This CPU is the fastest and most powerful in the range
having a processing time of approximately 2µS per
binary operation and a memory ten times that of
the
3
D13551
! !
"
Note. # " ! $RS
%&'()))*
+
) ( ! !
( , ! ! ! ! !
+
! ! +
! -
l l l l
l
l
2.1 Assembly
! " # $$ %& RS ' ( ) ' * %& l ( $$ l ' " l + , ' $ $ ' '
' ' ' $ $ ' $$ $$ ' $
$ + 4
# -
$
$ $$ ' *,% , .
// 0
1
/
2 1
/
2
' '
345 34
' %& 1( 62
+ 7849 0
D13551
PLC and central processing unit
RS S5-90U
S5-95U
S5-100U CPU100
S5-100U CPU102
S5-100U CPU103
!" #$%
& & &
& & & '()" $*
& & & & & ( & ( + , , , , , -" #./.%
/
/
/
/
/
0 # %
1) # )/23%
4" !/* )/ ))
) ) ) ) ") !/* ) ) ) ) 5
D13551
RS **
*
' &&
' &&
&
&
,
&
.
.
))
)$
&
&$
)$ *
*
*
,
*&
*,
&
&
&
9
*&
&
*&
:9
:&
&*
&&&&
*
9
* @9
:&
))
)$ ))
.
&$
5$")$ = $
&"")
: $
: "")
!"# "$ %& !"
!"# "$ & !"
!"# "$ %& !"(
!"# "$ %& !"(
+ !"# $$)
+ !" )
+ !" )
+ !" )
+ !"# %& -,# & -,# $$)
+ !"# %& )
+ !" # %&/ !"# & 0)) 1
+ !" # %&/ !"# & 0)) 1
.2) "$$" "3 $% *
+ )$# !"# + # !"/ %&#
+ # !"# %&
.2) "$$" "3 $% *
+ 4!" )
+ & )
+ 4!" )
& )
, + %&# %!"
6) + %
,$ + 78
,$))$)$ 378 !"# 378 !"
)
))
)$ )$
)$ 9 )$)" : ;$ ;
)$ $
: ;$ ;
)$ $
<* = > $
" $ ?
)$ "3
)$ ? ? @9 ñ ")>
,
@$?" ">
? ? >$ A, ,
= @@ ;$ ;
$
6 $
$ "3 $% $)$ ?
:9
: $
0# $ ,:1
:
: $
:.
: $
AB& : ) 0!71
*&
")
@C )
0? ">)$1
*
*
*
*
*A,
*A,
*A,
*A, &
&
*&
:9 *&5
:&
:&
9
&
&&&B
3 $ .= 3 $ .= 3 $ .= 3 $ .= 9"3 ># );)# 1/2 &&# %*!&;
@ )$?" > $) ); " )$
: )$ >
% "$$")$ ">
# @
: ??
)$ = $
$)$ ?
"3 $% $ " )$
"$$"
,)$ " ? <* *
9
* A,
* ,,
* D
&
: >"3 >
: D .= : D .= : )$ )
:: $
*Note. 6
D13551
Figure 4
!$
3. S5-100U modules
3.1 Central processing units (CPU)
RS CPU
The central processing unit governs the operation of
the PLC by executing programs stored in memory. The
CPU organises the reading in of external signals and
data, gates them logically, carries out calculations and
arranges the output of results. The processor also
handles values of internal timers, counters and virtual
relays.
The CPU is 'snapped' directly onto the system's DIN
rail.
!" #
!" # $ % %
'''
RS
&$
Features include
l
l
l
l
l
l
l
An internal power supply (9Vdc) for the I/O modules
An internal program memory (RAM)
A receptacle for an EEPROM memory sub-module
A programmer port
A power connector for 24Vdc
A connector for bus cable of the first bus unit
mounted to the right of the CPU
A compartment for a back-up battery to save the
contents of the internal CPU RAM in the event of
power failure.
7
D13551
&
&& *
, &
) 0 ! %
$3 #
53 #
6 &
6 &
&
&
8
8
0 8
): 8
6 8
" &
, && !%
& 2
&* 5 & <;
& 2 ; !
#%
; !
&%
& ;
;
)7 &
=2 98& >7
98& !*%
)2 !&& *%
5 )/ ,7 2
)
, 7 &*
6 !B C 6% B7 5A !&& *%
!&& *%
8
RS RS RS '(
-(
.
1 - 2
+1 ****444
+1 2
***444 !&#,%
!"#$%
'#'()
#-(
.-
1 - 2
.1 ****444
.1 2
***444 !&#,%
*+(
-(
-/ 1 - 2
1 ***444
1 2
***444 !&#,%
7 *
-+-+
7 *
9 // .
*
*
"
*
&& *
9 ///.
+
+
"
+
+
+ .
9 //.///././-
+ -+
+ -+
-+
+ -
+ 2
***.;
*
<4;
<-*;
£
£*+-
5 "
?
! -@5 & 8&
5A%
- ! -@5%
;
***.;
*
<4;
<-*;
£
£*+-
5 "
?
! -@5 & 8&
5A%
- ! -@5%
; ;
***.;
*
<4;
<-*;
£
£*+-
5 "
?
! -@5 & 8&
5A%
- ! -@5%
*-****-
*-***-
*'B
4*- .- *+-8
*8
*-****-
*-****-
*B
4*- .- *+-8
*8
*-***-
*-***-
*+B
4*- .- *+-8
*8
2
2
2
2
2
2
D13551
3.2 Power supply modules
RS Table 3
The 110/240Vac power supply module provides the
24Vdc voltage required by the CPU, or DIN rail
mounted equipment.
The range consists of four modules covering 0.8A, 2A
and 4A. Two, 2A output versions are available, type A
and type B. Type A is primarily designed for use with
the S5-100U PLC range, however it may also be used
for providing limited external power requirements
demanded by external circuitry within the system, ie
switches, transducers etc.
The type B, 2A and the 4A output devices may be used
in either S5-100U or rack mounted applications that
demand higher output power.
'!% " RS
!"#
%&
$'
( )
* '
+ ,
- ! " # " "$ "% & ! "%%% These units may
also be screw mounted onto a back panel
.
.
- )
* .
- The modules are simply 'snapped' directly onto the
system's DIN rail beside the CPU and interwired or
used in DIN rail mounted systems that require a 24Vdc,
modular power supply.
'
/(0 ' ! !
1
0 23
4
5
6. ..7
Features include
l
l
l
l
l
$%&
.
Dual input operating voltage 110/240Vac
Continuously rated at 0.8A, 2A or 4A
Parallel connection (2A type B and 4A versions)
Short circuit protection
DIN rail mounted.
2
*$$ 8$',49
2
*$$ 8',49
32
:
. 8; 9
$
* <
=. +(
$
: !
' 32 3 , * % * 3 8 9
$ * $ * + ! ( .
=# $,
,(
'* 8>9
For this reason, must not be used as load power supply.
*With core and sleeves.
1
RS ($ ""% % ($ ""% % RS
9
D13551
RS RS RS &'(
"# !
$ !
!
'(
% &'(
")
")
* +,
+ ,
$
!"#
$
% !
)
!
*!! #
&+
-&& (
$
, -
/ 0
1.
1 .
2 $ $
% . $
% %
&%
. /
. 0 $
% 3
456 / )
9
/
;&&
;&&
2
2
8* % 8* &
<
!=
$
% =
-
-
7 , (
7, (
(
(
8
8
/ /
2% <> ,
, ,
6* 32
%
,
32
0 6
5
%%:
,
!
7
6 *8
. (
4") 5*!
1 ! 2
'(
. (
, 9: ;
9:
9: ;
9:
6
#
"( <
9: ;$
9:
#
<
9: ;$
9:
=3 !
&
; ?
@% ,5
:
& -:
!
= & 8 - ; ' ; 8 <=
& ; & ; -:
, ! 5 %
@# &-
6
&( ' -5
); & <1=
=- $
=-$
0 7
7
!
>
>
2 &
?
?
=- $!
=
!"
RS 10
" @ = !
@ *
7
$ > 7
$ 7> 7
!
D13551
3.3 Digital input modules
RS The digital input module converts external binary
signals in an application process to the internal signal
level required by the programmable controller.
The modules are plugged into the system's bus unit
establishing contact to the terminal block in which the
input signal cables are connected. Each module has a
mechanical coding mechanism to act as a 'key' to
prevent incorrect bus connection.
The range consists of four 8-input versions:
stock no.
8 inputs: 24Vdc, non opto-isolated
628-377
8 inputs: 24Vdc, opto-isolated
628-103
8 inputs: 110Vac, opto-isolated
628-125
8 inputs: 240Vac, opto-isolated
628-131
Features include
l
l
l
l
LED input signal indication
Mechanical coding mechanism
Provision for input channel labelling
Fixed slot addressing.
Table 6
RS
" " * %
"
" * + *
1 (2 )
4
*
5
56
7
8 6
4
-
% 4
*
:
6 2 (65;)
54 * <
*
!
"# ##
$% &' ( )
#
!
,- "
./"0
"
"-3
096
96
5
£" !'
$% #'
$% " 0<
'- "2 (0 8)
RS ! "#! 11
D13551
RS RS ! $ $ * '
! $
$ !
* + *
1 2 3
5
*
1 2 5
*
6
67
8
9 7
35
-
' 5
*
;
7 2 76<
65 * =
*
12
!"""#
$%"""%%
&'" () &'" %
&'" #
,-" $!!
./!$0!
$
-4
#!!
%!
-4
#!!
!"""0!:7
!"""!:7
6
£$"#)
,-" %!)
&'" $"#=
)-" $2! 0"9
RS RS #$%
- .%
- / -
..
4. 56 . 8
4. 56 9
. 8
:
:;
(
) ;
+98
1
% 8
-
$
; 56 ;:=
:8 - .
>
-
!"!
&'"()
*% +, *% *% +
01 23'
+!
+17
+!
+
17
!
'<;
<;
:
£ ,
01 + ,
*% +'>
,1 +' 6)
D13551
'( # "%# RS RS &'(
/ 0(
/ 1 /
00
60 "# 0 8
/
60 "# 9
0 8
/
:
:;
+
, ;
98
3
( 8
/
'
; "# ;:=
:8 / 0
>
/
!!!"# #$!!!$%
)!!!*%+,
-(! *. 3.4 Digital output modules
RS !"# $%& '$()# *& +$)# ,
- ' ,*!./
**$0 !$"# $%& ,
- ' ,*%+/
! +$" # %&1 !$"# %& -
/ - ' ,*'/
# +$"
# *%&1 !$"# +& -
/ - ' ,!' /
2
#
' ,!.
! "#
$ #!
% !&
Features include
l
l
l
l
34 34 5
6
- /
-(! -(! 23! 45 *
$ 37
$ 37
$ !!!* <;
!!! <;
:
£$.
23! .
-(! %!)>
.3! ),
13
D13551
RS ! "
#" !$%
&' (")
#" * +, &' -")
$+ # , "
./' 0'-1
1,
)' 2'23
RS RS 4"5 # 6
7 4
#
6
* *
4" (
$"5 '''0
8'-
0-
9 # :: 4" ) 0;!<'-) ;!
$"5 -")''')
*" &' -1
:: &' ")
9 :: &' *='
:: &' ('6 -")
>, 4
" -
>+, #?/
&' @3
&' @3
. "5 # ()
# $5
$ # &"" $5
'6)
$"5 "5
" # $!
@3 "
''';!
"
'''(;!
*, # 5A ,
14
&' "
RS !"
+ , /
00 + 3 00 4 ,
00 46
7
4
6 "
3
8
+ 9 + #$% &%%%'()*
.%%%' %.1
.1%%%%.1
#$% ..2
#$% (%.1
#$% 5& ! ,1 $
#$% )*
#$% )*
1
+
D13551
2 2
01
(
4
5 "
678( 49
!
"
678( .9
!
78( 62<9
2! >
'%%%-'3
'%%%'3
#$% ''
(+, '-'
&'(
&$:
''(
&(
$:
''(
#$% )?
=% )%>
)@' 6)19
RS !
"
th
*
(+, '--' &''
.
+.
.
!
/
"
2 2
01
(
4
5 "
678( 49
!
"
678( .9
!
"
6
! 9
!
47 6 9
" (
2 6 9
( ;'%
78( 62<9
47
2! >
pp
#$% &'(
&% )'(
#$% % &'(
'% )'(
$ '66
'% $ '
#$% '01
#$% &01
'%%%-'3
'%%%'3
#$% ''
(+, '-'
&'(
&$:
''(
&(
$:
''(
&'(
&$:
''(
&(
#$% )%-(
&'%%%)'(
)(
#$% )
#$% ''
=% &>
$% &' 6?%19
15
D13551
8 output relay module
Technical specifications
!
"
th
+
),- (..( &((
/
,/
!
/
!
0
"
3
4-, 56
7 7
12
)
4
9 "
5:;) 46
"
5:;) /6
"
5
6
! 4: 5 6
" )pp
7 5 6
) =(%*
:;) 57>6
4:
7 A
16
#$% &'()
%* ()
#$% (%* &'()
(%* ()
$ (6
(%* $ (6
#$% (12
(%%%.(8
(%%%'(8
#$% ((
),- (.(
&*()
&$<
*(()
&)
$<
*(()
&*()
&$<
*(()
&')
#$% %.)
&(%%%()
*)
?% (
?% @(
?% %.A
$% (( 5(%.26
D13551
3.5 Digital input/output modules
RS The digital input/output module combines both input
and output capabilities into module width. The
module is ideal for applications where the system
installation space is limited. This module enables
greater density digital I/O requirements to be
configured.
The module is plugged into the bus unit enabling it to
establish contact to the central processing unit (CPU).
external input and output signals are connected to
the unit via the separate screw terminal, front mounting
connector stock no. 628-478.
! " # # #$
The module incorporates a mechanical coding
mechanism to act as a 'key' to prevent incorrect bus
connection.
!" %# &
! !#$
$ " %% '
The module incorporates:
16 inputs, 24Vdc.
8 outputs, 24Vdc 0.1A and
8 outputs, 24Vdc, 0.5A.
All inputs and outputs are non opto-isolated.
Features include
l
l
l
LED indication of module status
Mechanical coding mechanism
Fixed slot addressing.
17
D13551
"
# *% "
# "
# + ( *)
./
. 0 (.12)
1
0
1
0
4 N
"
# 5 1
5
"
# 7#/
. 0 (.12)
("
# )
+ # 5 1
"
# 9& 7"
#
:% "
#
#
/ (
)
1
# 7
1
-6
1
# #
< . # #
5 (0 )
1" # ?
#
1)
18
! !!
$%& & ' ( )
$%& ! ( )
$%& ( )
,- %
£& '
$%& '
3
3
3
3
'
&&&'
'
&&& '
-6& &'
8
-6& '
8
$%& '
$%& '
* $%& '
$%& '
* !
! ;<
;<
/ !'
1
1
(&3 6 N )
=. !1
=. !
* )
1)
6>
$%& &?
'6& 0
D13551
3.6 Analogue input modules
RS ! "
!" #
$#$ %&'#'(
#&!)* #
$#$ %&'#+,(
Features include
l
l
l
l
-
$* &* (
!./ %!./ 0
1
2
RS RS %& (
, ,
/
.
5
!* !7# 3 8
8
5 + 6 #!92!01 ;
+ 333
< + "
$
> =
?
!3332!@/
A
&
& % 1
/ A& C)
/ 7"
"(5 !2!
A 5/ ##'
G
!"
³ #!$W
%'
) !* + %- .
"'
! #!01 2324 2!01
,63 2! #!01
,63 #! 2!01
,63 *! #!01
,63 22324 2!01
,63 "
,63 4#"92!"
,63 #!"
: 6
!7# ,
3 *2=
,
3 !=
!3;
!3#;
!3!#;
!3!#;
!3!#;
!3!;9B
!3!!;9B
,63 !!
%&3 4!D
7" E #!!"
E
<p + $" 39#!F
D63 H! *31
19
D13551
RS %& (
, ,
/
.
5
!* !7$ 8
8
5 + 6 $!93!12 ;<
+ > + 0
?
@ =
A
! 3!B/
C
&
% 2
/ C& E)9, '
>
/ 70
6 0
0(5 !3!
C 5/ $$'
H
20
!"
# $W
%'
) !* + %- .
0'
! $!12 3 34 3!12
,6
,6
,6
,6
3! $!12
$! 3!12
*! $!12
33 34 3!12
,6 )0
,6 4$093!0
,6 *!"
: 6
!7$ ,
*3=
,
!=
;! $<
;! <
;! !$<
;! !$<
;! !<9D
;! !!<9D
,6 !!
0
# 30
! #!0
%& 4!"
%& *!"
E)9, 70 F $!!0
F
>p + ?0 9$!G
"6 #! * 2
RS D13551
l
Features include
3.7 Analogue output modules
RS ! ! RS l
l
l
" #$ RS '
! 0 ) 1,
3 6
&
6
&
3 : ;
)"""9<=,
> 3
> -
= ),
6> (
@
) ,
=
A
2
*
C
'0 9
6 C0= 55&*
F
!" #"#$W
%& ( )* + ,
-. /
!2" "
42" 51
42" #4
!2" 7589
"#1
"91
"1
"1
"18?
!2" *
#"9
"""#
->" B4
->" 4
C
(8! )A, D 5
;
!D
@p + $ "85E
42" A )"G,
21
D13551
RS 3.8 Function modules
The modules within this range perform the following
tasks when incorporated into the PLC system: signal
comparison, timing, counting and counter/positioning
functions, together with input/output simulation.
Each module is plugged into the bus of the PLC system
establishing contact to the terminal block to which the
input and output signal cables are connected.
Each module has a mechanical coding mechanism to
act as a 'key' to prevent incorrect bus connection
(except simulator and diagnostics modules).
RS !" ##
Table 18 RS !" #W
$% &
' ( )' * +
! $, -
. ) '/+
!" '
0 " 1/
2
%
2
%
" 3#
4%
" '15
0 !" 615785
9 3/
4
)8:;+
38/
< 3/
$
3'/7=
; )+
!" 2< (
5
5
#85
#5
) +
;
>5
$< ?
"
5
$< '#
@
5&. '8
$
15
2 4
!A
@.; 11%
B * 'C5 '71D
E
" > )'F+
22
RS #$" #!" #
D13551
RS l
l
l
l
!"# $ %
RS RS ³
!"
# £$%&
'!
£$&
(
£%&
) *+)***%)!
, -./W
, 01* %)! 2£*+3
, *+4***4
, +W
5
! %&
, ) %6
'! 278) ! 3
9)
1:
! +)
'! 278) ;3
%)
%1:
! +)
!!
!!
%
78) 2<=3
64
#
2.>3
23
D13551
RS ! l
l
l
l
l
" #$ RS RS !
&
' '
( $ ! )%%*' )%% *' )%%*' )%% *'
&
!"# $ $ % && '
l
l
l
l
l
l
&
+,- .
" #! #$ RS % RS #
'
(1 )'*(+
./
£ !"
£ "
$ !"%!&' £!,-
)01+
RS #$# $ $%& '(( #)# ( )( ((
#)# 24
!
"
)%* +"
&%* +"
D13551
!" #
"$$
%&$
'(
%) &$
(
!"#
$%$ &'
$($ ) !
*
'2& (
) - .
. 01
+ *,
(%%/ 0 . 1
(%%
$! ) '&$
2 0&3 1
%4 01
& 4
'2&$
5 ,* %(6%
5 # 76% - 4 (% %% 0#1
*
+(# )
,- .
/ -! 0%
1 & pp
) &$
3(# !
* 5 66 !
1$ -
7
3(# !
(7 7
1$ 5 66 !
(7
RS 25
D13551
RS "# % #
5V encoder input
1 232. 434. %3% 22
78
8 24V encoder input
1 2. 4. %
2
1 #
-<- -- 1 -- & 78
8 Digital inputs
"# 1 #
-<- -- 1 -- 1 78
8 26
! $
& ' () *+* + ' + ) ,- . /
0) %5 63
9:; <<=>?
9:; <
@& # #
9:; )<<2
3 0) $3
3)) &
&) &))
,8; A;2
9:; <=>?
9:; <<
@& , 9:; )<<2
3 % $
3)) &
&) &))
A;2
9:; <<>?
,8; ) ; 9:; <<
Digital outputs
"# #. # % -<- 5 @ #
#
#
-- -<- 53 W :;
53 3
@3
58 # @&
$ #
% Cpp
D @&
8
&E
5 #
1 3
1 #
1 3
B
5 $
2 <;2
9:; <;2
<;2 B
3
9; @(;
9:; )
9:; <<
% @
9:; );+
< )<
2,
)<2
*<2
,8; )B
1 F Cp'=F ;6<G
1 ! Cp'=F 9>?
2: < A;A?
D13551
3.9 Simulator module
RS The simulator module is used for simulating sensor
signals and for displaying output results from the CPU.
It is invaluable for both testing and debugging
programs under development.
A switch at the rear of the unit selects whether the
module displays inputs or outputs.
Features include
l
l
Signal status display
Input/Output select switch - rear of unit.
Table 23 RS RS ! $
%
&'(" )*
0
'(" &012*
1
7
" #
+"
,."
/
34
56 637
( &#689*
27
D13551
RS The ASCII printer output module enables the PLC to
communicate with an external RS232 C or TTY
interface printer, peripheral device or other similar
module.
The module is simply plugged into the system's bus
unit establishing contact to the CPU and connected to a
printer via a 25-way socket D connector. The unit also
incorporates an EEPROM socket in which an EEPROM
submodule (up to 8K bytes) containing user defined
messages may be stored.
The following information may be printed:
Message texts configured on a memory submodule
(data blocks 2 to 63). Up to 255 messages of 80
characters each, with up to 3 variables per message
can be configured
l Time and day and date from the module's own real
time clock
l Values of variables generated within the CPU can
be included.
Printing of message texts does not increase the
response time of the PLC.
A suitable printer, LX 850 ( stock no. 253-917),
fitted with an optional interface board ( stock no.
645-906) may be found elsewhere in the current catalogue.
l
ASCII mode provides a communication method for
transferring information from the PLC to peripheral
devices eg. terminal, modem or another ASCII/Printer
output module, and from peripheral devices to the
PLC.
l Up to 256 bytes can be transferred between module
and peripheral device
l Outputting is initiated using a 'Send job' command
within the program.
Information is transferred at a maximum rate of 6 bytes
of useful data per two program scans. Once all the
information is assembled, it is automatically
transmitted. Inputting is done similarly with a 'Receive
job' command.
l Modes may be configured for fixed or variable
length messages transmitted or received, defined in
the main program
l Time, day and date may be included using the
module's integral real time clock.
28
l
l
A buffer for message texts (RAM, 2k bytes)
A hardware clock with battery back up (. Back
up battery stock no. 628-311 required)
l A memory submodule slot (EEPROM, max. 8k)
l Mechanical coding mechanism to prevent incorrect
bus connection
l Fixed slot addressing
l Printer module may only be plugged into slots 0-7.
Each printer module comes complete with detailed Siemens instruction manual describing unit's
installation and operation.
D13551
RS !"# $ "
RS !
"#"$% "&' (
) (*
+
'
,"-
.
( /#0 )A / 10*2- 2 )' 3&4$
( 4$*
," /#0 )3& / 10*2* -
'((
& /3-
'2
5/ 6 11 2 !
)1 5 1 ( " ( *
/ 6 11 2
! )1 1 ( 1 ( *
7 11& 89&&7
2 ! 6 #&% "#" 6 10
7 : ;<
)
:*
7 + (
)RS + 9"/#11
=*% #3.-0& '2
< ! (
>"&
?
@
A &4$ B9&4$
(
.A &4$ B3&4$
2
10C 80C
$ (
!
B8. )$D*
( 13&'
: ! 2 ( 1"E
E2
'((
0&& )159
@*
%
&
#
# '
# # ()* #
* ) & * ) &
! ! 29
D13551
For cable lenghts over 15m, the load
capacity of the cable must be taken into
consideration.
! "! !
#$ % & ' ' #$ #$ !! % !" RS # $%&'' RS #
$%&'' (
#! 30
D13551
3.11 Diagnostics module
RS ! !" !!" #
! "
! ! !
$ ! %%
! &'
%
l (" l '
#
l ) # * +
l !!" #
!
! ! !
,
RS
"
!
#
$
%&
' $
( )
* +
$
, #
*# ,-.
"#/
-
0)1 123
* ! #
3!
/1 4" 145
RS 31
D13551
RS The internal bus of the Siemens programmable
controller is assembled from individual bus units (up to
16 bus units can be connected). The bus units are
assembled side by side onto the system DIN rail and
interconnected by flat ribbon cable.
Each bus unit can take two modules and has at the
bottom a terminal block with screw-type terminals for
connecting the signal cables.
When replacing a bus unit it is only necessary to loosen
a screw on the terminal block.
Table 26 RS %
&
'()" *
,
.
()" '/0*
# 2 3 # '*
2,
RS 32
! "#$ !!
"
+
-!!"
!--2
!--2
1
)- 4)
1 4!! '!5*
D13551
3.13 Interface module and interface cable
RS ,:
RS
"
#
-%# !#&# #
!
"
# !
$%& '%&()
$ #
!
% 3.14 EEPROM modules
RS $ $ $
&'( ')* !( ')*#!( $
$ ')*#!( + *,-./00 $ $
1
$$
$
22'314
354
$ $
22'314
$ 6 + $
7 22'314 % 8
RS RS .& #+ 22'314
*,-. !,
,+ 22'314
*,-./*#
9+ 22'314
*,-. *-
-+ 22'314
*,-. :9
!""
# $#% $ & % '() $% % *+,,* # 33
D13551
RS RS !" # $ % &
% % !"# $%
! "
RS & '& ((& ' ()* *+
,--. *+,--. /) 0123334 #% %
% 0-+. 0,+. /) 012356%
0123++4 34
) * *+,--. ()* % % D13551
2 outputs at ±10Vdc.
2 outputs at 4 to 20mA.
4. PROGRAMMERS and PROGRAMMING
ACCESSORIES
4.1 PG605U programming panel
RS This small, online LCD programming panel is primarily
suitable for entering basic programs on any of the Siemens PLC central processing units. For more
complex programming (for example, parameterising
the printer output module, stock no. 628-399, and
function blocks on the CPU 100s, the PG615U
programming panel and operating system, stock
nos. 628-226 and 628-276, should be used. The
programming panel and PLC are connected by the
integral cable supplied with the unit.
A program is entered into the module's memory using
statement list. Programming is aided by the display of
system prompts and error messages, together with the
ability to overwrite, insert or delete statements.
Programs are written in blocks of statements
(maximum 1024) and when complete are transferred
to the memory (RAM) of the PLC.
! " " #$% $
& ' (
! " " #$%
l
l
l
l
l
l
Two-line LCD display for programs in statement list
form and for operator prompts
Keypad for entering and testing programs
RAM for 1k statements
Signal status display and display of result of the logic
operation
Forcing of outputs (coils), flags (internal relays) etc
Search run (the search statement appears in the
display with its memory address)
l l Integral connection lead (3m).
!
"#
$
%
& ' '
& ()*
RS
4.2 PG615U programming panel and
operating system
RS + ,
This enhanced LCD programming panel provides
further features and capabilities for programming the
PLC system. The unit may be used on-line, or
alternatively the panel may be used in locations remote
from the PLC by the use of the off-line program adaptor
( stock no. 628-327).
Programs are entered in the form of a STatement List
into program blocks of up to 2048 statements. Full
statement list programming (STL) is achieved by using
the Siemens PG615U program operating system
sub-module ( stock no. 628-276) required for each
PG615U programming panel.
Program blocks may be transferred to either the PLC
memory or system EEPROM modules held within the
program panel.
Programming is aided by a large, clear LCD display
screen, operator prompts and error messages.
Programs can be easily modified by overwriting,
inserting or deleting statements.
Table 28
2 1
RS
# $ ' ( ) * ) ' (
! " !
% ! & !
+ ) " ) , ) ) ,. -+/0
*- *$- "./ "#
$ ' 0 ! 11
(,
RS
Features include
l
l
l
l
l
l
l
l
l
l
l
Eight on-line LCD display for programs in statement
list form and for operator prompts
Display of signal status and logic operation
Force - on/off facility for outputs and flags
Search run (the search statement appears in the
display with its program memory address)
Display of instantaneous contents of timers and
counters
Adjustment control for optimising the viewing angle
of the display
Keypad for entering and testing programs
Key-operated switch for preventing unintentional
programming
RAM for 2k statements
Receptacle for EEPROM memory sub-modules for
transferring user programs from the RAM of the
programmer to an EEPROM sub-module or vice
versa
Receptable for memory sub-module with STL
35
D13551
RS " !
*! - ! . /
0!! 1 2 0 $
1!/ !
# $ RS $% &'()
+, +#,
', +,
#& ( #
%/ ((
*
l ! " !"*$+ &
!"#$ % & ' '
& RS ($$
l
36
#$ " #%
!"#$+ l
l
l
l
# #% # # "
# &&#'() *
+
+ "
)
D13551
4.3 PG710-1 PC programmer and case
RS Technical specifications
" & ( ) +, ( + . (
(- 4 !5
2&'(6&
. 4 7 2
& 8(1 $ 0!0
;"
!
#$ #%
' #%
*
$- !
$$ /$ 0
00 $ "1 $2.3
$! 2"
2"
$2"
7)
4 ,
9 0 : 9 The PG710 is a small, lightweight, programmer
independent of the mains. It is light and easy to handle,
like a laptop and still offers full AT compatibility. With
the suitable software it can be used to carry out
programming, testing and starting up the S5-90U,
S5-95U and S5-100U PLCs.
Programs can be written using the MS-DOS-based
software packages supplied by (not included) or
the Siemens S5-DOS STEP-5 ladder programming
language supplied with the programmer.
Features include
l
l
l
l
l
l
l
l
l
l
l
Central unit with 16 bit microprocessor 80C286 with
12MHz clock frequency
1 Mbyte of RAM
Hard-disk drive with 20Mbyte memory capacity
(average access time 23ms)
High density 31 2in diskette drive
LC display 10 x 22cm/4 x 8.8in, 640 x 200 pixel
resolution, 8 (grey levels)
Keyboard with function keys for S5 functions
EPROM/EEPROM programming device
1 parallel interface (Centronics) for the printer
1 serial interface (V.24/RS232C and 20mA current
loop) for PLC or printer
1 serial interface (V.24/RS232C) for mouse, modem
or printer
Power supply via NiCd accumulator.
/
37
D13551
4.4 SIMATIC PLC programming software
and PC interface cable
RS ! "
#$ %
& ' % ( ) &
Features include
l
l
'( )( %
$* ) & +,-+.
l l !
) (
l !
% /' l 012$ ! )(
l '
l 3 ( 4
l '1$"2''1$" l ( l # (
l 5 6) % &
) 7. !+,
8
( 9&
!
38
) l l :1 2 1 4 ( l 8 )(9 8 ) & +,--
) (9
; ) & +,-- < < (&
" ! 6
l 3="¨ > ? l +@A ( 10" (
l !
l !$" 8
9 $*
!
l 8
9 8 ) & +,-- ) (9
l # ( :1/2 1/4 %&
¨1
) 3="&
/
/
D13551
4.5 Off-line program adaptor
4.6 OP393 II operator panel
RS !
"# " " $% &"
# ""
"' "" ("
" ) *+$,$ " " ! " , -
( , . " /"
" 0 $ W 1
"2 "
"" "" "( ( ) /$ 30
" *+$,$ " /45. *450
" ""
! " " " ! + "" / "' %67 0 $7
#. 8"' / "' % ,7%0
RS %. 5 ( / "' $67%% 0
2 " # " " (
,$
" "" " #
+ /+0 " " . (
( " " 9" ! " !# $"
3 ( : ;#
" "
" '#
, " "" "" # ( Features include
l
l
l
l
l
l
l
$ . "" " #
3# . " +" " 1 # "(9
5# ,$. "" "'
: ;#
" " "
'#
-" '# "" /,0
%" &"
!! '( )) ,
Pin
Signal
"
"
Pin
Signal
!
!
#$%&
#$%&
!"# $% !" ³& ' ( ) $
39
D13551
RS ! "! (
* !
* ! !
!
( ! !( !
""# $% &'$%
)$% &$%
+ ! !
' 40
D13551
4.7 OP393 II operator panel mounting frame
RS The mounting frame enables the operator panel to be
panel mounted.
Dimensions of the mounting frame:
Panel cutout dimensions with mounting frame:
214mm high, 135mm wide.
Panel cutout dimensions without mounting frame:
There are two mounting threads on the lower
part of the back of the operator panel. These accept M4
screws, maximum length 8mm - not supplied.
41
D13551
5. PROGRAMMING
5.1 Basics
¨ ! !
! "
l # $
l # %
!
& '& l () *
+ , (,+$
l (- -
! &
! ) ' + . ./ %
! ! Programming formats:
l
./&011,
( *23 *23 2'
')+ !
! l !
! ! % ! % %
( . . ! % +
Programming structure
l
l
42
(
+ 4 ! ' % !
&
" ! $ ! # * ! "! Cyclic operation of a PLC
, # ("! +
* %
! %
# 5 Í A Input/Output cycle
B ÍC Program scan
B ÍA Scan time
D
Programmers and their main features
l
4 6 3 '& . #$(&'
4 l
7 3 ' '&
. ¨ ! !
l )
' '&
. *% * #$%&'
D13551
5.2 Converting a schematic circuit diagram
into a statement list (STL) program
!
#
$
!$ %!$ &
!
"
#
$ %& "
#
'! %&!
#
' !!
" #!$ %!$
&
%& ()
"
%&* ! + ** ! () , !
, () **, !
%& , ! - "
! "
!
"
#
' .(
+/!0
.(
+/!
.1
23!0
*
* #
< ' (
- ! 4
#
', +/!0 , +/!
23!0 !
%-5()
( () 6 & &()6 7 8%(5#5 95-(-5 :(, ; ())++!
! ( #
<, l , + +%=, 2 =%=!
l , ! # , , 4!
Operation
Explanation
! "#$
43
D13551
!" #
Operand
In terfaces from the process to the PLC
Q (OUTPUTS)
In terfaces from the PLC to p rocess
F (FLAGS)
Mem ories for in term ed iate results of binary
operations
Mem ories for in term ed iate results of d igital
Explanation
I (INPUTS)
D (DATA )
operations
T (TIMERS)
Mem ories for implem en tin g tim ers
C (COUNTERS)
Mem ories for im plem en tin g coun ters
P (I/O)
In terface from the process to the PLC
(add ressing of the interrupt bus unit)
K (CONSTANTS)
OP, PB SB, FB ,
Defin ed n um erical values
Tools for progr am structuring
DB (BLOCKS)
5.3 Programming examples
$ # %
&'( )* &+) ) +) (* 5.3.2 OR operation
n o ch ange
%
&'( (* &+) +) * 44
%
+) ( '( ) +) ( #
# %
,
+) ) -
# !
&* . &* /# # +) 0 '( 1 '( 1 # +) 1
+ +) 0 +) 1 #2 '( 1
& #* # # 3 AI0.7
RQ1.7
AI0.7
SQ1.7
'( 1 # #
D13551
5.3.5 Timer operations and applications
Overview
Operation
#
”
’
“
Operands
Functional description
Solution
!" %% RS ! Example: $
! On delay timer
' (#! + ) , *&*
Solution
Base
Factor "#$ #$ % &
! Off delay timer
' (##! $ ) # Tolerances
Note. ' Timer applications
! Pulse timer (SP)
' (&! )$&! *&*
*&* % % #$
5.3.6 Counter operations
Overview
Solution
Solution
! Extended pulse timer
' (#&! & ) & *&*
Operation
Operands
S
R
CU
CD
}
C0 to C15
CPU 100
C0 to C31
CPU 102
C0 to C127
CPU 103
Functional description
Set counter to initial value
Reset counter to zero
Count up
Count down
45
D13551
A counter can be loaded with a constant or variable
value, eg. a data word, input word, output word or flag
word - refer to user manual ( stock no. 628-333) for
comprehensive details.
loading a constant count value
! "#
A I1.7
l
In the example, the AND condition is
satisfied at each signal change from Ô0Õ to Ô1Õ
(leading edge) at input I1.7
AN F4.0
=F2.0
A I1.7
=F4.0
l
Flags F4.0 and IF2.0 are set.
l
At the next scanning cycle of the
programmable controller, the intermediate
flag F4.0 is set so that the AND condition for
l
l
AI1.7 and AN F4.0 is not satisfied.
Flag F2.0 is set.
Flag 2.0 therefore only has the Ô1Õ signal
state during the first program scan shen
input I1.7 switches from Ô0Õ to Ô1Õ
Counter applications
a) A counter is set to the value 7 when input I4.1 is closed.
Output Q2.5 is '1'. Each time input I4.0 is switched on
(count down input), the count is decremented by 1.
The output is switched off when the count reaches 0.
The pulse edge is used to create a pulse which remains
high for 1 scan of the PLC program and is initiated by
the rising edge of an input.
The pulse may be used to initiate the latching of
outputs, flags (internal relays) etc.
$ %& ' b) When input I4.0 is switched on, the count is
incremented by 1. As long as a second input (I4.2) is '1',
the count is reset to '0'. The A C1 operation results in a
'1' signal at output Q2.4 as long as the count has a value
not equal to zero.
46
(with internal timer)
)*
.
)
*
)
*
!&&
!
!
01
01
01
01
! " "
#$ %
' '" " '$' ( %
" +&, "(
% '$' ' " -
!" "" % %
( ' %-( !
%/% " - " $ %
'
% &2& " 01
" '
# " % %-( (
% " " -' "
( " 3
% "%/''4( 5
D13551
!"
This example shows how two timers can be used to
These
generate
a
operating system and the control program. They are
mark/space ratio that is variable depending on the
called by the operating system in response to definite
values of Timer 1 and Timer 2.
events within the PLC. They can also be called by the
an
oscillating
output
signal
having
blocks
act as
the interface
between
the
control program by means of a 'block call'.
&!
( &
( +
,
-
! 1 10 " "" # "$%
" ' "
"" # "$% )
' *
/
Organisation blocks are available for the following
applications:
l
l
l
l
l
l
Cyclic program processing - OB1
Time controlled program processing - OB13 (CPU
103 only)
Restart - OB21 and OB22
Battery failure - OB34
Scan time setting - OB31 (CPU 103 only)
PID control algorithm - OB251 (CPU 103 only).
!
!
! When the end of the block
is reached (BE), a
program jump is made back to the beginning of the
program. In OB1 the user defines the order in which
A pulsed or oscillating output with a mark/space
ratio of 1:1 can simply be generated using one timer.
Longer
time periods, ie. >999 seconds can be
achieved by cascading timers, or counters and timers.
individual blocks are to be scanned.
!# ## These blocks determine the behaviour
of the PLC prior to the first program scan. OB21 is
scanned once at the transition from the 'stop' to the 'run'
mode. OB22 is scanned once on the 'power up' if the
PLC was in the 'run' mode before it was switched off.
!
5.4 Programming concepts
Two different types of programming can be processed
within the PLC.
l
l
This block determines how the PLC reacts in
response to 'battery' failure. The operating system
continually checks the battery voltage. If a battery
failure is detected OB34 may be used to produce an
Linear programming and
external indicator.
Structured programming.
Both techniques involve the concept of 'blocks' of
program within a main program body.
l
l
l
Organisation blocks (OBs)
Program blocks (PBs)
Function blocks (FBs)
(PG 615 display represented)
#
$
#
$
&
*
*
*
# # #
+
#
$
+
+
+
%
%
%
#
$
#
$
! !!" ! !!" #
% ! !!" $
# ! !!" $ ! !!" #
% ! !!" $
' (""(!" ' (""(! ")"
(""( '( (""( '( (""( '( ' ,-" (""( # (" . /0. (""( $
' 47
D13551
! " # " $
% $ %
No. of possible
program blocks
CPU100
CPU102
CPU103
PB 0 to 63
PB 0 to 63
PB 0 to 255
"# % ! ! % % "
" / 1 $ #
% "+ !
%
&'"( $ % $ %
)*+", -
Display
Explanation
I f input 0.0 is on
jump to marker 1
on rising edge of I0.1.
Load
5 10
/
of
a second
into on-delay timer 1.
End block unconditionally
on rising edge of l0.2.
Load 5 seconds
into on-delay timer 1.
End of block.
# #(( .. )/- #(( 0 )- parameterised ) 1 ! ! % &'"((
&'"(2
No. of possible
function blocks
CPU100
CPU102
CPU103
FB 0 to 63
FB 0 to 63 Fb 0 to 255
!
3 " )"- % 1 /
% )2 - %% % % .! ! "
4
48
! !
% % ! 6. TYPICAL PLC APPLICATIONS
6.1 Control application
1 % % $" 3& ! %
%&' ' D13551
The PLC's task is to initially move the box transport
mechanism (lower conveyor) until the first box is
directly underneath the upper conveyor. The PLC is
then to start the upper conveyor and when 4 items fall
into the box, the upper conveyor stops, and the lower
conveyor moves until the next box is directly once
again beneath the upper conveyor.
This process is to continue until the system is either
turned off by the emergency stop switch or the PLC
stops processing.
To simplify the example the START/STOP button has
been replaced by an EMERGENCY stop switch.
Note. In the interest of safety, if the emergency stop
switch is latched and then unlatched, the conveyors will
stop and can only be restarted with a reset of the CPU,
assuming the emergency stop is in its unlatched
position, ie. normally closed.
In order to program the PLC for controlling this system
all inputs and outputs used must be assigned.
In this example the following connections are chosen:
Before programming it is useful to draw a block
diagram to represent the detailed system's operation
and then convert this into a statement list (STL)
program.
For the conveyor system the block diagram is shown
below.
When the PLC is switched on and the CPU switched
into run, a pulse (F0.0) is generated which resets the
counter and starts the lower conveyor (Q1.1). The
nature of this application dictates that if one conveyor is
'ON' the other is 'OFF' and . The use of the
counter output (Q1.0) for one conveyor and the
inversed counter output (Q1.1) for the other conveyor
guarantees that both conveyors can never be on at the
same time. Once the box is detected by PCI (I0.0) the
counter is set to 4 and the upper conveyor (Q1.0)
switches 'ON' and thus switches 'OFF' the lower
conveyor (Q1.1). The counter output remains 'ON'
whilst the count value is not equal to zero. PC2 (I0.1)
detects items falling into the box and counts down the
counter. When 4 items have dropped the counter
output 'switches off' ie. the upper conveyor (Q1.0)
stops and the lower conveyor (Q1.1) starts again, thus
enabling the cycle to be repeated.
The block diagram can now be converted into a
statement list program as listed.
For reasons of safety, ÔEmergency stopÕ
buttons must always, wherever possible, be additionally
hard wired outside of the PLC.
Important.
49
D13551
Display
OB21 "
#
Explanation
$
!
$ OB22 "
'
!
% & !
#
$
$ OB1 (
*
)
' " )+ , "
%
.
!
'
%
.
&,
(
(
)
' " $ , 0
# & 1!
$
* , &
"
- '
!
/
(
&,
/
PB1 , ! #
$
+! $ (
%
"
%
'
/
(
(
5
.
&, $
(
*
7
8
9
"
'
% !
4 ! 5 6
"
! &! "
(
5
.
!
$
(
*
! ;
#
$
"
&, ! !
$ ! "
#
"$
% & # '(3 '% $ " ! $
" & # ) *( (()
$
" "
+ ,(- &$ + ,(- # $ ,*%/0$
. 50
2,+ "
&
-
*
4 ! :3
() ($
#
#$ 2 #
! % ! 3
(
23 $ 1
2 !
/
,(- ( '(3$ " $
)
1 # 2,( "
+ 9 !" # !" $%" %%"' ( ( 3
)"' ( ( 3
+ (",
. /
"0" 1'" 2,
)' / 1 23" %
4(5"'
6/6 2 )'" 5'"7
6/6 2 7 24
/ 8
8 /
0"'1 2 23" %
4(5"' 9 4(5"'
& 9 / :
. /
;4 "0" ( 3
9 : <
, 5 = 41">
9 / 1 04" "1 "3
""
???? !1 2, 5$" 41"
9 / . / /
9 04" 2 2, )' /
. / /
" 9 04" @. '12"' 4%4
8
2 %','( 5
7
D13551
7. TABLE OF INSTRUCTIONS
The following table contains the main instructions associated with the 100, 102 and 103 CPU units within the
RS Siematic PLC system. For further detail and guidance refer to the 'user manual' supplied with each CPU
and available separately (RS stock no. 628-333).
Basic operations
!
!
#
#
"
+
% ! & % (&&& & && ' )&* !
% (&&& & && ' )&* %& &&
l l l
l l
l l l
l l l
l l l
"
l l
"
l l
$
l l
'
'
*
!" # $ % &'( $) ,
./
1/
-
)
"#
+
.3
"#
13
+
78
l l l
l l l
l l l
& && ) - 0.. - 0.1 0.. 2
/- %%4 '& $5"*
/- 6 %%4 '& 5*
0.1 2
/- %%4 '& $5"*
/- 6 %%4 '& 5*
- Í
Í
Í
Í
51
D13551
'
#
()
!*
'-
#
.
!(
'
.(
!#
/0
"
"
&
!"#$
% &"$
"+ $ + , Í
Í
+"+ $ + , + ' !"#$
% &"$
1 + 2
1 + 1
Í
Í
+ 2
1 + 1
!"#$
% &"$
Í
/
"
"
&
3
#.
#)
" $ 34
#
* +
455 $ 3
#
6"1 $ 37
#
+6 $ 38
#
1
$ 30
#
*" $ Í
39
#
'$ 3
#
$ l l
&:
)
$ l l
*#
)
#.
'$ :1 ;
9
5
#
#
9
+ 1 + /55$
9
<
#.
#
9
+ 1 + /5<$
9
5
#(
9
<
#
9
0
##
#
9
.
9
+ !"#$ &"$ % 9
'
#(
(
#
9
+ "+ $
Í
Í
Í
Í
9
+ 1 + /55$
!"#$ &"$ % 9
+ 1 + /5<$
!"#$ &"$ % 9
+ Í
Í
9
'-
#
((
!
9
+ +"+ $
9
'
#)
(
!
9
+ 9
/0
"
"
&
9
/
"
"
&
9
+ + 1
+ 2 1 9+ /5< 1
9
+ + 1
+ 2 1 9+ /5< 1
52
4/
l
*#
.
.
4=
l
*#
.
.
4
1 $
4
6 1 +$
4-
l
*
#&
4
>?@> 44
l
*
#&
4
4
l
*#
.
..
4
>?> -
l
*
#
)
- >?@> D13551
!"#
! $%& ' ( ( %( !"#
! $% $ (
)& # ' ( ( *+
12
1
1+
2
2+
$( !"#
! $% ,(- & ! + .
) /0 ! ' ( ( $( !"#
! $% ,(- & ! ¹ .
) /0 ! ' ( ( $( !"#
! $% 3( )(& ! 1 .
) /0 ! ' ( ( $( !"#
! $% 3( )( ,(- & !
³ . ) /0 ! ' ( ( $( !"#
! $% - )(& !
2 . ) /0 ! 44 ' ( ( $( !"#
! $% - )( ,(- & !
£ . ) /0 ! ' ( ( #
#
#
#
!!
(- 8$ ( 3($ %-
9
!!
(- 8$ ( !
%-
9
!!
(- 8$ ( 3($ %-
9
!!
(- 8$ ( !
%-
9
0 ( (( %-
9
!!
(- 8$ ( , %-
9
!!
(- 8$ ( , %-
9
7:
7:
7:
7-
9 ;$!(!
( %-
9<
7-
9 . !!
(7-
9 . !!
(- ;(
% ! 3(!(!
%-
9<
=06
=06
=
(!
& (-- %!+
=
(!
& (-- %!+
>6
(!3 ?- ! $- > !! ! ! )
@>A ! l
l
l
l
#
5
5
5
5
5
5
67
7
67
7
7
7
7
7/
7/
7/
7/
7/
!-(? 3(!
(!
) 3($$!3 ! B( %-(9
-! %? (!(3 !-(? 3(!
(!
) 3($$!3 ! !) C ($ -! ;>/<
!-(? 3(!
(!
) 3($$!3 ! !) C - ?$ -
)( ;<
!-(? 3(!
(!
) 3($$!3 ! !) C -( !(3($ ;/<
!-(? 3(!
(!
) 3($$!3 !
>$!( 3$
53
D13551
! ! "
#
$
%
&
' &&( ) &&( *
+
,-+
- , &&( % &&.&& "
#
$
%
&
' &&( ) &&( *
+
,-+
- ! , &&( % &&.&& / "
$
%
&
' &&( ) &&( *
+
,-+
- 0/ ! , &&( % &&.&& l l l l l
l l l l l
l l l l l
l l l l l
1+ + ,,
+ ' + 7, +
% 3
'
- 7 *+ 8
% &&.&&
1+ + ,,
+ -+ ' + 7, +
% 3
'
- 7 *+ 8
% &&.&&
12"
3
%%%
456
%
)6
%
%
1!"
3
%%%
456
%
)6
%
%
:5
:5
:
::
::
:
:$
:$
:$
:$
4
1- !2 4
!- !2 4
- - !2 4
- 7, + !2 , $:
4>
0' .
, %
; !2 < + *+ ;!9% 9+ , *+ =;!&=
, , *
0' .
, % ;
;! 4>
1 ,% 9 &&( 9
9
9
9
9
9
1(
1(
!(
!(
l l
1
l l
1
l l
l l
9 ' , *
9 ' *
9 ' *
+ 9 ' , *
9 ' *
9 ' *
+ 1 ' ,
.
, *
1 ' ,
*
! ' .
, *
! ' ,
*
1
!
!
l l l
l l l
l l
l l l
;!
;!
13
54
l l
;
l l
;
l
D13551
l
!
)*
l l
l l
l l
" # $% % &
# '# $% % '# '
(( $% % ' '# ())( $% % ' '# -
-
-2
l l l l l
l l
l l l
+ #,# -
&
# /01 2
)
*21 *1 *- ,
.
33
-
&
# /* .5
-
, 6 *
*
6 7)1 781 791 701 71 71 7
.. ' *
6 /01 2 )
*21 *1 *- ,
-
$ 45..
)2
5
) ( ' ''##
2
4
5:
) $( ' ''##
6 ;4 < '
5
5
.
.
A
A
4
A
3
.
.F
.F
A
A
3
= =
=@
=
=C
=9
=
,' " '%
'
,' " '%
'
,' " '%
'
,' " '%
'
,' " '%
'
,' " '%
'
,' " '%
'
'
># ,' ># ,' ? -41 =# # (4(6 % ># 4 44
% - '%
B
=# # ¹ (4(6 % ># ¹ 4
% - '%
B
=# # D 46 % ># 44
% - '%
B
=# # E46 % ># 4 4
% - '%
B
=# &$6 % ># % <!)-2 , % - '%
B
?
*
?
*
*
, #6 %
/ 'B ,'G
!
, #6 '
' % ' ?
*' % $ , , 4 3 , % &
# 4 5..
?' % $ , , 4 3 , % &
# 4 5..
C' % ,'G
*/1 = C/1 = )/ = / '
, #,#
55
D13551
! # " $% $&% % &'
(% ()% "'
*% % +'
,-% ,)% ,.% ,&% ,% ,/% ,% *(% *'
"% "% *"% *"%
*"% **" *0"%
% 1'
)% )% *)% ))%
)-)'
)2
*-
*
*
34
34
* # 5 5
# 5 5
(
86 $))- ' $))- 9: 5 5 #5 $))- " 86 $)) ' 9 $))- 9: 5 5 #5 $))- (1
67
"1
67
"&2
+6<<<977
"
*
;!
<
83!
<:
47!
<
2
= #5 #5 #5 8# #5 6 977: 4
" 5 ,2
34
,)
2
-
#
= )
#
= ,-
;
$5 > #
= 8 ;9<4?3 !;9<4?4:
73
6
$ #5 8
#: $ 8
: 77
2
7
7
9;;
$
$
2&
@
1
*"*
"$@
A
0 < " # # *
* 9
A #
=
An Electrocomponents Company
56
!
" # $%& !