Siemens SIMATIC S5-95F Manual page 206

Table of Contents

Advertisement

STEP 5 Operations
Loading a Count as an Input, Output, Flag, or Data Word
Load statement:
The count 410 is stored in data word DW3 in BCD code.
Bits 12 to 15 are insignificant for the count.
15
11
0 1 0 0
Scanning the Counter
Use Boolean logic operations to scan the counter status (e.g., A Cx). As long as the count is not
zero, the scan result is signal state "1".
Output of the Current Counter Status
You can use a load operation to put the current counter status into ACCU 1 and process it further
from there. The "Load in BCD" operation outputs a digital display (see Figure 8-5).
L C2
Indicates bit positions occupied by
Figure 8-5. Output of the Current Counter Status (Example)
8-26
L
DW
3
0 0 0 1
Three-digit count
(in BCD code)
Current Counter Status in C2
Binary count
"
"
0
.
0
Bit
0 0 0 0
DW3
ACCU
1
S5-95F
LD C2
Three-digit count in
BCD code
EWA 4NEB 812 6210-02

Advertisement

Table of Contents
loading

Table of Contents