MC-Basic:WDINIT
Language: | English • 中文(简体) |
---|
This command is used to attach a task to the watch dog mechanism. The command enables the watch dog to be triggered if a task does not service it within a specified time interval. WDINIT returns a value into an spoftMC-defined variable. The watch dog cycle time is specified as a parameter, in units of the watch dog cycle time (20msec). The watch dog begins to Terminal the task after it is serviced for the first time using WDCYCLE. Using the watch dog Terminal mechanism from the command line enables a host program to be attached to the watch dog mechanism.
Syntax
<watch dog variable> = WDInit(<wd cycles>)
Availability
All versions
Type
<watch dog variable>: Long
<wd cycles>: Long
Range
<wd cycles>: 1 to MaxLong
Scope
Task or Terminal
Limitations
- Write only
- Not supported in EtherCAT system
Examples
My_Var = WDInit(5) ‘WD Terminal at 100 msec