TMR.CreateP (FUN)

This function of the CAA_Timer.libray largely corresponds to TMR.CreateH. The difference consists in creating the timer object based on a IEC data structure of size szMemSize, which is registered at start address pMemory. The size szMemSize can be determined by use of the function TMR.GetSize.

Input:

xCyclic

BOOL

FALSE: unique execution

TRUE: cyclic execution

ctInterval

CAA.COUNT

Interval of timer (in ns)

dwParam

DWORD

Parameter value for callback function

xHardware

BOOL

TRUE: Hardware timer

FALSE:Software timer

eTimer

CB.EVENT

Callback event 

szMemSize

CAA.SIZE

Size of area provided by IEC 

pMemory

CAA.PVOID

Start address of area provided by IEC  

peError

POINTER TO TMR.ERROR

Dereferencing the pointer will return the error number in case of error and TMR.NO_ERROR else. 

Output:

hTimer

CAA.HANDLE

Handle of  timer