SysTimerCreateCallback2 (FUN)

FUNCTION SysTimerCreateCallback2 : RTS_IEC_HANDLE

<description>This function creates a timer and calls a callback function.</description> <result><p>RESULT: Handle of the timer or RTS_INVALID_HANDLE if failed</p></result>

InOut:

Scope

Name

Type

Comment

Return

SysTimerCreateCallback2

RTS_IEC_HANDLE

Input

pfTimerCallback

PFTIMERCALLBACK

<param name=”pfTimerCallback” type=”IN”>Pointer to a callback function</param>

hParam

RTS_IEC_HANDLE

<param name=”hParam” type=”IN”>Parameter for callback routine</param>

tIntervalNs

SYSTIME

<param name=”tIntervalNs” type=”IN”>Interval of the timer (timebase = 1 ns)</param>

ulPriority

UDINT

<param name=”ulPriority” type=”IN”>Priority of the timer object</param>

ulType

UDINT

<param name=”ulType” type=”IN”>Timer type. See corresponding category.</param>

pfExceptionHandler

PFTIMEREXCEPTIONHANDLER

<param name=”pfExceptionHandler” type=”IN”>Pointer to an optional exception handler. Can be NULL.</param>

pResult

POINTER TO RTS_IEC_RESULT

<param name=”pResult” type=”OUT”>Pointer to runtime system error code (see CmpErrors.library)</param>