# WORKOBJECT

**URL:** <https://tech-community.robotics.abb.com/t/workobject/1140>\
**Category:** Robot Controller\
**Created:** [April 4, 2007, 5:26pm UTC](https://tech-community.robotics.abb.com/t/workobject/1140 "2007-04-04T17:26:23Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![biedron](https://avatars.discourse-cdn.com/v4/letter/b/c57346/32.png) [@biedron](https://tech-community.robotics.abb.com/u/biedron)\
**Post date:** [April 4, 2007, 5:26pm UTC](https://tech-community.robotics.abb.com/t/workobject/1140/1 "2007-04-04T17:26:23Z")

</div>

I want set at my main procedur workobject diffrent then workobject0. How I can do this ??

---

<div class="post-metadata">

**Author:** ![PerSvensson](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/persvensson/32/1040_2.png) [@PerSvensson](https://tech-community.robotics.abb.com/u/PerSvensson)\
**Post date:** [April 4, 2007, 10:12pm UTC](https://tech-community.robotics.abb.com/t/workobject/1140/2 "2007-04-04T22:12:06Z")

</div>

Hi  
I’m not sure what you mean?

But the workobject is an argument to the motion instruction  
so just define a new workobject and use that in your motion instruction.  
Be aware of that target positions relates to the workobject they where teached in so if you just change the workobject the robot could end up in a position that may surprise you.

Use RobotStudio it helps a lot in cases like this, testing that doesn’t hurts :stuck\_out\_tongue\_winking\_eye:

---

<div class="post-metadata">

**Author:** ![biedron](https://avatars.discourse-cdn.com/v4/letter/b/c57346/32.png) [@biedron](https://tech-community.robotics.abb.com/u/biedron)\
**Post date:** [April 5, 2007, 8:37am UTC](https://tech-community.robotics.abb.com/t/workobject/1140/3 "2007-04-05T08:37:44Z")

</div>

But I want change workobject during my program and I don’t know how I can do it.

---

<div class="post-metadata">

**Author:** ![claudio](https://avatars.discourse-cdn.com/v4/letter/c/7cd45c/32.png) [@claudio](https://tech-community.robotics.abb.com/u/claudio)\
**Post date:** [April 5, 2007, 9:28am UTC](https://tech-community.robotics.abb.com/t/workobject/1140/4 "2007-04-05T09:28:25Z")

</div>

Hi

The deafult movement teached is:

MoveL \*,v100,fine,tool0;

but you can specify a different workobject through:

MoveL \*,v100,fine,tool0wobj:=wobj1;

If you need to select a workobject in your program try somthing like:  
…  
PERS wobjdata wobj1:=…;  
PERS wobjdata wobj2:=…;  
PERS wobjdata wo\_Work:=…;  
…  
! Somewhere in your program:  
IF THEN  
wo\_Work := wobj1;  
ELSE  
wo\_Work:=wobj2;  
ENDIF  
…  
! In your main procedure:  
MOVEL \*,v1000,z10,tool1wobj:=wo\_Work;

Regards,  
Claudio

---

<div class="post-metadata">

**Author:** ![joaof](https://avatars.discourse-cdn.com/v4/letter/j/f4b2a3/32.png) [@joaof](https://tech-community.robotics.abb.com/u/joaof)\
**Post date:** [April 7, 2007, 7:12pm UTC](https://tech-community.robotics.abb.com/t/workobject/1140/5 "2007-04-07T19:12:53Z")

</div>

Hi,

Claudio explain how you can use a workwobject difrent by Wobj0. You can modify your coordinates of workObject or the rotation of a workObject, try something like this.

PERS wobjdata board1:=…;  
PERS wobjdata board2:=…;

board2:=board1;

board2.oframe.trans.x:=mesa2.oframe.trans.x+Dx;  
board2.oframe.trans.y:=mesa2.oframe.trans.y+Dy;  
board2.oframe.trans.z:=mesa2.oframe.trans.z+Dz;

MoveJ \*, Velo\_rapida, z50, ventosaWObj:=board2;

And you can rotate the WorkObject to:

board2.uframe.rot := OrientZYX(anglz, angly, anglx);

Regards,

Joao Fidalgo
