Basic instructions
8.6 Move operations
S7-1200 Programmable controller
286 System Manual, V4.2, 09/2016, A5E02486680-AK
VariantPut (Write VARIANT tag value)
You can use the "Write VARIANT tag value" instruction to write the value of the tag at the
SRC parameter to the tag at the DST parameter to which the VARIANT points.
The DST parameter has the VARIANT data type. Any data type except for VARIANT can be
specified at the SRC parameter.
The data type of the tag at the SRC parameter must match the data type to which the
VARIANT points.
Table 8- 94 VariantPut instruction
VariantPut(
SRC:=_variant_in_,
DST=>_variant_in_);
Writes the tag referenced by the SRC parameter to the variant
pointed to by the DST parameter
Note
To copy structures and ARRAYs, you can use the "MOVE_BLK_VARIANT: Move block"
instruction.
Table 8- 95 Parameters for the VariantPut instruction
SRC Bit strings, integers, floating-point numbers, timers, date and
time, character strings, ARRAY elements, PLC data types
Pointer to source data
Destination at which to write data
Table 8- 96 ENO status
1 No error
Instruction copied the SRC tag data to the DST
tag.
0
Enable input EN has the signal state "0" or the data types
do not correspond.
Instruction copied no data.