quanser.hardware.hil.watchdog_set_other_expiration_state quanser.hardware.hil.watchdog_reload navigation bar

Table of Contents

quanser.hardware.hil.watchdog_start

Starts the watchdog timer.

Syntax

err = board.watchdog_start(timeout)
    

Description

Starts the watchdog timer, programming it with the given timeout interval. If the watchdog is allowed to expire, then it will set the board's outputs to the expiration states specified by the watchdog_set_expiration_xxxx_state functions. Furthermore, it will disable the outputs of the board until the "watchdog state" is clear using the watchdog_clear function.

To prevent the watchdog timer from expiring, call the watchdog_reload function.

The watchdog timer must be stopped using the watchdog_stop function prior to closing the board.

If no err output is provided then it throws an exception if an error occurs. In generated code it prints the error message. Use hil_get_error_message to get the message associated with an error code.

Parameters

board

The board instance returned by the quanser.hardware.hil.open function.

timeout

The timeout interval for the watchdog timer, in seconds. The range of timeouts supported depends on the board. Some boards have a very limited set of timeout intervals available.

Select a board type from the list for board-specific details: .

Outputs

err

A negative error code or zero on success.

Examples

% Configures the watchdog to expire every 0.1 seconds and starts it running
board.watchdog_start(0.1);
    

See Also

 

navigation bar