Automation– and Drive Technology- SCE
Data in a data block must be determined through data types.
The following standard- data types are defined in the S7 below :
Type and | Size | Range and number notation | Example | |
description | in Bits |
| (lowest to highest values) |
|
|
|
| ||
BOOL (Bit) | 1 | Boolean text | TRUE/FALSE | TRUE |
BYTE (Byte) | 8 | Hexadecimal | B#16#0 to B#16#FF | B#16#10 |
|
| number |
|
|
WORD (Word) | 16 | Binary number | 2#0 to 2#1111_1111_1111_1111 | 2#0001_0000_0000_0000 |
|
|
|
|
|
|
| Hexadecimal | W#16#0 to W#16#FFFF | W#16#1000 |
|
| number |
|
|
|
| BCD | C#0 to C#999 | C#998 |
|
|
|
|
|
|
| Decimal number | B#(0,0) to B#(255,255) | B#(10,20) |
|
| unsigned |
|
|
DWORD (Double | 32 | Binary number | 2#0 to | 2#1000_0001_0001_1000_1 |
word) |
|
| 2#1111_1111_1111_1111_1111_1111 | 011_1011_0111_1111 |
|
|
| _1111_1111 |
|
|
|
|
|
|
|
| Hexadecimal | DW#16#0000_0000 to | DW#16#00A2_1234 |
|
| number | DW#16#FFFF_FFFF |
|
|
| Decimal number | B#(0,0,0,0) to B#(255,255,255,255) | B#(1,14,100,120) |
|
| unsigned |
|
|
INT (Integer) | 16 | Decimal number | 1 | |
|
| signed |
|
|
|
|
|
|
|
DINT (Int,32 bit) | 32 | Decimal number | L#1 | |
|
| signed |
|
|
REAL (Floating- | 32 | IEEE | Upper limit: | 1.234567e+13 |
point number) |
| number | Lower limit: |
|
|
|
|
|
|
S5TIME | 16 | S5T#0H_0M_0S_10MS to | S5T#0H_1M_0S_0MS | |
| 10 ms | S5T#2H_46M_30S_0MS and | S5TIME#1H_1M_0S_0MS | |
|
|
| S5T#0H_0M_0S_0MS |
|
|
|
|
|
|
TIME | 32 | T#0D_1H_1M_0S_0MS | ||
| from 1ms, integer | T#24D_20H_31M_23S_647MS | TIME#0D_1H_1M_0S_0MS | |
|
| signed |
|
|
|
|
|
|
|
DATE | 16 | |||
| of 1 day |
|
| |
TIME_OF_DAY | 32 | Time in steps of | TOD#0:0:0.0 to TOD#23:59:59.999 | TIME_OF_DAY#1:10:3.3 |
(Time) |
| 1ms |
|
|
CHAR (Character) | 8 | ´A´, ´B´ etc. | ´B´ |
|
|
|
|
|
Forward | Notes | Generating data blocks |
|
|
|
|
|
|
|
T I A Training document | Page 14 of 18 |
| Module B4 | |
Last revision: 02/2002 |
|
| Data blocks |