Siemens SIMATIC S7-200 System Manual page 46

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

Advertisement

S7-200 Programmable Controller System Manual
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). Analog output values are write-only values.
Format:
Sequence Control Relay (SCR) Memory Area: S
SCRs or S bits are used to organize machine operations or steps into equivalent program
segments. SCRs allow logical segmentation of the control program. You can access the S bits as
bits, bytes, words, or double words.
Bit:
Byte, Word, or Double Word:
Format for Real Numbers
Real (or floating-point) numbers are represented as 32-bit, single-precision numbers, whose
format is described in the ANSI/IEEE 754--1985 standard. See Figure 4-9. Real numbers are
accessed in double-word lengths.
For the S7-200, floating point numbers are
accurate up to 6 decimal places. Therefore,
you can specify a maximum of 6 decimal
places when entering a floating-point
p
constant.
t
t
Accuracy when Calculating Real Numbers
Calculations that involve a long series of values including very large and very small numbers can
produce inaccurate results. This can occur if the numbers differ by 10 to the power of x,
where x > 6.
For example:
Format for Strings
A string is a sequence of characters, with each character being stored as a byte. The first byte of
the string defines the length of the string, which is the number of characters. Figure 4-10 shows
the format for a string. A string can have a length of 0 to 254 characters, plus the length byte, so
the maximum length for a string is 255 bytes. A string constant is limited to 126 bytes.
Length
Byte 0
Figure 4-10
Format for Strings
32
AQW[starting byte address]
S[byte address].[bit address]
S[size][starting byte address]
g
g p
100 000 000 + 1 = 100 000 000
Character 1
Character 2
Byte 1
Byte 2
MSB
31
30
23
22
S
Exponent
Sign
Figure 4-9
Format of a Real Number
Character 3
Character 4
Byte 3
Byte 4
AQW4
S3.1
SB4
LSB
0
Mantissa
...
Character 254
Byte 254

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents