quanser.hardware.hil.watchdog_start quanser.hardware.hil.watchdog_is_expired navigation bar

Table of Contents

quanser.hardware.hil.watchdog_reload

Reloads the watchdog timer.

Syntax

[is_expired, err] = board.watchdog_reload
    

Description

Reloads the watchdog timer. The watchdog timer will be restarted with the timeout interval programmed in the call to watchdog_start.

If the watchdog had already expired before this function was called then it returns is_expired equal to true. Otherwise it returns false.

Once the watchdog expires, outputs on the board is disabled. To re-enable outputs, invoke the watchdog_clear function.

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.

Outputs

is_expired

Indicates whether the watchdog timer had already expired before being reloaded. This output is true if the watchdog had already expired and false otherwise.

err

A negative error code or zero on success.

Examples

% Reloads the watchdog timer
is_expired = board.watchdog_reload;
    

See Also

 

navigation bar