-

UNPACK

Type Function block
Description The UNPACK function block re-converts the data applied to the SRC input/output (data converted to a proprietary data exchange format valid for all target systems with the PACK function block) to the data format required for the actual target system. The re-converted (unpacked) data are stored to the DST data buffer.

Data conversion is started with a rising edge at the REQ input. When the process is completed, the DONE output is set to TRUE. If an error occurs during execution, the ERROR output is set to TRUE. While ERROR = TRUE, the ERROR_ID output provides information on the cause of the error.

The conversion process runs in the background, i.e., the process is assigned to a background task.
Notes
  • The converted data are only valid if the DONE output is set to TRUE and the ERROR_ID output indicates the value '0'.
  • Function blocks have to be instantiated. The instance name of the function block has to be declared in the 'Variables' table of the POU where the FB is going to be used. The instance name must be unique within the POU.
Parameters Inputs

REQ

Input/Output

SRC

DST

Outputs

DONE

BUSY

ERROR

ERROR_ID
Error codes Error codes at the ERROR_ID output