PLC concepts
4.2 Accessing data
S7-200 SMART
82
System Manual, V2.3, 07/2017, A5E03822230-AF
S (sequence control relay)
S bits are associated with SCRs, which you can use to organize machine or steps into
equivalent program segments. SCRs allow logical segmentation of the control program. You
can access the S memory as bits, bytes, words, or double words.
Table 4- 16 Absolute addressing of S memory
Bit:
S
[byte address].[bit address]
S3.1
Byte, Word, or Double Word:
S
[size][starting byte address]
SB4,
SW7,
SD14
4.2.2
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. Real numbers are accessed in
double-word lengths.
Figure 4-5
Format of a Real number
Note
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 constant.
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: 100 000 000 + 1 = 100 000 000
4.2.3
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. The
following figure 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.
Figure 4-6
Format for strings