Syntax
INT is_Watchdog (HIDS hf, long lMode)
Description
is_Watchdog() controls the hardware watchdog. The watchdog is a timer which is switching a relay contact after a programmable time. To reboot the whole system connect the output of the watchdog with the reset pins of the PC. The application retriggers the watchdog in a programmable period (see also is_WatchdogTime()).
|
After an regular or irregular abort of the application the watchdog is still running and activates itself after the watchdog time which is set with the function is_WatchdogTime(). Disable the activation of the watchdog with lMode = IS_DISABLE_WATCHDOG. |
Parameters
hf |
Frame grabber handle |
lMode |
|
IS_DISABLE_WATCHDOG |
Hardware watchdog off |
IS_ENABLE_WATCHDOG |
Hardware watchdog on |
IS_RETRIGGER_WATCHDOG |
Activate retrigger |
IS_ENABLE_AUTO_DEACTIVATION |
Automatic deactivation of the watchdog in the case of regular or irregular abort of the board instance. Attention: That option should only be used in the case of debugging because it prevents the normal use of the watchdog. |
IS_DISABLE_AUTO_DEACTIVATION |
Default setting. The watchdog is always active, even if the board instance was aborted. |
IS_GET_WATCHDOG_ENABLE |
Returns the watchdog status |
Return value
Current setting when called with IS_GET_WATCHDOG_ENABLE, else IS_SUCCESS bzw. IS_NO_SUCCESS
Example
// Activates the watchdog after 2 minutes:
is_WatchdogTime(hf, 2);
is_Watchdog(hf, IS_ENABLE_WATCHDOG);
// Retrigger watchdog:
is_Watchdog(hf, IS_RETRIGGER_WATCHDOG);