5 — VEHICLE CONTROL LANGUAGE (VCL)
pg. 81
Curtis Model 1351 – December 2018
VCL, Watchdog Timer and Faults
Using VCL code, watchdog timers can be setup to ensure that specific parts of the VCL code are
operating properly. The watchdog can be started, stopped and “kept alive” in up to five separate places
in the code. A Watchdog fault action definition will allow the VCL designer to select what happens
when the active Watchdog times out.
function
Set_Watchdog_Timeout()
Sets the time-out in milliseconds for any one of
five watchdog timers.
This function will set the time-out in milliseconds for any one of five watchdog
timers available. When the function is called, the specific watchdog timer is cleared
and the time-out threshold is updated.
The watchdog must not be running when this function is called or the Watchdog
fault and fault actions will be activated. After the first
Kick_Watchdog()
has
been called for a timer, the watchdog cannot be stopped or set to a new timeout.
This is to prevent faulty code from re-enabling the watchdog constantly and thus
subverting its function.
When a Watchdog timer runs out (not kicked in time) VCL will halt and the
appropriate Watchdog fault (1 through 5) will be called. The system will then
activate the particular fault actions defined by the VCL programmer.
syntax
Set_Watchdog_Timeout(WD#, Time)
arguments:
WD#
One of the 5 watchdog timers, WD1 through WD5
Time
The watchdog’s time threshold, 20 ms (min.) to 60
s (max.)
20 – 60000
returns: None
reported errors:
BAD_ID
WD# out of range
PARM_RANGE
Parameter (Time) out of range