2以下,或指令ProcerrRecovery異步引發(fā)錯(cuò)誤。
示例2-無(wú)限制
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、夾持器;
錯(cuò)誤(err\u move\u stop)
停止移動(dòng);
ClearPath;
開(kāi)始移動(dòng);
StorePath;
MoveJ p10、v200、z20、夾持器;這是ClearPath限制的一個(gè)示例。在機(jī)器人移動(dòng)到p10和p20的過(guò)程中,
停止正在進(jìn)行的運(yùn)動(dòng)并清除運(yùn)動(dòng)路徑,但不對(duì)其執(zhí)行任何操作
在PROC test\u move\u stop中中斷活動(dòng)指令MoveJ p10或MoveL p20。
因此,正在進(jìn)行的移動(dòng)將被中斷,機(jī)器人將進(jìn)入陷阱中的p10
trap\u move\u stop,但在PROC test\u move\u stop中不再移動(dòng)到p10或p20
將完成。程序執(zhí)行將掛起。
這個(gè)問(wèn)題可以通過(guò)跳遠(yuǎn)的錯(cuò)誤恢復(fù)來(lái)解決,如示例中所述


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;