Siemens Simatic S7-200 System Manual page 135

Programmable controller
Hide thumbs Also See for Simatic S7-200:
Table of Contents

Advertisement

T3
Timer number (bit address)
Area identifier (timer)
I2.1
T2
Figure 7-3
Addressing the Counter (C) Memory Area
In the S7-200 CPU, counters are devices that count each low-to-high transition event on the
counter input(s). The CPU provides two types of counters: one type counts up only, and the
other counts both up and down. There are two variables that are associated with a counter:
Current value: this 16-bit signed integer stores the accumulated count.
Counter bit: this bit turns on (is set to 1) when the current value of the counter is greater
than or equal to the preset value. (The preset value is entered as part of the counter
instruction.)
You access both of these variables by using the counter address (C + counter number).
Access to either the counter bit or the current value is dependent on the instruction used:
instructions with bit operands access the counter bit, while instructions with word operands
access the current value. As shown in Figure 7-4, the Normally Open Contact instruction
accesses the counter bit, while the Move Word (MOV_W) instruction accesses the current
value of the counter. For more information about the S7-200 instruction set, refer to
Chapter 10.
Format:
C3
I2.1
C2
Figure 7-4
S7-200 Programmable Controller System Manual
C79000-G7076-C230-02
CPU Memory: Data Types and Addressing Modes
MOV_W
MSB
15
EN
IN
OUT
VW200
Timer number
(current value address)
Area identifier (timer)
Accessing the Timer Data
C [counter number]
Counter number (bit address)
Area identifier (counter)
MOV_W
MSB
EN
IN
OUT
VW200
Counter number
(current value address)
Area identifier (counter)
Accessing the Counter Data
Current Value
Timer Bits (Read/Write)
T0
T1
T2
T3
Current Value of the Timer
(Read/Write)
T0
T1
T2
T3
Current Value
C0
C1
C2
C3
Current Value
(Read/Write)
15
C0
C1
C2
C3
T0
T1
T2
T3
LSB
Timer Bits
0
T0
T1
T2
T3
C20
Counter Bits
(Read/Write)
C0
C1
C2
C3
Counter
LSB
Bits
0
C0
C1
C2
C3
7-5

Advertisement

Table of Contents
loading

Table of Contents