Begin Task

Tasks Block

Description

This command causes a procedure in the controller to begin executing as an independent activity concurrent with other activities. Procedures can be run as concurrent tasks if they have no parameters. Only procedure blocks can be included within the Begin Task block. Multiple procedures can be enclosed within Begin Task and all enclosed procedures will begin at the same discrete time moment, all starting on the same controller sample. There is no control over which task runs first on each subsequent sample. The task scheduler places tasks into the next available task slot which might be before, or after, any other task based on slot availability. Avoid any task dependence where sequence is important.

The MAC Family supports 64 concurrent tasks in addition to concurrent motion which does not consume task resources

Escapes

If all of the available task slots are filled an attempt to start another task will result in an Unable To Begin Task Escape Code.

Examples

Related Topics

Yield
Abort Task
Procedure Needed for Task