DEFEND
(Statement)
Defends a task.
DEFEND {ON|OFF}
A program task usually releases execution priority to another program task with equal or higher priority at fixed intervals.
Use a DEFEND command when a program is processed without releasing execution priority to another task. After DEFEND ON is executed the execution priority is kept until DEFEND OFF is executed. However, if each time designation command for DELAY, WAIT and SET IO is executed, the execution priority is released to another program task.
-
Set the section of a program that is to be defended with DEFEND ON as short as possible. If the task is in an infinite loop status after execution of DEFEND ON, execution priority will never be transferred to other program tasks.
-
Even if a task is defended with DEFEND ON, the defense status is automatically released in the following cases.
-
When an END command (except for an END command at the end of a called program) is executed
-
When a KILL command is executed
-
When the robot controller is initialized using the teach pendant or I/O.
DEFEND ON
|
'Defends own task.
|
SET IO[100]
|
'The following 3 instructions are always
'continuously executed when a task is defended.
|
SET IO[102]
|
|
SET IO[104]
|
|
DEFEND OFF
|
'Releases the defense of own task.
|