CallFunctionByIndex (FUN)

FUNCTION CallFunctionByIndex : __XWORD

This function calls a function specified by their POU index keep in mind, that the called function is subject to a number of limitations:

  • its name must begin with “Callback”

  • its output value must be a DWORD on 32 bit and a LWORD on 64 bit systems. This can be achieved by using __XWORD.

  • it must have exactly 3 input values with a data size of 4 bytes each on 32 bit and 8 bytes each on 64 bit systems. This can be achieved by using __XWORD.

InOut:

Scope

Name

Type

Comment

Return

CallFunctionByIndex

__XWORD

Return value of the called function.

Input

pPOUFunc

CAA.PVOID

Pointer to function to call

dwParam1

__XWORD

prameter 1

dwParam2

__XWORD

prameter 2

dwParam3

__XWORD

prameter 3

peError

POINTER TO ERROR