KUKA robot maintenance ABB safety area and interruption together with case analysis

 

The MODULE XXXX

! Define temporary global zone data

VAR wztemporary conveyor;

! Define global area shape data

VAR shapedata volume;

! Define the interrupt identification number

VAR intnum empty;

! Define global area shape set data position points 1 and 2

Pers pos corner1: = [363.41, 41.87, 317.67];

Pers pos corner2: = [613.41, 258.13, 567.67];

! Define compute location demonstration points

VAR

Robtarget AnQua: = [[363.41, 41.87, 317.67], [0.261461, 0.63764, 0.229939, 0.687155], [0,0,1,1], [9 E + 9, 9, 9 E + E + 09 09, 9 E + 9, 9, 9 E + E + 09 09]].

! Define left and right moving position points

The TASK

VAR

Robtarget Zuo_AnQuanDian: = [[444.89, 401.76, 501.87], [0.0966565, 0.923747, 0.326119, 0.176057], [1,0,0,0], [9 E + 9, 9, 9 E + E + 09 09, 9 E + 9, 9, 9 E + E + 09 09]].

The TASK

VAR

Robtarget You_AnQuanDian: = [[444.90, 164.34, 501.86], [0.0966831, 0.923746, 0.32611, 0.176061], [1,0,1,0], [9 E + 9, 9, 9 E + E + 09 09, 9 E + 9, 9, 9 E + E + 09 09]].

! Security zone definition

PROC AnQuanQuYu_CheShi ()

! Calculate the size of the security area

Corner1. X: = AnQua. Trans. X.

Corner1. Y: = AnQua. Trans. Y;

Corner1. Z: = AnQua. Trans. Z.

Corner2. X: = AnQua. Trans. X + 250;

Corner2. Y: = AnQua. Trans. Y - 300;

Corner2. Z: = AnQua. Trans. Z + 250;

! Define a box global area

WZBoxDef \Outside, volume, corner1, corner2

! Enable global zone restriction monitoring

! WZLimSup \ Temp, conveyor, volume;

! Enable global regions and set digital signal output

WZDOSet \Temp, reference, \Before, volume, ZhongDuan1,1;

! Deactivate temporary global area monitoring

! WZDisable conveyor;

! Re-enable temporary global area monitoring

! WZEnable conveyor;

! Erases temporary global area monitoring

! WZFree conveyor;

! Call the interrupt routine

ZhongDuan;

 

! Move the left demo point (outside the security zone, the security zone will be triggered)

Movej Zuo_AnQuanDian v500, fine, tool0 \ WObj: = wobj0;

! Movej You_AnQuanDian v500, fine, tool0 \ WObj: = wobj0;

! Movej Qian_AnQuanDian v500, fine, tool0 \ WObj: = wobj0;

! Movej Hou_AnQuanDian v500, fine, tool0 \ WObj: = wobj0;

ENDPROC

 

! Interrupt routine

PROC ZhongDuan ()

! Connects an interrupt to a softinterrupt program

CONNECT the empty WITH QianHou_ZhongDuan;

! When the interrupt identification number ZhongDuan1 is set to 1, the soft interrupt program (QianHou_ZhongDuan) is automatically executed.

ISignalDO ZhongDuan1, 1, empty;

ENDPROC

! Soft interrupt routine

The TRAP QianHou_ZhongDuan

! A program point that defines where to save when an interrupt occurs

VAR robtarget p1.

! Stop the arm

StopMove;

! Store the path when an interrupt occurs

StorePath;

! The location where the read interrupt occurred is saved to p1

P1: CRobT = ();

! Execute network right - walk program after interruption

Movej Hou_AnQuanDian v500, fine, tool0 \ WObj: = wobj0;

! Move to the location where the interrupt occurred when it ended

MoveL p1, v500, fine, tool0 \ WObj: = wobj0;

! After the break, resume the path (continue from the breakpoint to the Zuo_AnQuanDian demonstration point)

RestoPath;

! Restart the arm to move

StartMove;

! Complete the execution of the program

The RETURN;

ENDTRAP

 

Source: guangke intelligent reprint source