Addressing The Accumulators (Ac) - Siemens SIMATIC S7-200 System Manual

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

Advertisement

CPU Memory: Data Types and Addressing Modes

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:
Note
See Section 9.15, SIMATIC Communications Instructions, in Chapter 9 for
information about using the accumulators with interrupt routines.
AC2
AC1
AC3
Figure 5-7
5-10
AC [accumulator number]
MOV_B
EN
ENO
IN
OUT
VB200
Accumulator number
Area identifier (Accumulator)
DEC_W
EN
ENO
IN
OUT
VW100
Accumulator number
Area identifier (Accumulator)
MSB
INV_D
31
EN
ENO
Most significant
Byte 3
IN
OUT
VD250
Accumulator number
Area identifier (Accumulator)
Addressing the Accumulators
AC2 (accessed as a byte)
MSB
15
Most significant
Byte 1
AC1 (accessed as a word)
24
23
16
15
Byte 2
Byte 1
AC3 (accessed as a double word)
S7-200 Programmable Controller System Manual
AC0
MSB
LSB
7
0
LSB
8
7
0
Least significant
Byte 0
LSB
8
7
0
Least significant
Byte 0
A5E00066097-02

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents