
C-3
Ladder Logic (LAD) for S7-300 and S7-400
C79000-G7076-C504-02
Table C-2 Constant Formats for Elementary Data Types
Type and
Description
Size
in
Bits
Format Options Range and Number Notation
(Lowest Value to Highest Value)
Example
BOOL
(Bit)
1 Boolean text TRUE/FALSE TRUE
BYTE
(Byte)
8 Hexadecimal B#16#0 to B#16#FF B#16#10
byte#16#10
WORD
(Word)
16 Binary
Hexadecimal
BCD
Unsigned decimal
2#0 to
2#1111_1111_1111_1111
W#16#0 to W#16#FFFF
C#0 to C#999
B#(0,0) to B#(255,255)
2#0001_0000_0000_0000
W#16#1000
word16#1000
C#998
B#(10,20)
byte#(10,20)
DWORD
(Double
word)
32 Binary
Hexadecimal
Unsigned decimal
2#0 to
2#1111_1111_1111_1111_
1111_1111_1111_1111
DW#16#0000_0000 to
DW#16#FFFF_FFFF
B#(0,0,0,0) to
B#(255,255,255,255)
2#1000_0001_0001_1000_
1011_1011_0111_1111
DW#16#00A2_1234
dword#16#00A2_1234
B#(1,14,100,120)
byte#(1,14,100,120)
INT
(Integer)
16 Signed decimal -32768 to 32767 1
DINT
(Double
integer)
32 Signed decimal L#-2147483648 to L#2147483647 L#1
REAL
(Floating
point)
32 IEEE
floating point
Upper limit: ±3.402823e+38
Lower limit: ±1.175 495e-38 (see also
Table C-5)
1.234567e+13
S5TIME
(SIMATIC
time)
16 S5 Time in
10-ms units (as
default value)
S5T#0H_0M_0S_10MS to
S5T#2H_46M_30S_0MS and
S5T#0H_0M_0S_0MS
S5T#0H_1M_0S_0MS
S5TIME#0H_1M_0S_0MS
TIME
(IEC time)
32 IEC time in 1-ms
units, signed
integer
T#-24D_20H_31M_23S_648MS to
T#24D_20H_31M_23S_647MS
T#0D_1H_1M_0S_0MS
TIME#0D_1H_1M_0S_0MS
DATE
(IEC date)
16 IEC date
in 1-day units
D#1990-1-1 to
D#2168-12-31
D#1994-3-15
DATE#1994-3-15
TIME_OF_
DAY
(Time of
day)
32 Time of day in
1-ms units
TOD#0:0:0.0 to
TOD#23:59:59.999
TOD#1:10:3.3
TIME_OF_DAY#1:10:3.3
CHAR
(Character)
8 Character ’A’,’B’, and so on ’E’
An integer is a whole number that has a sign to indicate whether it is positive
or negative. In memory, a 16-bit integer takes up one word of space.
Table C-3 shows the range of a 16-bit integer. Figure C-1 shows the integer
+ 44 in binary format.
Integers: 16 Bits
Number Notation
Kommentare zu diesen Handbüchern