EasyManua.ls Logo

Siemens SIMATIC S7-200 - Addressing the Accumulators (AC)

Siemens SIMATIC S7-200
606 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
CPU Memory: Data Types and Addressing Modes
5-10
S7-200 Programmable Controller System Manual
A5E00066097-02
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.15, 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

Table of Contents

Other manuals for Siemens SIMATIC S7-200

Related product manuals