Basic instructions
8.6 Move operations
S7-1200 Programmable controller
272 System Manual, V4.2, 09/2016, A5E02486680-AK
You can use the "Serialize" instruction to convert several PLC data types (UDTs) to a
sequential representation without any loss of structure.
You can use the instruction to temporarily save multiple structured data items from your
program to a buffer, for example to a global data block, and send them to another CPU. The
memory area in which the converted PLC data types are stored must have the ARRAY of
BYTE data type and be declared with standard access. Make sure that there is enough
memory space prior to the conversion.
The POS parameter contains information about the number of bytes that the converted PLC
data types use.
Note
If you only want to send a single PLC data type (UDT), you can us
e the instruction "TSEND:
Send data via communication connection".
Table 8- 77 SERIALIZE instruction
SRC_VARIABLE=>_variant_in_,
DEST_ARRAY:=_variant_out_,
POS:=_dint_inout_);
Converts a PLC data type
(UDT) to a sequential repre-
sentation.
Table 8- 78 Parameters for the SERIALIZE instruction
SRC_VARIABLE IN Variant PLC data type (UDT) that is
to be converted to a serial
DEST_ARRAY INOUT Variant Data block in which the gen-
erated data stream is to be
POS INOUT DInt Number of bytes that the
converted PLC data types
use. The calculated POS