39
©Vecow
User Manual
Appendix B
B
APPENDIX B : Software Functions
B.1 Driver API Guide
In Runtime folder, on RES1K.h :
_DLL_IMPORT_ definition is used on LoadLibrary API for RES1K.dll.
RES1K_EXPORTS definition is used on RES1K.dll building.
BOOL Initial (BYTE Isolate_Type, BYTE DIO_NPN)
Initial machine for DIO, watchdog timer, and POE
Isolate_Type
: DIO type
1 : Isolated DIO;
0 : Non-Isolated DIO
DIO_NPN : DI/DO type
1 : PNP (Source) mode for European rule;
0 : NPN (Sink) mode for Japanese rule
Return :
TRUE (1) : Success;
FALSE (0) : Fail (Driver not exists, or initial error (version is too old, or
machine not match))
BOOL GetWDT (DWORD *WDT)
Get watchdog timer setup
WDT : watchdog timer setup
Unit : second. (Range
: 0 ~ 65535 sec, 1093 ~ 65535 min (=65580 ~
3932100 sec))
Return
:
TRUE (1)
: Success;
FALSE (0)
: Fail (Initial error, or call by pointer error, or hardware problem)
BOOL SetWDT (DWORD WDT)
Set watchdog timer setup
WDT : watchdog timer setup
Unit : second. (Range : 1 ~ 65535 sec, 1093 ~ 65535 min (=65580 ~
3932100 sec))
Return :
TRUE (1) : Success;
FALSE (0) : Fail (Initial error, or setup 0 error, or hardware problem)
BOOL CancelWDT ()
Cancel watchdog timer
Return
:
TRUE (1) : Success;
FALSE (0) : Fail (Initial error, or hardware problem)