SysTimer Library Documentation ¶ Company System Title SysTimer Version 3.5.17.0 Categories System|SysLibs Author 3S - Smart Software Solutions GmbH Placeholder SysTimer Description 1 ¶ Interface functions for system timers. Contents: ¶ PFTIMERCALLBACK (Alias) PFTIMEREXCEPTIONHANDLER (Alias) SysTimerCreateCallback (Function) SysTimerCreateCallback2 (Function) SysTimerCreateEvent (Function) SysTimerDelete (Function) SysTimerGetInterval (Function) SysTimerGetTimeStamp (Function) SysTimerMaxTimer (Function) SysTimerSetInterval (Function) SysTimerStart (Function) SysTimerStop (Function) TimerType (GVL) Indices and tables ¶ 1 Based on SysTimer.library, last modified 20.04.2021, 16:11:59. LibDoc 4.4.0.0-b.27 The content file SysTimer.clean.json was generated with CODESYS V3.5 SP16 Patch 3 on 20.04.2021, 16:11:59.
PFTIMEREXCEPTIONHANDLER (ALIAS) ¶ TYPE PFTIMEREXCEPTIONHANDLER : POINTER TO BYTE
PFTIMERCALLBACK (ALIAS) ¶ TYPE PFTIMERCALLBACK : POINTER TO BYTE
SysTimerCreateCallback (FUN) ¶ FUNCTION SysTimerCreateCallback : RTS_IEC_HANDLE <description>This function creates a new 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 SysTimerCreateCallback 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> 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>
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>
SysTimerCreateEvent (FUN) ¶ FUNCTION SysTimerCreateEvent : RTS_IEC_HANDLE <description>This function creates a new timer and sets an event at timer elapsed.</description> <result>Handle of the timer or RTS_INVALID_HANDLE</result> InOut: Scope Name Type Comment Return SysTimerCreateEvent RTS_IEC_HANDLE Input hEvent RTS_IEC_HANDLE <param name=”hEvent” type=”IN”>Handle to the event that is sent after the interval expires</param> tIntervalNs SYSTIME <param name=”tIntervalNs” type=”IN”>Period of the timer (timebase = 1 ns)</param> ulPriority UDINT <param name=”ulPriority” type=”IN”>Priority of the timer object</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>
SysTimerDelete (FUN) ¶ FUNCTION SysTimerDelete : RTS_IEC_RESULT <description>This function deletes a timer</description> <result><p>RESULT: Returns the runtime system error code (see CmpErrors.library).</p></result> InOut: Scope Name Type Comment Return SysTimerDelete RTS_IEC_RESULT Input hTimer RTS_IEC_HANDLE <param name=”hTimer” type=”IN”>Handle of the timer</param>
SysTimerGetInterval (FUN) ¶ FUNCTION SysTimerGetInterval : RTS_IEC_RESULT <description>Returns the interval of a timer</description> <result><p>RESULT: Returns the runtime system error code (see CmpErrors.library).</p></result> InOut: Scope Name Type Comment Return SysTimerGetInterval RTS_IEC_RESULT Input hTimer RTS_IEC_HANDLE <param name=”hTimer” type=”IN”>Handle of the timer</param> ptIntervalNs POINTER TO SYSTIME <param name=”ptIntervalNs” type=”OUT”>Interval of the timer in nanoseconds</param>
SysTimerGetTimeStamp (FUN) ¶ FUNCTION SysTimerGetTimeStamp : RTS_IEC_RESULT <description>This function returns the timestamp in ticks since timer start</description> <result><p>RESULT: Returns the runtime system error code (see CmpErrors.library).</p></result> InOut: Scope Name Type Comment Return SysTimerGetTimeStamp RTS_IEC_RESULT Input hTimer RTS_IEC_HANDLE <param name=”hTimer” type=”IN”>Handle of the timer</param> ptTimestampNs POINTER TO SYSTIME <param name=”ptTimestampNs” type=”out”>Timestamp in nanoseconds</param>
SysTimerSetInterval (FUN) ¶ FUNCTION SysTimerSetInterval : RTS_IEC_RESULT <description>This function returns the interval of a timer</description> <result><p>RESULT: Returns the runtime system error code (see CmpErrors.library).</p></result> InOut: Scope Name Type Comment Return SysTimerSetInterval RTS_IEC_RESULT Input hTimer RTS_IEC_HANDLE <param name=”hTimer” type=”IN”>Handle of the timer</param> tIntervalNs SYSTIME <param name=”tIntervalNs” type=”IN”>Interval of the timer in nanoseconds</param>