Siemens STEP 7 Item Syntax
Siemens STEP 7 Item Syntax
The following support for Siemens STEP 7 Variable Table (VAT) syntax is considered to be limited. Care must be taken as the data type for a given S7 data type/suffix may differ from the data type for the same S7 data type/suffix in the specified product. S7 data types not included below are not supported by this driver. The following information is intended to be a guideline for users that are already familiar with and/or prefer the syntax of the specified product. For preferred item syntax, refer to Standard S7-300/400/1200/1500 Item Syntax.
 
Address Syntax
Input, Output, Peripheral, Flag Memory Types
<memory type><S7 data type><address>
 
Timer and Counter Memory Types
<memory type><address>
 
DB Memory Type
DB<num>.<S7 data type><address>
 
where <num> ranges from 1 to 65535.
 
See Also: Examples
 
Memory Types
Memory Type
Description
Address Range
Data Type
Access
I
E
Inputs
Dependent on S7 Data Type
Read / Write
Q
A
Outputs
Read / Write
PI
PE
Peripheral Inputs
Read Only
PQ
PA
Peripheral Outputs
Read / Write
M
F
Flag Memory
Read / Write
DB
Data Blocks
Read / Write
T
Timers
T0-T65535
DWord, Long
Read / Write
C
Z
Counters
C0-C65535
Z0-Z65535
Word, Short
Read / Write
 
See Also: Examples
 
Accessing Structured Elements in STEP 7
For the Siemens S7-1200 model, STEP 7 accesses the Counter and Timer structured elements as complete whole structures instead of individual tags. For more information on the element offset and its server address equivalent, refer to the tables below.
 
Counters
 
Element
Data Type
Offset
Server Address Equivalent
Count_UP
Boolean
0.0
DB1,C00.0
Count_Down
Boolean
0.1
DB1,C00.1
Reset
Boolean
0.2
DB1,C00.2
Load
Boolean
0.3
DB1,C00.3
Q_UP
Boolean
0.4
DB1,C00.4
Q_Down
Boolean
0.5
DB1,C00.5
PAD
Byte
1.0
DB1,B1
Preset_Value
Short
2.0
DB1,I2
Count_Value
Short
4.0
DB1,I4
 
Timers
 
Element
Data Type
Offset
Server Address Equivalent
Start
DWord
0.0
DB1,D0
Preset
DWord
4.0
DB1,D4
Elapsed
DWord
8.0
DB1,D8
Running
Bool
12.0
DB1,DBX12.0
IN
Bool
12.1
DB1,DBX12.1
Q
Bool
12.2
DB1,DBX12.2
PAD
Byte
13.0
DB1,DBB13
PAD_2
Byte
14.0
DB1,DBB14
PAD_3
Byte
15.0
DB1,DBB15
 
For more information, refer to Standard S7-300/400/1200/1500 Item Syntax.
 
S7 Data Types
The S7 data type is used to coerce the data type for a tag. It does not apply to Counters and Timers. The default data types are shown in bold.
 
Data Type
Description
Address Range
Data Type
Suffix
Data Type w/ Suffix
None*
DBX**
Bit
0.b-65534.b
DBX0.b-DBX65534.b
.b is Bit Number 0-15
Boolean
 
 
B
DBB**
Unsigned Byte
B0-B65535
DBB0-DBB65535
Byte, Char
 
 
W
DBW**
Unsigned Word
W0-W65534
DBW0-DBW65534
Word, Short, BCD
 
 
D
DBD**
Unsigned
Double Word
D0-D65532
DBD0-DBD65532
DWord, Long, LBCD, Float
F
Float
 
*No S7 data type specified. Applies to non-DB memory types only.
**Applies to DB memory types only.
 
See Also: Examples
 
Examples
S7 Data Type
Data Type
Input
Flags
Data Blocks
None
DBX
Boolean
I0.7
----
M0.7
----
----
DB1.DBX0.7
B
DBB
Byte
IB0
----
MB0
----
----
DB1.DBB0
W
DBW
Word
IW0
----
MW0
----
----
DB1.DBW0
D
DBD
DWord
ID0
----
MD0
----
----
DB1.DBD0
 
All brand and product names are trademarks, registered trademarks, or service marks of their respective holders.
 
 Note: The offset for an atomic type tag in a data block is denoted by the column "Address" in Step 7, as shown above. This offset is denoted by the column "Offset" in the Siemens TIA Portal programming environment.
 
Was this helpful?