Siemens Simatic S7-200 System Manual page 136

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

Advertisement

CPU Memory: Data Types and Addressing Modes
Addressing the Analog Inputs (AI)
The S7-200 converts a real-world, analog value (such as temperature or voltage) into a
word-length (16-bit) digital value. You access these values by the area identifier (AI), size of
the data (W), and the starting byte address. Since analog inputs are words and always start
on even-number bytes (such as 0, 2, or 4), you access them with even-number byte
addresses (such as AIW0, AIW2, or AIW4), as shown in Figure 7-5. Analog input values are
read-only values.
Format:
MSB
15
AIW8
Most significant byte
Figure 7-5
Addressing the Analog Outputs (AQ)
The S7-200 converts a word-length (16-bit) digital value into a current or voltage,
proportional to the digital value (such as for a current or voltage). You write these values by
the area identifier (AQ), size of the data (W), and the starting byte address. Since analog
outputs are words and always start on even-number bytes (such as 0, 2, or 4), you write
them with even-number byte addresses (such as AQW0, AQW2, or AQW4), as shown in
Figure 7-6. Your program cannot read the values of the analog outputs.
Format:
MSB
15
AQW10
Most significant byte
Figure 7-6
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 7-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 10.14 for information about using the accumulators with interrupt routines.
7-6
AIW [starting byte address]
8
7
byte 8
byte 9
Least significant byte
Accessing an Analog Input
AQW [starting byte address]
8
7
byte 10
byte 11
Least significant byte
Accessing an Analog Output
AC [accumulator number]
AI W 8
LSB
Byte address
0
Access to a word-size value
Area identifier (analog input)
AQ W 10
LSB
Byte address
0
Access to a word-size value
Area identifier (analog output)
S7-200 Programmable Controller System Manual
C79000-G7076-C230-02
AIW4
AQW4
AC0

Advertisement

Table of Contents
loading

Table of Contents