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__XWORDReturn value of the called function.
Input
pPOUFuncCAA.PVOIDPointer to function to call
dwParam1__XWORDprameter 1
dwParam2__XWORDprameter 2
dwParam3__XWORDprameter 3
peErrorPOINTER TO ERROR