ID : 7690
Difference of Task
PacScript has Supervisory tasks and TP panel tasks, other than normal tasks.
Supervisory tasks and TP panel tasks are less likely to stop than normal tasks. For example, these tasks do not stop even if an error occurs, an emergency stop turns ON. Also, these tasks can behave more systematical operations, such as error recovery processing, etc.. However, these tasks cannot operate commands to be used for controlling robots. (These tasks cannot obtain control authority of axes. To control a robot, you need to activate normal tasks using RUN command to control the robot indirectly. )
Difference of Each Task When Stopping
Condition | Behavior | |||
---|---|---|---|---|
Normal task | Supervisory task
(Task name TSR**) |
TP panel task (*.pns)*1 |
||
Stop all program |
Emergency stop all program | On Halt | Keep running (do not stop) | Keep running (do not stop) |
Halt all program | Cont.Stop (Suspended) | Keep running (do not stop) | Keep running (do not stop) | |
Step Stop all program | Cont.Stop (Step Stop ) |
Keep running (do not stop) | Keep running (do not stop) | |
Protective stop ON | Cont.Stop (Suspended) | Keep running (do not stop) | Keep running (do not stop) | |
Enable Auto OFF | Cont.Stop (Suspended) | Keep running (do not stop) | Keep running (do not stop) | |
STOP button | Cont.Stop (Suspended) | Keep running (do not stop) | Keep running (do not stop) | |
Error occurrence in own task *2 | Level 1 | Cont.Stop (Suspended) | On Halt *3 | On Halt *3 |
Level 2 | Cont.Stop (Suspended) | On Halt *3 | On Halt *3 | |
Level 3 | On Halt | On Halt | On Halt | |
Level 4 | On Halt | On Halt | On Halt | |
Level 5 | On Halt | On Halt | On Halt | |
Error occurrence in other than own task |
Level 1 | Cont.Stop (Suspended) | Keep running (do not stop) | Keep running (do not stop) |
Level 2 | Cont.Stop (Suspended) | Keep running (do not stop) | Keep running (do not stop) | |
Level 3 | On Halt | Keep running (do not stop) | Keep running (do not stop) | |
Level 4 | On Halt | Keep running (do not stop) | Keep running (do not stop) | |
Level 5 | On Halt | On Halt | On Halt |
*1: TP panel task is a program which is activated automatically when the TP panel is displayed.
*2: Even for the Supervisory tasks or TP panel tasks, these tasks stop when an error occurs in its own task. To avoid program stops, you need to take care by reference to "Examples of error avoidance" shown below.
*3: Regardless of the error level, an error issued within Supervisory tasks or TP panel tasks causes Stop state. (If Error level 1 or 2 occurs, these errors are processed as Error level 3.)
Examples of Error Avoidance
This examples shows the situation that TP panel stops once pressing the button while an emergency stop button is pressed.
TP panel stops with displaying the error message of [0x8150101A Command is not executable while emergency stop is ON].
Original Program
Sub PB1_CLICKED()
Run pro1
End Sub
There are three ways to avoid stopping.
- When Pro1 does not include motion commands, runs the target command as Supervisory task.
Sub PB1_CLICKED()
Run TSR1
End Sub
- When an error occurs, skips the line.
Sub PB1_CLICKED()
On Error Resume Next
Run pro1
On Error GoTo 0
End Sub
- Using conditional command to not to run the task.
Sub PB1_CLICKED()
if (sysstate and &h400) <> &h400 then 'Emergency Stop is not ON
run pro1
end if
End Sub
Difference of Each Task When Startup
The example below shows how to activate other tasks by using RUN command from Supervisory tasks or TP panel tasks.
Conditions at bootup | Bootability | ||
---|---|---|---|
Normal tasks | Supervisory tasks (Task name TSR**) | TP panel task (*.pns) *1 | |
Normal mode | Bootable | Bootable | Bootable |
Emergency stop ON state | Not bootable | Bootable | Bootable |
Protective stop ON | Not bootable | Bootable | Bootable |
During stopping processing (STOP button, emergency stop, etc.) *2 |
Not bootable | Bootable | Bootable |
During Level 1 error state | Not bootable | Bootable | Bootable |
During Level 2 error state | Not bootable | Bootable | Bootable |
During Level 3 error state | Not bootable | Bootable | Bootable |
During Level 4 error state | Not bootable | Bootable | Bootable |
During Level 5 error state | Not bootable | Not bootable | Not bootable |
*1: TP panel task is program which is activated automatically when the TP panel is displayed.
*2: When STOP ALL PROGRAMS is entered by STOP, etc., next startup cannot be performed until the normal task and the robot come to a complete stop once. "During stopping processing" means the time period between the time of "Stop all program" turning ON and the time of robot and program completely stop. The status of the stop processing can be acquired by SysState command.
ID : 7690