4.35 - Watchdog [U12 Datasheet]
Controls the LabJack watchdog function. When activated, the watchdog can change the states of digital I/O if the LabJack does not successfully communicate with the PC within a specified timeout period. This function could be used to reboot the PC allowing for reliable unattended operation.
The 32-bit counter (CNT) is disabled when the watchdog is enabled.
Execution time for this function is 20 milliseconds or less (typically 16 milliseconds in Windows).
If you set the watchdog to reset the LabJack, and choose too small of a timeout period, it might be difficult to make the device stop resetting. To disable the watchdog, reset the LabJack with IO0 shorted to STB, and then reset again without the short.
Declaration:
long Watchdog ( long *idnum,
long demo,
long active,
long timeout,
long reset,
long activeD0,
long activeD1,
long activeD8,
long stateD0,
long stateD1,
long stateD8 )
Parameter Description:
Returns: LabJack errorcodes or 0 for no error.
Inputs:
- *idnum – Local ID, serial number, or -1 for first found.
- demo – Send 0 for normal operation, >0 for demo mode. Demo mode allows this function to be called without a LabJack.
- active – Enables the LabJack watchdog function. If enabled, the 32-bit counter is disabled.
- timeout – Timer reset value in seconds (1-715).
- reset – If >0, the LabJack will reset on timeout.
- activeDn – If >0, Dn will be set to stateDn upon timeout.
- stateDn – Timeout state of Dn, 0=low, >0=high.
Outputs:
- *idnum – Returns the local ID or –1 if no LabJack is found.