EasyManua.ls Logo

Siemens SIMATIC S7-1200 - 8.6.9 Variant instructions; 8.6.9.1 VariantGet (Read VARIANT tag value)

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...
Basic instructions
8.6 Move operations
S7-1200 Programmable controller
System Manual, V4.2, 09/2016, A5E02486680-AK
285
8.6.9
Variant instructions
8.6.9.1
VariantGet (Read VARIANT tag value)
You can use the "Read out Variant tag value" instruction to read the value of the tag to which
the Variant pointer at the SRC parameter points and write it in the tag at the DST parameter.
The SRC parameter has the Variant data type. Any data type except for Variant can be
specified at the DST parameter.
The data type of the tag at the DST parameter must match the data type to which the Variant
points.
Table 8- 91 VariantGet instruction
LAD / FBD
SCL
Description
VariantGet(
SRC:=_variant_in_,
DST=>_variant_out_);
Reads the tag pointed to by the SRC parameter and writes it to
the tag at the DST parameter
Note
To copy structures and arrays, you can use the "MOVE_BLK_VARIANT: Move block"
instruction.
Table 8- 92 Parameters for the VariantGet instruction
Parameter
Data type
Description
SRC
Variant
Pointer to source data
DST Bit strings, integers, floating-point numbers, timers, date and
time, character strings, ARRAY elements, PLC data types
Destination at which to write data
Table 8- 93 ENO status
ENO
Condition
Result
1 No error Instruction copied the tag data pointed to by
SRC to the DST tag.
0 Enable input EN has the signal state "0" or the data types
do not correspond.
Instruction copied no data.

Table of Contents

Other manuals for Siemens SIMATIC S7-1200

Related product manuals