Specifications
CPU Memory: Data Types and Addressing Modes
5-12
S7-200 Programmable Controller System Manual
C79000-G7076-C233-01
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: [decimal value]
Hexadecimal Format: 16#[hexadecimal value]
ASCII Format: .’[ASCII text]’
Real or Floating-Point Format: ANSI/IEEE 754-1985
The binary format is in the form of: 2#1010_0101_1010_0101
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: 20047
Hexadecimal constant: 16#4E4F
ASCII constant: ’Text goes between single
quotes.’
Real or floating-point format: +1.175495E-38 (positive)
-1.175495E-38 (negative)
Binary format 2#1010_0101_1010_0101