
92
APROTECH GmbH
Rathsbergstrasse 17
90411 Nuremberg / Germany
Trade register:
Nuremberg HRB 23727
USt.-Id-No.: DE 256 058 089
D-U-N-S: 31-260-0530
phone: +49 911 / 65 00 79-50
fax:
+49 911 / 65 00 79-79
eMail: [email protected]
Web: www.aprotech.de
Managing Director:
Peter Jung
Industrial Panel- and Box-PCs
4. When programming your WDT or DIO program, the related files are located in
Header File
\Include
Library File
\Lib
Function Reference
\Manual
Sample Code
\Sample\WDT_Demo (Demo for Watchdog Timer)
\Sample\DIO_Demo (Demo for isolated DIO Control)
\Sample\COS_Demo (Demo for change-of-state DI)
Syntax
BOOL InitWDT(void);
Description
Initialize the WDT function. You should always invoke
InitWDT() before set or start watchdog timer.
Parameter
None
Return Value
TRUE:
Successfully initialized
FALSE:
Failed to initialize
Usage
BOOL bRet = InitWDT()
Syntax
BOOL SetWDT(WORD tick, BYTE unit);
Description
Set timeout value and unit for watchdog timer. When InitWDT()
is invoked, a default timeout value of 255 seconds is assigned.
Parameter
tick
WORD value (1 ~ 65535) to indicate timeout ticks.
unit
BYTE value (0 or 1) to indicate unit of timeout ticks.
0 : unit is minute
1: unit is second
Return Value
If value of unit is correct (0 or 1), this function returns TRUE,
otherwise FALSE.
Usage
WORD tick=255;
BYTE unit=1; //unit is second.
BOOL bRet = SetWDT(tick, unit); //timeout value is 255
seconds