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...
Basic instructions
8.6 Move operations
S7-1200 Programmable controller
272 System Manual, V4.2, 09/2016, A5E02486680-AK
8.6.3
Serialize
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
LAD / FBD
SCL
Description
ret_val := Serialize(
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
Parameter
Type
Data type
Description
SRC_VARIABLE IN Variant PLC data type (UDT) that is
to be converted to a serial
representation
DEST_ARRAY INOUT Variant Data block in which the gen-
erated data stream is to be
stored
POS INOUT DInt Number of bytes that the
converted PLC data types
use. The calculated POS
parameter is zero-based.
RET_VAL
OUT
Int
Error information

Table of Contents

Other manuals for Siemens SIMATIC S7-1200

Related product manuals