Difference between revisions of "MC-Basic:WDINIT"

From SoftMC-Wiki
Jump to: navigation, search
m (Text replace - "Write-Only" to "Write only")
m
Line 10: Line 10:
  
 
|DESCRIPTION=
 
|DESCRIPTION=
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 MC-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.
+
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.
 
 
{{Note/Important| '''THIS COMMAND IS OBSOLETE'''}}
 
  
 
|TYPE=
 
|TYPE=
''<watch dog variable>'': Long<br>
+
<''watch dog variable''>: Long<br>
''<wd cycles>'': Long
+
<''wd cycles''>: Long
  
 
|RANGE=
 
|RANGE=
''<wd cycles>'': 1 to MaxLong
+
<''wd cycles''>: 1 to MaxLong
  
 
|UNITS=
 
|UNITS=
Line 31: Line 29:
  
 
|LIMITATIONS=
 
|LIMITATIONS=
Write only
+
*Write only
 +
*Not supported in EtherCAT system
  
 
|EXAMPLE=
 
|EXAMPLE=

Revision as of 11:56, 26 March 2014

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

See Also