2以下,或指令ProcerrRecovery異步引發錯誤。
示例2-無限制
VAR intnum int\u move\u stop;
VAR errnum err\u move\u stop:=-1;
...
PROC test\u move\u stop()
BookErrNo err\u move\u stop;
連接int\u move\u stop和trap\u move\u stop;
ISignalDI di1,1,int\u move\u stop;
MoveJ p10、v200、z20、夾持器;
MoveL p20、v200、z20、夾持器;
錯誤(err\u move\u stop)
停止移動;
ClearPath;
開始移動;
StorePath;
MoveJ p10、v200、z20、夾持器;這是ClearPath限制的一個示例。在機器人移動到p10和p20的過程中,
停止正在進行的運動并清除運動路徑,但不對其執行任何操作
在PROC test\u move\u stop中中斷活動指令MoveJ p10或MoveL p20。
因此,正在進行的移動將被中斷,機器人將進入陷阱中的p10
trap\u move\u stop,但在PROC test\u move\u stop中不再移動到p10或p20
將完成。程序執行將掛起。
這個問題可以通過跳遠的錯誤恢復來解決,如示例中所述


Copyright 2004-2010 ABB. All rights reserved.
This is an example of ClearPath limitation. During the robot movement to p10 and p20,
the ongoing movement is stopped and the motion path is cleared, but no action is done to
break off the active instruction MoveJ p10 or MoveL p20 in the PROC test_move_stop.
So the ongoing movement will be interrupted and the robot will go to p10 in the TRAP
trap_move_stop, but no further movement to p10 or p20 in the PROC test_move_stop
will be done. The program execution will be hanging.
This problem can be solved with either error recovery with long jump as described in example
2 below or with asynchronously raised error with instruction ProcerrRecovery.
Example 2 - No limitations
VAR intnum int_move_stop;
VAR errnum err_move_stop := -1;
...
PROC test_move_stop()
BookErrNo err_move_stop;
CONNECT int_move_stop WITH trap_move_stop;
ISignalDI di1, 1, int_move_stop;
MoveJ p10, v200, z20, gripper;
MoveL p20, v200, z20, gripper;
ERROR (err_move_stop)
StopMove;
ClearPath;
StartMove;
StorePath;
MoveJ p10, v200, z20, gripper;