Access the Task object

The TASK object provides status information about a task. Specify the task name to determine which TASK object you want.
Attribute
Data Type
Instruction within Standard Task
Instruction within Safety Task
Description
DisableUpdateOutputs
DINT
GSV
SSV
None
Enables or disables the processing of outputs at the end of a task.
  • Set the attribute to 0 to enable the processing of outputs at the end of the task.
  • Set the attribute to 1 (or any non-zero value) to disable the processing of outputs at the end of the task.
EnableTimeOut
DINT
GSV
SSV
None
Enables or disables the timeout function of an event task.
  • Set the attribute to 0 to disable the timeout function.
  • Set the attribute to 1 (or any non-zero value) to enable the timeout function.
InhibitTask
DINT
GSV
SSV
None
Prevents the task from executing. If a task is inhibited, the controller still prescans the task when the controller transitions from Program mode to Run or Test mode.
  • Set the attribute to 0 to enable the task
  • Set the attribute to 1 (or any non-zero value) to inhibit (disable) the task
Instance
DINT
GSV
GSV
Provides the instance number of this TASK object.
Valid values are 0...31.
LastScanTime
DINT
TIME32
GSV
SSV
None
Time it took to execute this program the last time it was executed. Time is in microseconds.
MaxInterval
DINT[2]
TIME32[2]
TIME
GSV
SSV
None
The maximum time interval between successive executions of the task. DINT[0] contains the lower 32 bits of the value; DINT[1] contains the upper 32 bits of the value.
A value of 0 indicates 1 or less executions of the task.
MaxScanTime
DINT
TIME32
GSV
SSV
None
Maximum recorded execution time for this program. Time is in microseconds.
MinInterval
DINT[2]
TIME32[2]
TIME
GSV
SSV
None
The minimum time interval between successive executions of the task. DINT[0] contains the lower 32 bits of the value; DINT[1] contains the upper 32 bits of the value.
A value of 0 indicates 1 or less executions of the task.
Name
String
GSV
GSV
Name of the task.
OverlapCount
DINT
GSV
SSV
GSV
SSV
The number of times that the task was triggered while it was still executing. Valid for an event or periodic task.
To clear the count, set the attribute to 0.
Priority
INT
GSV
SSV
GSV
Relative priority of this task as compared to the other tasks.
Valid values 0...15.
Rate
DINT
GSV
SSV
GSV
The time interval between executions of the task. Time is in microseconds.
StartTime
DINT[2]
DT
LINT
GSV
SSV
None
Value of WALLCLOCKTIME when the last execution of the task was started. DINT[0] contains the lower 32 bits of the value; DINT[1] contains the upper 32 bits of the value.
Status
DINT
GSV
SSV
None
Provides status information about the task. Once the controller sets one of these bits, you must manually clear it.
To determine if:
  • an EVENT instruction triggered the task (event task only), examine bit 0
  • a timeout triggered the task (event task only), examine bit 1
  • an overlap occurred for this task, examine bit 2
SynchronizeRedundancyDataDisabled
DINT
GSV
None
Indicates if runtime tag crossloading for standard tasks is enabled in a redundancy application.
  • 0 indicates that tag crossloading for the standard tasks is enabled.
  • 1 indicates that tag crossloading for the standard tasks is disabled.
Watchdog
DINT
GSV
SSV
GSV
Time limit for execution of all programs associated with this task. Time is in microseconds.
If you enter 0, these values are assigned:
Time:
0.5 sec
5.0 sec
Task Type:
periodic
continuous
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.