Counter Operations - Siemens SIMATIC S5-115U User Manual

Simatic s5 series cpu 941-7ub11 cpu 942-7ub11 cpu 943-7ub11 and cpu 943-7ub21 cpu 944-7ub11 and cpu 944-7ub21
Table of Contents

Advertisement

S5-115U Manual
8.1.5

Counter Operations

The CPU uses counter operations to handle counting jobs directly. Counters can count up and
down. The counting range is from 0 to 999 (three decades). Table 8-5 provides an overview of the
counter operations. Examples follow the table.
Operation
Operand
S
R
CU
CD
ID
C
Loading a Count
Counter operations call internal counters.
When a counter is set, the word in ACCUM 1 is used as a count. You must therefore first store
counts in the accumulator.
You can load a count with any of the following data types
KC
constant count
or
DW
data word
IW
input word
QW
output word
FW
flag word.
EWA 4NEB 811 6130-02b
Table 8-5. Overview of Counter Operations
Set Counter
The counter is set on the leading edge of the RLO.
Reset Counter
The counter is set to zero as long as the RLO is "1".
Count Up
The count is incremented by 1 on the leading edge of the RLO.
When the RLO is "0", the count is not affected.
Count Down
The count is decremented by 1 on the leading edge of the RLO.
When the RLO is "0", the count is not affected.
Parameter
0 to 127
The data for these words must
be in BCD code.
STEP 5 Operations
Meaning
8-25

Advertisement

Table of Contents
loading

Table of Contents