Basic instructions
8.6 Move operations
S7-1200 Programmable controller
System Manual, V4.2, 09/2016, A5E02486680-AK
285
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
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
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
1 No error Instruction copied the tag data pointed to by
0 Enable input EN has the signal state "0" or the data types
Instruction copied no data.