Danaher Motion
06/2005
Project
M-SS-005-03 Rev
E
59
3.4.4.
Monitoring Tasks From the Terminal
For detailed information on these commands, refer to the
SERVOSTAR
®
MC
Reference Manual
.
TASK.STATUS
provides the current state of any task. You can query
TASK.STATE
from the terminal window. You cannot use
TASK.STATUS
from within a program. The syntax for
TASK.STATUS
is:
? <
TaskName
>.Status
For example:
? TASK1.PRG.Status
TASKLIST
returns the state and priority of all tasks loaded in the system.
You can query
TASKLIST
only from the terminal window
.
For example, if you type:
? TaskList
A typical result is:
TaskName = TASK1.PRG, Status = sstep, Priority=16
TaskName = DO.PRG, Status = suspend, Priority=4
3.4.5. Relinquishing
Resources
When tasks of different priorities compete for processor time, the highest
priority task always takes all the resources it needs. However, tasks of high
priority can relinquish computer resources under some conditions. In these
cases, tasks of lower priority run until the high priority tasks again demand
the resources. There are three conditions under which a task relinquishes
resources: when the task is terminated, when the task is suspended, or when
the task is idled. For detailed information on these commands, refer to the
SERVOSTAR
®
MC Reference Manual
.
A
task terminates
when it is finished executing. If a task starts with
NUMBEROFLOOPS
greater than zero, the task executes the specified
number of times and terminates. The task relinquishes all resources.
Terminated tasks remain loaded in the system and can be restarted.
One task can terminate another task by issuing
KILLTASK
. A task
relinquishes all resources after the kill command. Killed tasks remain in the
system and can be restarted.
Tasks relinquish processing resources temporarily when they are
suspended
. A task is suspended when it is waiting for a resource or is
delayed. Suspended tasks still monitor events as long as the event priority is
higher than the task priority. Never run a task at a higher priority level than
any of its events.
Use
SLEEP
to delay a task for a specific period of time. This command can
only be issued from within the task. One task cannot issue a
SLEEP
for
another task.
SLEEP
causes the task to relinquish resources until the sleep
time has expired.
Idled tasks
relinquish resources. In this case, resources are relinquished
until another task revokes the idle by issuing a
CONTINUETASK
.
Delete Task/Library
deletes a file from the Flash Disk. Only filesnot loaded
into RAM can be deleted.Files that are protected by a password may not be
deleted. For example:
Delete FILE1.PRG