Wobj

Hello, I’m new to the forum and I need help from an Abb robot programmer.

I have a defined workobject, but I would like with the help of an external laser that will give me a decimal value to modify this wobj always thanks to the reading I receive, in turn when the form is finished, this wobj must return to its original value.

Example:

Wobj(1500,300,200)

Laser reading y -100

newWobj(1500,200,200)

End of cycle = original wobj

Thank you

Write it into the oframe, then zero it back out.

Here is an example.

MODULE Module1
PERS wobjdata myWobj:=[FALSE, TRUE, “”,[[0, 0, 0],[1, 0, 0, 0]],[[0,0,0],[1,0,0,0]]];
PERS robtarget pPosition:=[[0,0,0],[1,0,0,0],[0,0,0,0],[9E9,9E9,9E9,9E9,9E9,9E9]];

PROC main()
!Move robot to position
MoveL pPosition,v1000,fine,tool0\WObj:=myWobj;
!Update wobj with camera values
myWobj.oframe.trans.x:= 100; !100mm X value from camera
myWobj.oframe.trans.y:= 150; !150mm Y value from camera
myWobj.oframe.trans.z:= 0; !0mm Z value from camera
!Move robot to new camera position
MoveL pPosition,v1000,fine,tool0\WObj:=myWobj;
!Reset wobj
myWobj.oframe.trans:=[0,0,0];
ENDPROC

ENDMODULE

It is not a camera but it is simply a sensor that gives me a value on the Y axis, this value is filtered by the PLC