0% found this document useful (1 vote)
43 views

27.3.2 Elementary Data Types: $SSHQGL ('Dwd7/Shvdqg3Dudphwhu7/Shv

The document lists and describes the elementary data types in STEP 7 programming. It includes: - Boolean (BIT), byte, word, double word, integer (INT), floating point number (REAL), SIMATIC time (S5TIME), IEC time (TIME), IEC date (DATE), and time of day (TIME_OF_DAY) data types. - The size in bits and valid value ranges for each data type. - Examples of how to declare variables of each data type using the appropriate format and notation.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (1 vote)
43 views

27.3.2 Elementary Data Types: $SSHQGL ('Dwd7/Shvdqg3Dudphwhu7/Shv

The document lists and describes the elementary data types in STEP 7 programming. It includes: - Boolean (BIT), byte, word, double word, integer (INT), floating point number (REAL), SIMATIC time (S5TIME), IEC time (TIME), IEC date (DATE), and time of day (TIME_OF_DAY) data types. - The size in bits and valid value ranges for each data type. - Examples of how to declare variables of each data type using the appropriate format and notation.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1



27.3.2

$SSHQGL[
'DWD7\SHVDQG3DUDPHWHU7\SHV

Elementary Data Types


Each elementary data type has a defined length. The following table lists the elementary data
types.
Type and
Description

Size in Format Options


Bits

Range and Number Notation


(lowest to highest value)_

Example

BOOL(Bit)

Boolean text

TRUE/FALSE

TRUE

BYTE
(Byte)

Hexadecimal
number

B#16#0 to B#16#FF

L B#16#10
L byte#16#10

WORD

16

Binary number

2#0 to

L 2#0001_0000_0000_0000

2#1111_1111_1111_1111

(Word)
Hexadecimal
number
BCD

W#16#0 to W#16#FFFF

L word#16#1000
C#0 to C#999

L C#998

B#(0.0) to B#(255.255)

L B#(10,20)

Decimal number
unsigned
DWORD

32

Binary number

(Double
word)

INT

Decimal number
unsigned

B#(0,0,0,0) to

L B#(1, 14, 100, 120)

B#(255,255,255,255)

L byte#(1,14,100,120)

16

Decimal number
signed

-32768 to 32767

L1

32

Decimal number
signed

L#-2147483648 to L#2147483647 L L#1

32

IEEE

Upper limit: r3.402823e+38

Floating-point
number

Lower limit: r1.175 495e-38

L 1.234567e+13

S7 time in

S5T#0H_0M_0S_10MS to

L S5T#0H_1M_0S_0MS

S5T#2H_46M_30S_0MS and

10 ms (default)

S5T#0H_0M_0S_0MS

L
S5TIME#0H_1H_1M_0S_0MS

IEC time in steps


of 1 ms, integer
signed

T#-24D_20H_31M_23S_648MS
to

16

IEC date in steps


of 1 day

D#1990-1-1 to

L D#1996-3-15

D#2168-12-31

L DATE#1996-3-15

32

Time in steps of
1 ms

TOD#0:0:0.0 to

L TOD#1:10:3.3

TOD#23:59:59.999

L TIME_OF_DAY#1:10:3.3

32

(IEC date)
TIME_OF_D
AY (Time)

L dword#16#00A2_1234

steps of

16

(IEC time)
DATE

1011_1011_0111_1111
L DW#16#00A2_1234

(SIMATIC
time)
TIME

2#1000_0001_0001_1000_

2#1111_1111_1111_1111
DW#16#0000_0000 to
DW#16#FFFF_FFFF

(Floatingpoint
number)
S5TIME

2#0 to
1111_1111_1111_1111

(Integer,
32 bits)
REAL

L byte#(10,20)

Hexadecimal
number

(Integer)
DINT

L W#16#1000

3URJUDPPLQJZLWK67(3
0DQXDO$(

L T#0D_1H_1M_0S_0MS
L TIME#0D_1H_1M_0S_0MS

T#24D_20H_31M_23S_647MS



You might also like