Sample Programs; Momentary-Contact Relay (Edge Evaluation); Binary Scaler (Binary Divider) - Siemens SIMATIC S5-90U System Manual

Table of Contents

Advertisement

S5-90U/S5-95U
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)

On each leading edge of the signal at input I 32.0, the AND
condition "A I32.0 and AN F 64.0" is satisfied; the RLO is
"1". This sets flags 64.0 and 2.0 ("edge flags").
In the next processing cycle, the AND condition "A I32.0 and
AN F 64.0" is not satisfied since flag 64.0 has already been
set.
Flag 2.0 is reset.
Therefore, flag 2.0 is "1" for only one program run.
When input 32.0 is switched off, flag 64.0 is reset.
This resetting prepares the way for evaluation of the next
leading edge of the signal at input 32.0.
STL
A
I
32.0
AN
F
64.0
=
F
2.0
S
F
64.0
AN
I
32.0
R
F
64.0
NOP
0
8.5.2

Binary Scaler (Binary Divider)

This section describes how to program a binary scaler.
Example: The binary scaler (output Q32.5) changes its state each time I32.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 6115-02b
Example
CSF
I32.0
&
F 2.0
F 64.0
(#)
I32.0
Circuit Diagram
I32.0
F 64.0
F 2.0
I32.0
F 64.0
F 64.0
S
I32.0
R Q
STEP 5 Operations
I32.0
F 2.0
LAD
F 2.0
F 64.0
(#)
S
R Q
8-71

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic s5-95u

Table of Contents