CPU Memory: Data Types and Addressing Modes
Using Constant Values
You can use a constant value in many of the S7-200 instructions. Constants can
be bytes, words, or double words. The CPU stores all constants as binary
numbers, which can then be represented in decimal, hexadecimal, ASCII or
floating point formats.
Decimal Format:
Hexadecimal Format:
ASCII Format:
Real or Floating-Point Format:
The binary format is in the form of:
The S7-200 CPU does not support "data typing" or data checking (such as
specifying that the constant is stored as an integer, a signed integer, or a double
integer). For example, an Add instruction can use the value in VW100 as a signed
integer value, while an Exclusive Or instruction can use the same value in VW100
as an unsigned binary value.
The following examples show constants for decimal, hexadecimal, ASCII, and
floating point format:
Decimal constant:
Hexadecimal constant:
ASCII constant:
Real or floating-point format:
Binary format
5-12
[decimal value]
16#[hexadecimal value]
'[ASCII text]'
ANSI/IEEE 754-1985
2#1010_0101_1010_0101
20047
16#4E4F
'Text goes between single
quotes.'
+1.175495E-38 (positive)
-1.175495E-38 (negative)
2#1010_0101_1010_0101
S7-200 Programmable Controller System Manual
A5E00066097-02