Modbus Motion Interface
Write_Word(<SystemPage>_+_UserTask<N>_w,BeginUserTask);
Description
This command causes a procedure in the controller to begin executing as an independent
activity concurrent along with with other tasks and motion.
Application procedures to be managed as concurrent tasks should be named UserTask1, UserTask2, etc. The
task number is referenced by this command.
The MAC Family supports 64 concurrent tasks in addition to concurrent motion which does not consume task resources
The constant "BeginUserTask" is provided to use as the write parameter for the Modbus word write.
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.
If the task number is specified that is less than 1 or greater than the MaxUserTasks constant inside the interpreter package a Parameter Out Of Range Escape Code error will occur.
MaxUserTasks has a value of 16 but can be adjusted if more tasks need to be invoked from the host.
Note that only 14 additional tasks can run at one time as two are used to sustain host communication.
Examples
Write_Word(SYSTEM_+_UserTask1, BeginUserTask);
Write_Word(SYSTEM_+_UserTask2, BeginUserTask);
Write_Word(SYSTEM_+_UserTask3, BeginUserTask);
Related Topics
Yield
Abort User Task
User Task Present