Class Task
- Namespace
- L5Sharp.Components
- Assembly
- L5Sharp.dll
A logix Task
component. Contains the properties that comprise the L5X Task element.
public class Task : LogixComponent<Task>, ILogixSerializable
- Inheritance
-
Task
- Implements
- Inherited Members
Remarks
Observe these guidelines when defining a task:
• Tasks must be defined after programs and before controller objects.
• There is a maximum of 32 tasks.
• There is one continuous task only.
• A program can be scheduled under one task only.
• Scheduled programs must be defined (must exist).
Constructors
Task()
Creates a new Task with default values.
public Task()
Remarks
Task(XElement)
public Task(XElement element)
Parameters
Exceptions
- ArgumentNullException
element
is null.
Properties
DisableUpdateOutputs
The value indicating whether the task is set to disable updating output values.
public bool DisableUpdateOutputs { get; set; }
Property Value
EnableTimeout
The value indicating whether timeouts are enabled for the event task. Only used for event tasks.
public bool? EnableTimeout { get; set; }
Property Value
- bool?
If the task is an event type task,
true
indicating that timeouts are enabled,false
to indicate they are disabled. Returnsnull
for non-event tasks.
EventTag
The tag name that the event task consumes. Only used for event tasks.
public TagName? EventTag { get; set; }
Property Value
Remarks
Only used for event tasks with a Consumed Tag trigger or a Module Input Data State Change trigger.
EventTrigger
The trigger for the event task. Only used for event tasks.
public TaskEventTrigger? EventTrigger { get; set; }
Property Value
- TaskEventTrigger
A TaskEventTrigger value indicating what triggers the task. Returns
null
for non-event tasks.
InhibitTask
The value indicating whether the task is inhibited.
public bool InhibitTask { get; set; }
Property Value
Priority
The scan priority of the task component. Default of 10.
public TaskPriority Priority { get; set; }
Property Value
- TaskPriority
A TaskPriority value type representing the int priority of the task.
Rate
The scan rate (ms) of the task component. Default of 10.
public ScanRate? Rate { get; set; }
Property Value
ScheduledPrograms
The collection of program names that are scheduled to the task.
public IEnumerable<string> ScheduledPrograms { get; }
Property Value
- IEnumerable<string>
A IEnumerable<T> containing the string program names.
Remarks
This member just returns the read only list of scheduled programs. To modify the list, use
Type
Gets the type of the task component (Continuous, Periodic, Event).
public TaskType? Type { get; set; }
Property Value
Watchdog
The watchdog rate (ms) of the task component. Default of 500.
public Watchdog Watchdog { get; set; }
Property Value
Methods
Cancel(string)
Removes the specified program name from the underlying list of ScheduledPrograms
public void Cancel(string program)
Parameters
program
stringThe name of the program to cancel.
Schedule(string)
Adds the provided program name to the underlying list of ScheduledPrograms.
public void Schedule(string program)
Parameters
program
stringThe name of the program to schedule.