Data blocks and instance blocks
- Last UpdatedJul 29, 2024
- 4 minute read
The following table summarizes the data format, item or point, suffix, data type, and range for Data Blocks and Instance Blocks. See the S7-1200 and S7-1500 sections in this documentation for specific item naming conventions and/or limitations for those controllers.
|
Data Format |
Item/Point |
Suffix |
Data Type |
Range |
|
Bit |
D<B,I>d,Xx.y |
VT_BOOL |
0 or 1 |
|
|
String |
D<B,I>d,Sx,v D<B,I>d,STRINGx,v |
VT_BSTR VT_BSTR |
String String |
|
|
S7String |
D<B,I>d,S7Sx,w D<B,I>d,S7STRINGx,w |
VT_BSTR VT_BSTR |
String String |
|
|
Byte |
D<B,I>d,Bx D<B,I>d,BYTEx |
DT |
VT_UI1 VT_UI1 VT_BSTR |
0 to 255 0 to 255 1990-1-1-0:00:00.000 to 2089-12-31-23:59:59.999*** |
|
Byte Array |
D<B,I>d,Bx,v D<B,I>d,BYTEx,v |
VT_ARRAY|VT_UI1 VT_ARRAY|VT_UI1 |
0 to 255 for each element* 0 to 255 for each element* |
|
|
USINT |
D<B,I>d,USINTx |
DT |
VT_UI1 VT_BSTR |
0 to 255 1990-1-1-0:00:00.000 to 2089-12-31-23:59:59.999*** |
|
USINT Array |
D<B,I>d,USINTx,v |
VT_ARRAY|VT_UI1 |
0 to 255 for each element* |
|
|
Char |
D<B,I>d,CHARx |
DT |
VT_I1 VT_BSTR |
-128 to 127 1990-1-1-0:00:00.000 to 2089-12-31-23:59:59.999*** |
|
Char Array |
D<B,I>d,CHARx,v |
VT_ARRAY|VT_UI1 |
-128 to 127 for each element* |
|
|
SINT |
D<B,I>d,SINTx |
DT |
VT_I1 VT_BSTR |
-128 to 127 1990-1-1-0:00:00.000 to 2089-12-31-23:59:59.999*** |
|
SINT Array |
D<B,I>dSINTx,v |
VT_ARRAY|VT_UI1 |
-128 to 127 for each element* |
|
|
Word |
D<B,I>d,Wn D<B,I>d,WORDn |
BCD KT S5T TR D |
VT_UI2 VT_UI2 VT_UI2 VT_BSTR VT_BSTR VT_R4 VT_BSTR |
0 to 65535 0 to 65535 0 to 9999*** 0.0 to 999.3*** 0ms to 2h46m30s0ms*** 0.0 to 9990.0 (s)*** 1990-1-1 to 2168-12-31 |
|
Word Array |
D<B,I>d,Wn,v D<B,I>d,WORDn,v |
VT_ARRAY|VT_UI2 VT_ARRAY|VT_UI2 |
0 to 65535 for each element* 0 to 65535 for each element* |
|
|
UINT |
D<B,I>d,UINTn |
BCD KT S5T TR D |
VT_UI2 VT_UI2 VT_BSTR VT_BSTR VT_R4 VT_BSTR |
0 to 65535 0 to 9999*** 0.0 to 999.3*** 0ms to 2h46m30s0ms*** 0.0 to 9990.0 (s)*** 1990-1-1 to 2168-12-31 |
|
UINT Array |
D<B,I>d,UINTn,v |
VT_ARRAY|VT_UI2 |
0 to 65535 for each element* |
|
|
Integer |
D<B,I>d,INTn |
BCD D |
VT_I2 VT_I2 VT_BSTR |
-32768 to 32767 -999 to 999*** 1990-1-1 to 2168-12-31 |
|
Integer Array |
D<B,I>d,INTn,v |
VT_ARRAY|VT_UI1 |
-32768 to 32767 for each element* |
|
|
Double Word |
D<B,I>d,Dm D<B,I>d,DWORDm |
BCD TOD T |
VT_UI4 VT_UI4 VT_UI4 VT_BSTR VT_BSTR |
0 to 4294967295** 0 to 4294967295** 0 to 99999999*** 0:00:00.000 to 23:59:59.999 -24D_20H_31M_23S_648MS to 24D_20H_31M_23S_647MS |
|
Double Word Array |
D<B,I>d,Dm,v D<B,I>d,DWORDm,v |
VT_ARRAY|VT_UI4 VT_ARRAY|VT_UI4 |
0 to 4294967295 for each element* 0 to 4294967295 for each element* |
|
|
UDINT |
D<B,I>d,UDINTm |
BCD TOD T |
VT_UI4 VT_UI4 VT_BSTR VT_BSTR |
0 to 4294967295** 0 to 99999999*** 0:00:00.000 to 23:59:59.999 -24D_20H_31M_23S_648MS to 24D_20H_31M_23S_647MS |
|
UDINT Array |
D<B,I>d,UDINTm,v |
VT_ARRAY|VT_UI4 |
0 to 4294967295 for each element* |
|
|
Double Integer |
D<B,I>d,DINTm |
BCD TOD T |
VT_I4 VT_I4 VT_BSTR VT_BSTR |
-2147483648 to 2147483647 -9999999 to 9999999*** 0:00:00.000 to 23:59:59.999 -24D_20H_31M_23S_648MS to 24D_20H_31M_23S_647MS |
|
Double Integer Array |
D<B,I>d,DINTm,v |
VT_ARRAY|VT_I4 |
-2147483648 to 2147483647 for each element* |
|
|
Real |
D<B,I>d,REALm |
VT_R4 |
+/-1.2e-38 to +/-3.4e+38 |
|
|
Real Array |
D<B,I>d,REALm,v |
VT_ARRAY|VT_R4 |
+/-1.2e-38 to +/-3.4e+38 for each element* |
*: For DDE/SuiteLink, the item value is the Hex ASCIi representation of the complete array. The result is one string containing all the elements of the array in the Hex ASCIi representation of the binary data in big endian format when data is returned to the DDE/SuiteLink layer.
**: For DDE/SuiteLink, this value is restricted to the range of 0 to 2147483647. Values higher than that are clamped to the maximum value of 2147483647 in a SuiteLink or DDE client. In this case, the quality of the item shows "Clamp High."
***: The Communication Driver provides suffixes (S5T, TR, DT, KT, and BCD) that are used to interpret raw bytes as having a special data format. Review the PLC processor documentation, as not all processors have ladder logic internally to interpret those data formats the same way (for example, the S7-1200 PLC).
Where:
|
d |
is the data block number, with a range from 1 to 65535. |
|
x |
is the start address, with a range from 0 to 65535. |
|
y |
is the bit position, with a range from 0 to 7. 0 is the LSB (Least Significant Bit). 7 is the MSB (Most Significant Bit). |
|
n |
is the start address of 2-byte data/2-byte data arrays. |
|
m |
is the start address of 4-byte data/4-byte data arrays. |
|
v |
is the length of data in elements (an item in an array), with a range from 0 to 65534. |
|
w |
is the length of the net S7 string data in characters (size in S7 message is w+1, size of string representation in S7 PLC is w+2). |
Note: All data blocks are Read/Write. The longest string or array that can be read in a cyclic service has the length of the PDU size minus 32 bytes. The longest string the InTouch software can process is 131 bytes. The longest string that can be poked is 256 bytes or the PDU size minus 28 bytes, whichever is less. The Communication Driver processes a write (POKE) to a Data Block.
Examples for S7-300/400/1200/1500 PLCs:
DB123,W24
DB23,DINT10BCD
DI5,X2.0
DI6,BYTE4,10