# \\inside and \\outside

**URL:** <https://tech-community.robotics.abb.com/t/inside-and-outside/6413>\
**Category:** RobotStudio\
**Created:** [December 9, 2014, 7:43am UTC](https://tech-community.robotics.abb.com/t/inside-and-outside/6413 "2014-12-09T07:43:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![B\_Baan](https://avatars.discourse-cdn.com/v4/letter/b/439d5e/32.png) [@B\_Baan](https://tech-community.robotics.abb.com/u/B_Baan)\
**Post date:** [December 9, 2014, 7:43am UTC](https://tech-community.robotics.abb.com/t/inside-and-outside/6413/1 "2014-12-09T07:43:54Z")

</div>

Hello,

I have a question about the \inside or \outside parameter of WZBoxDef and functions such as this one.  
What do these parameters actually do?

B\_Baan

---

<div class="post-metadata">

**Author:** ![graafderk](https://avatars.discourse-cdn.com/v4/letter/g/cab0a1/32.png) [@graafderk](https://tech-community.robotics.abb.com/u/graafderk)\
**Post date:** [December 9, 2014, 8:55am UTC](https://tech-community.robotics.abb.com/t/inside-and-outside/6413/2 "2014-12-09T08:55:50Z")

</div>

Hi B\_Baan!

According to the ABB “RAPID Instructions, Functions and Data types” manual:

“WZBoxDef (World Zone Box Definition) is used to define a world zone that has the shape of a straight box with all its sides parallel to the axes of the World Coordinate System.”

and:

"[\Inside]  
Data type: switch  
Define the volume inside the box.

[\Outside]  
Data type: switch  
Define the volume outside the box (inverse volume).

One of the arguments \Inside or \Outside must be specified."

In other words: WZBoxDef defines a 3-dimensional zone in the shape of a box (WZCylDef defines a cylinder, etc.). Whether you will be monitoring the inside of the box or the outside is defined by the \inside and \outside switch.

If you would define a box somewhere in the space around your robot using the \inside switch and use for instance WZLimSup to limit the zone in which your TCP is allowed to be in, the robot would only be allowed to move inside the box. When the TCP reaches the limits of the box, the movement is stopped as the area outside the box is off limits to the TCP.  
Using the \outside switch, this behavior is the other way around: the robot can move around freely, but its TCP is not allowed to enter the defined box.

If you have a (virtual) system available for testing, you could try defining a world zone, add world zone limit supervision (using WZLimSup) and jog the robot to see which areas you’re allowed to enter. Have a look at the WZLimSup examples in the manual to see how that’s done.

---

<div class="post-metadata">

**Author:** ![B\_Baan](https://avatars.discourse-cdn.com/v4/letter/b/439d5e/32.png) [@B\_Baan](https://tech-community.robotics.abb.com/u/B_Baan)\
**Post date:** [December 9, 2014, 9:10am UTC](https://tech-community.robotics.abb.com/t/inside-and-outside/6413/3 "2014-12-09T09:10:10Z")

</div>

Thanks graafderk, that helped a lot!
