EasyManua.ls Logo

Siemens SIMATIC S7-1200

Siemens SIMATIC S7-1200
1614 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
PLC concepts
5.4 Data types
S7-1200 Programmable controller
134 System Manual, V4.2, 09/2016, A5E02486680-AK
5.4.9
Variant pointer data type
The data type Variant can point to variables of different data types or parameters. The
Variant pointer can point to structures and individual structural components. The Variant
pointer does not occupy any space in memory.
Table 5- 40 Properties of the Variant pointer
Length
(Byte)
Representation
Format
Example entry
0 Symbolic
Operand
MyTag
DB_name.Struct_name.element_name MyDB.Struct1.pressure1
Absolute
Operand
%MW10
DB_number.Operand Type Length
P#DB10.DBX10.0 INT 12
5.4.10
Accessing a "slice" of a tagged data type
PLC tags and data block tags can be accessed at the bit, byte, or word level depending on
their size. The syntax for accessing such a data slice is as follows:
"<PLC tag name>".xn (bit access)
"<PLC tag name>".bn (byte access)
"<PLC tag name>".wn (word access)
"<Data block name>".<tag name>.xn (bit access)
"<Data block name>".<tag name>.bn (byte access)
"<Data block name>".<tag name>.wn (word access)
A double word-sized tag can be accessed by bits 0 - 31, bytes 0 - 3, or word 0 - 1. A word-
sized tag can be accessed by bits 0 - 15, bytes 0 - 1, or word 0. A byte-sized tag can be
accessed by bits 0 - 7, or byte 0. Bit, byte, and word slices can be used anywhere that bits,
bytes, or words are expected operands.

Table of Contents

Other manuals for Siemens SIMATIC S7-1200

Related product manuals