S5-100U
STEP 5 Operations
8.5
Sample Programs
Sections 8.5.1 through 8.5.3 provide a few sample programs that you can enter and test in all three
methods of representation on a programmer.
8.5.1
Momentary-Contact Relay/Edge Evaluation
F 2.0
F 64.0
S
R
Q
LAD
Circuit Diagram
STL
CSF
Example
A
I
0.0
AN
F
64.0
=
F
2.0
S
F
64.0
AN
I
0.0
R
F
64.0
NOP 0
I 0.0
F 2.0
I 0.0
&
(#)
I 0.0
F 64.0
F 64.0
F 64.0
F 2.0
(#)
I 0.0
I 0.0
F 64.0
S
R
Q
On each leading edge of the signal at input I 0.0, the AND
condition “A I 0.0 and AN F 64.0” is satisfied; the RLO is “1”.
This sets flags F 64.0 and F 2.0 (“edge flags”).
In the next processing cycle, the AND condition “A I 0.0 and
AN F 64.0” is not satisfied since flag F 64.0 has already been
set.
Flag 2.0 is reset.
Therefore, flag F 2.0 is “1” for only one program run.
When input I 0.0 is switched off, flag F 64.0 is reset.
This resetting prepares the way for evaluation of the next
leading edge of the signal at input I 0.0.
F 2.0
I 0.0
8.5.2
Binary Scaler/Binary Divider
This section describes how to program a binary scaler.
Example:
The binary scaler (output Q 1.0) changes its state each time I 0.0 changes its signal
state from “0” to “1” (leading edge). Therefore, half the input frequency appears at the
output of the flip-flop.
EWA 4NEB 812 6120-02b
8-71
Содержание SIMATIC S5-100U
Страница 6: ...EWA 4NEB 812 6120 02b ...
Страница 16: ...EWA 4NEB 812 6120 02b ...
Страница 21: ...1 The SIMATIC S5 System Family EWA 4NEB 812 6120 02b ...
Страница 22: ...Figures 1 1 Members of the SIMATIC S5 System Family 1 1 EWA 4NEB 812 6120 02b ...
Страница 23: ......
Страница 27: ......
Страница 36: ...EWA 4NEB 812 6120 02b ...
Страница 40: ......
Страница 41: ......
Страница 42: ......
Страница 43: ......
Страница 48: ......
Страница 49: ......
Страница 50: ......
Страница 102: ...EWA 4NEB 812 6120 02b ...
Страница 156: ...EWA 4NEB 812 6120 02b ...
Страница 232: ...EWA 4NEB 812 6120 02b ...
Страница 268: ...EWA 4NEB 812 6120 02b ...
Страница 272: ...EWA 4NEB 812 6120 02b ...
Страница 336: ...EWA 4NEB 812 6120 02b ...
Страница 352: ...EWA 4NEB 812 6120 02b ...
Страница 412: ...EWA 4NEB 812 6120 02b ...
Страница 482: ...EWA 4NEB 812 6120 02b ...
Страница 484: ...EWA 4NEB 812 6120 02b ...
Страница 505: ...B Dimension Drawings EWA 4NEB 812 6120 02b ...
Страница 515: ...C Active and Passive Faults in Automation Equipment EWA 4NEB 812 6120 02b ...
Страница 516: ...EWA 4NEB 812 6120 02b ...
Страница 522: ...EWA 4NEB 812 6120 02b ...
Страница 523: ...D Information for Ordering Accessories EWA 4NEB 812 6120 02b ...
Страница 524: ...EWA 4NEB 812 6120 02b ...
Страница 530: ...EWA 4NEB 812 6120 02b ...
Страница 531: ...E Reference Materials EWA 4NEB 812 6120 02b ...
Страница 532: ...EWA 4NEB 812 6120 02b ...
Страница 534: ...EWA 4NEB 812 6120 02b ...
Страница 535: ...F Siemens Addresses Worldwide EWA 4NEB 812 6120 02b ...
Страница 536: ...EWA 4NEB 812 6120 02b ...
Страница 542: ...EWA 4NEB 812 6120 02b ...
Страница 543: ...Index EWA 4NEB 812 6120 02b ...
Страница 544: ...EWA 4NEB 812 6120 02b ...
Страница 550: ...EWA 4NEB 812 6120 02b ...