OnInitData

OnInitData 1:

Abstract event method for initializing the next record to be read. The derived implementation provides all the information needed for ADS read access and uses the return value to indicate whether another record should be processed.

Syntax

METHOD PROTECTED ABSTRACT OnInitData : BOOL
VAR_INPUT
  nDataSet       : UINT;
END_VAR
VAR_OUTPUT
  sSource_NetID  : T_AmsNetId;
  sSource_Symbol : T_MaxString;
  pTarget_Data   : PVOID;
  nTarget_Size   : UDINT;
  bParam         : BOOL;
  nParam         : INT;
END_VAR

OnInitData 2: Inputs

Name

Type

Description

nDataSet

UINT

Counter for the data record to be initialized.

OnInitData 3: Outputs

Name

Type

Description

sSource_NetID

T_AmsNetId

AMS Net ID of the ADS source.

sSource_Symbol

T_MaxString

Symbol name of the ADS value to be read.

pTarget_Data

PVOID

The destination address to which the read data is written.

nTarget_Size

UDINT

Size of the destination buffer in bytes.

bParam

BOOL

An optional parameter that is passed on to succeeding event methods.

nParam

INT

An optional numeric parameter that is passed to succeeding event methods.