Documentos de Académico
Documentos de Profesional
Documentos de Cultura
STEP 7
Keyword Length (in bits) Constants Variables
BOOL 1 1 or 0 I 1.0
BYTE 8 B#16#A9 MB70
WORD 16 W#16#12AF MW72
DWORD 32 DW#16#ADAC1EF5 QD40
CHAR 8 'w' DBB4
Display formats:
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
numbers
2
+2 1 9 x 16 =144
+2 2 x 16
2
= 512
+ 662 662
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
+2 11 10 x 16 =10
numbers 1
6 x 16 = 96
+2 10 2
8 6
+2 +2 +2 5 13 x 16 = 3328
3 1
Representation as +2 +2 +2 3
15 x 16 = 61440
Twos complement - 662 64874
Double Integer (DINT, 32-Bit
Integer) Data Type
Value range L# -2147483648 to L#+2147483647 Operations: such as, + D, * D, <D, ==D
(without sign: 0 to 4294967295)
Display formats:
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Sign
positive
numbers
HEX: DW#16# 0 0 0 8 4 0 8 9
(without sign)
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Sign
negative
numbers
Example: 0.75
Sign of
Real no. e = Exponent (8 Bit) f = Mantissa (23 Bit)
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
16 0
0 0 1 1 1 1 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
27 26 25 24 23 22 21 20 2-1 2-2 2-3 2- 2-23
4
.....