Specifications
CPU Memory: Data Types and Addressing Modes
5-10
S7-200 Programmable Controller System Manual
C79000-G7076-C233-01
Addressing the Accumulators (AC)
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 CPU provides four 32-bit
accumulators (AC0, AC1, AC2, and AC3). You can access the data in the
accumulators as bytes, words, or double words. As shown in Figure 5-7, to access
the accumulator as bytes or words you use the least significant 8 or 16 bits of the
value that is stored in the accumulator. To access the accumulator as a double
word, you use all 32 bits. The size of the data being accessed is determined by the
instruction that is used to access the accumulator.
Format: AC
[accumulator number]
AC0
Note
See Section 9.16, SIMATIC Communications Instructions, in Chapter 9 for
information about using the accumulators with interrupt routines.
MOV_B
EN
OUT VB200INAC2
MSB
70
LSB
DEC_W
EN
OUT VW100INAC1
15 0
LSB
INV_D
EN
OUT VD250INAC3
31
MSB
0
LSB
AC2 (accessed as a byte)
AC1 (accessed as a word)
AC3 (accessed as a double word)
MSB
Accumulator number
Area identifier (Accumulator)
Accumulator number
Area identifier (Accumulator)
Accumulator number
Area identifier (Accumulator)
78
7815162324
Least significantMost significant
Least significantMost significant
Byte 0Byte 1
Byte 0Byte 1Byte 2Byte 3
ENO
ENO
ENO
Figure 5-7 Addressing the Accumulators