FB_C69xxSetWatchdog

FB_C69xxSetWatchdog 1:

This function block is deprecated on newer IPCs. Use FB_PcWatchdog_BAPI from Tc2_System instead.

FB_C69xxSetWatchdog 2:

The function block FB_C69xxSetWatchdog enables a hardware watchdog on the C69xx PC. The watchdog is enabled via bEnable = TRUE and the tTimeOut time. The tTimeOut time can be a minimum of 2 seconds and a maximum of 255 seconds.

Once the watchdog has been enabled, the function block instance must be called cyclically at shorter intervals than tTimeOut, since the C69xx PC restarts automatically when tTimeOut has elapsed. The watchdog can therefore be used to automatically reboot systems, which have entered an infinite loop or where the PLC has become stuck.

The watchdog can be disabled via bEnable = FALSE or tTimeOut = T#0s.

Notice

Reboot

The watchdog must be disabled before breakpoints are used, before a PLC reset or an overall reset, before a TwinCAT stop, before switching to Config mode or before the configuration is activated, because otherwise the C69xx would reboot immediately once tTimeOut has elapsed.

FB_C69xxSetWatchdog 3: Inputs

VAR_INPUT
    tTimeOut : TIME;
    bEnable  : BOOL;
END_VAR

Name

Type

Description

tTimeOut

TIME

Watchdog time, after which a restart is performed.

bEnable

BOOL

Enabling/disabling the watchdog.

FB_C69xxSetWatchdog 4: Outputs

VAR_OUTPUT
    bEnabled : BOOL;
    bError   : BOOL;
END_VAR

Name

Type

Description

bEnabled

BOOL

TRUE = Watchdog is enabled, FALSE = Watchdog is disabled.

bError

BOOL

Error when enabling or disabling the watchdog.

Requirements

Development environment

Target plattform

PLC Libraries to include

TwinCAT v3.0.0

PC (i386)

Tc2_SystemC69xx