User Task Present

Modbus Motion Interface

Write_Word(<SystemPage>_+_UserTask<N>_w,AbortUserTask);

Description

If a controller resident user task is running this register returns true. If it is not running it returns false. This register is often used to monitor a task to know when it has finished. The parameter is a number corresponding to the user task number in the name UserTask1, UserTask2, etc.

Escapes

If the task number is specified that is less than 1 or greater than the MaxUserTasks constant inside the AsciiCommands 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, AbortUserTask);
Write_Word(SYSTEM_+_UserTask2, AbortUserTask);
Write_Word(SYSTEM_+_UserTask3, AbortUserTask);

Related Topics

Yield
Abort Task
Begin Task