User`s guide
Task Scheduling
Tasks are scheduled to run with a specified priority in one or more time slices. Tasks may
have priorities from -1 to 64, and the priorities may be different in each time slice. The
priority meanings are:
-1 Do not run in this slice even if no other task is ready to run.
0 Do not run in this slice unless no other task from this slice is ready to
run.
1 - 64 Run in this slice according to specified priority. Higher priority tasks may
lock out lower ones. Priorities are broken into the following ranges:
1 - 31 Normal user task priorities.
32 - 62 Used by V+ device drivers and system tasks.
63 Used by the trajectory generator. Do not use 63
unless you have very short task execution times. Use
of these priorities may cause jerks in the robot
trajectories.
64 Used by the servo. Do not use 64 unless you have
very short task execution times. Use of these
priorities may cause jerks in the robot trajectories.
Whenever the current task becomes inactive (e.g., due to an I/O operation, a WAIT
instruction, or completion of the task programs), V+ searches for a new task to run. The
search begins with the highest priority task in the current time slice and proceeds through
that slice in order of descending priority. If multiple programs are waiting to run in the task,
they are run according to the relative program priorities. If a runnable task is not found, the
next higher slice is checked. All time slices are checked, wrapping around from slice 15 to
slice 0 until the original slice is reached. If no runnable tasks are encountered, the V+ null
task executes.
Whenever a 1ms interval expires, V+ performs a similar search of the next time slice. If the
next time slice does not contain a runnable task, the currently executing task continues.
If more than one task in the same time slice have the same priority, they become part of a
round-robin scheduling group. Whenever a member of a round-robin group is selected by the
normal slice searching, the group is scanned to find the member of the group that ran most
recently. The member that follows the most recent is run instead of the one that was
originally selected. If a task is in more than one round-robin group in different slices, then all
such tasks in both slices appear to be in one big group. This property can cause a task to be
run in a slice you did not expect. For example:
Scheduling of Program Execution Tasks
(Undefined variable: Primary.Product_Name_V)Language User's Guide, version
17.x
Page 49










