FC_C2CDataCopy - General Information

Overview

Type:

Function

Available as of:

SystemInterface_1.32.6.0

Versions:

Current version

Task

Consistent copy of data exchanged from C2C data input and output objects.

Description

If ST_LogicalAddress is of the type C2C_DATA_IN, i_uiDataLen bytes are copied from the object to the structure existing at i_dwPointerToData.

If ST_LogicalAddress is of the type C2C_DATA_OUT, i_uiDataLen bytes are copied from the structure existing at i_dwPointerToData to the object.

Interface

Syntax:
iStatus = FC_C2CDataCopy (C2C_DataIn.stLogicalAddress, ADR(stC2CData), SIZEOF(stC2CData))

Input

Data type

Description

i_stLogAddr

ST_LogicalAddress

Logical address of the data object.

i_dwPointerToData

DWORD

Pointer to memory filled with i_uiDataLen bytes.

i_uiDataLen

UINT

Length in bytes that are to be read.

Return Value

Data type

Description

DINTs

0: OK

-1: Invalid data object / stLogicalAddress

-2: Size mismatch

-3: Size too large

-4: Data pointer invalid (0)

-5: Real-time data address not set