Siemens Simatic S7-200 System Manual page 39

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

Advertisement

High-Speed Counters: HC
The high-speed counters count high-speed events independent of the CPU scan. High-speed counters
have a signed, 32-bit integer counting value (or current value). To access the count value for the
high-speed counter, you specify the address of the high-speed counter, using the memory type (HC) and
the counter number (such as HC0). The current value of the high-speed counter is a read-only value and
can be addressed only as a double word (32 bits).
Format:
Accumulators: AC
The accumulators are read/write devices that can be used like memory. For example, you can use
accumulators to pass parameters to and from subroutines and to store intermediate values used in a
calculation. The S7-200 provides four 32-bit accumulators (AC0, AC1, AC2, and AC3). You can access
the data in the accumulators as bytes, words, or double words.
The size of the data being accessed is determined by the instruction that is used to access the
accumulator. As shown in Figure 4-7, you use the least significant 8 or 16 bits of the value that is stored in
the accumulator to access the accumulator as bytes or words. To access the accumulator as a double
word, you use all 32 bits.
For information about how to use the accumulators within interrupt subroutines, refer to the Interrupt
Instructions in Chapter 6.
Format:
Figure 4-7
Accessing the Accumulators
HC[high–speed counter number]
AC[accumulator number]
AC2 (accessed as a byte)
AC1 (accessed as a word)
AC3 (accessed as a double word)
MSB
31
24
23
Most significant
Byte 3
Byte 2
PLC Concepts
Chapter 4
HC1
AC0
MSB
7
MSB
15
8
7
Most significant
Least significant
Byte 1
Byte 0
LSB
16
15
8
7
Least significant
Byte 1
Byte 0
4
LSB
0
LSB
0
0
27

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents