Format For Real Numbers; Format For Strings - Siemens SIMATIC S7 System Manual

Hide thumbs Also See for SIMATIC S7:
Table of Contents

Advertisement

PLC concepts
4.2 Accessing data
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
Bit:
Byte, Word, or Double Word:
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
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
where
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
82
Absolute addressing of S memory
Format of a Real number
x
> 6. For example: 100 000 000 + 1 = 100 000 000
Format for strings
[byte address].[bit address]
S
[size][starting byte address]
S
System Manual, V2.3, 07/2017, A5E03822230-AF
S3.1
SB4,
SW7,
SD14
x
,
S7-200 SMART

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic s7-200 smart

Table of Contents