# World Zone Error

**URL:** <https://tech-community.robotics.abb.com/t/world-zone-error/7071>\
**Category:** RobotStudio\
**Tags:** error, events, worldzones, world-zone\
**Created:** [March 25, 2016, 3:12pm UTC](https://tech-community.robotics.abb.com/t/world-zone-error/7071 "2016-03-25T15:12:24Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![SteveMob](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/stevemob/32/1600_2.png) [@SteveMob](https://tech-community.robotics.abb.com/u/SteveMob)\
**Post date:** [March 25, 2016, 3:12pm UTC](https://tech-community.robotics.abb.com/t/world-zone-error/7071/1 "2016-03-25T15:12:24Z")

</div>

Hello,

I am new to RS and ABB, and I have gotten some great help on World Zones recently, but now I am running into another issue. I have a defined world zone, but every time I try to run my program, I get an error: Event Message 50183, Robot outside work area. Description: The robot has reached the World Zone object. Actions: Check the reason of the world zone. Use the joystick to move the robot out of the world zone if needed.  
The problem is, is that it throws up that error anytime I try to start my program, no matter the position or placement of the TCP on the robot.  
Attached is a text file of my code. I have changed the WZBoxDef to both Inside and Outside and I am getting the same event message. Any ideas to help me solve this problem?  
Thanks,  
SM  
[WorldZone12.txt](https://tech-community.robotics.abb.com/uploads/short-url/jhK2jW0oorvPhonSuIwMGJ8SmNI.txt) (1.58 KB)

---

<div class="post-metadata">

**Author:** ![soup](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/soup/32/1592_2.png) [@soup](https://tech-community.robotics.abb.com/u/soup)\
**Post date:** [March 25, 2016, 4:52pm UTC](https://tech-community.robotics.abb.com/t/world-zone-error/7071/2 "2016-03-25T16:52:04Z")

</div>

If I’m reading it correctly – you are defining the zone as everything “\Outside” of the tiny ~1 inch box – Is that what you’re wanting to do?

---

<div class="post-metadata">

**Author:** ![SteveMob](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/stevemob/32/1600_2.png) [@SteveMob](https://tech-community.robotics.abb.com/u/SteveMob)\
**Post date:** [March 25, 2016, 5:16pm UTC](https://tech-community.robotics.abb.com/t/world-zone-error/7071/3 "2016-03-25T17:16:12Z")

</div>

I want to do it such that when the robot _enters_ the WZ, it will stop everything. But that error pops up no matter where the TCP is. Is it something to do with like my declaration or something? I created a POWER\_ON Event and linked that to my zone\_output routine and everything like you said, but it won’t give me any options for the “Task” except TROB1. Did I need to choose this Task?  
Thanks,  
SM

---

<div class="post-metadata">

**Author:** ![soup](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/soup/32/1592_2.png) [@soup](https://tech-community.robotics.abb.com/u/soup)\
**Post date:** [March 25, 2016, 7:01pm UTC](https://tech-community.robotics.abb.com/t/world-zone-error/7071/4 "2016-03-25T19:01:51Z")

</div>

Does it error when you say that you are defining the “\Inside” instead of “\Outside”?

---

<div class="post-metadata">

**Author:** ![SteveMob](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/stevemob/32/1600_2.png) [@SteveMob](https://tech-community.robotics.abb.com/u/SteveMob)\
**Post date:** [March 25, 2016, 7:12pm UTC](https://tech-community.robotics.abb.com/t/world-zone-error/7071/5 "2016-03-25T19:12:18Z")

</div>

It doesn’t specify. The only thing the error says is: Event Message 50183, Robot outside work area. Description: The robot has  
reached the World Zone object. Actions: Check the reason of the world  
zone. Use the joystick to move the robot out of the world zone if needed.

---

<div class="post-metadata">

**Author:** ![soup](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/soup/32/1592_2.png) [@soup](https://tech-community.robotics.abb.com/u/soup)\
**Post date:** [March 25, 2016, 7:14pm UTC](https://tech-community.robotics.abb.com/t/world-zone-error/7071/6 "2016-03-25T19:14:21Z")

</div>

So you changed your code to “\Inside”, cycled power, and you get the same error?

---

<div class="post-metadata">

**Author:** ![SteveMob](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/stevemob/32/1600_2.png) [@SteveMob](https://tech-community.robotics.abb.com/u/SteveMob)\
**Post date:** [March 25, 2016, 7:16pm UTC](https://tech-community.robotics.abb.com/t/world-zone-error/7071/7 "2016-03-25T19:16:35Z")

</div>

Yes. I don’t know what to do to fix it… It’s gotta be something small but I’m just not sure what it is…?

---

<div class="post-metadata">

**Author:** ![soup](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/soup/32/1592_2.png) [@soup](https://tech-community.robotics.abb.com/u/soup)\
**Post date:** [March 25, 2016, 7:21pm UTC](https://tech-community.robotics.abb.com/t/world-zone-error/7071/8 "2016-03-25T19:21:20Z")

</div>

Could be that the zone is too close / inside the base of the robot and the software knows it’s not in the work envelope of the robot.

---

<div class="post-metadata">

**Author:** ![SteveMob](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/stevemob/32/1600_2.png) [@SteveMob](https://tech-community.robotics.abb.com/u/SteveMob)\
**Post date:** [March 25, 2016, 7:30pm UTC](https://tech-community.robotics.abb.com/t/world-zone-error/7071/9 "2016-03-25T19:30:58Z")

</div>

But it isn’t? I mean you can look at my code and the declaration isn’t that close to the robot. I just now noticed that the WZ does reach to outside the working envelope of the robot. Could this be the problem?

---

<div class="post-metadata">

**Author:** ![soup](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/soup/32/1592_2.png) [@soup](https://tech-community.robotics.abb.com/u/soup)\
**Post date:** [March 25, 2016, 7:58pm UTC](https://tech-community.robotics.abb.com/t/world-zone-error/7071/10 "2016-03-25T19:58:30Z")

</div>

I am looking at your code – the tiny box you’re defining is most likely inside the base of the robot – about 1/2 inch out from the world coordinate system. Change your X numbers to something more reachable like a foot or two out in front of the robot (depends on the model robot you’re using) and try again. No, the world zone can be outside the limits of the robot.

---

<div class="post-metadata">

**Author:** ![SteveMob](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/stevemob/32/1600_2.png) [@SteveMob](https://tech-community.robotics.abb.com/u/SteveMob)\
**Post date:** [March 25, 2016, 8:01pm UTC](https://tech-community.robotics.abb.com/t/world-zone-error/7071/11 "2016-03-25T20:01:17Z")

</div>

My units are in inches though I believe? Unless they are always in mm no matter what your units are set for?

---

<div class="post-metadata">

**Author:** ![SteveMob](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/stevemob/32/1600_2.png) [@SteveMob](https://tech-community.robotics.abb.com/u/SteveMob)\
**Post date:** [March 25, 2016, 8:21pm UTC](https://tech-community.robotics.abb.com/t/world-zone-error/7071/12 "2016-03-25T20:21:02Z")

</div>

So the weirdest thing I just found out. I started from scratch, built a whole new program, new world zone, new path, new event routine, etc. Now it wasn’t picking up the world zone at all, but it wasnt giving me the error mentioned previously. So I was messing around with it to try to get the program to recognize that a world zone was there, and so I proccalled the “zone\_output” routine from the main routine, and tried to run it. I got that error again. I then deleted that proccal out of my main routine and still got the error, but after I restarted my controller that error went away. However, my program still won’t recognize that there is a world zone there… So I am back to square 1… I don’t understand why it won’t recognize there is a world zone there. I did everything like I was told, declared my variables, created a POWER\_ON event routine, etc… Is there anything I am missing?  
Thanks,  
Stephen

---

<div class="post-metadata">

**Author:** ![soup](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/soup/32/1592_2.png) [@soup](https://tech-community.robotics.abb.com/u/soup)\
**Post date:** [March 25, 2016, 9:28pm UTC](https://tech-community.robotics.abb.com/t/world-zone-error/7071/13 "2016-03-25T21:28:16Z")

</div>

“My units are in inches…” – no relation to the display units on RobotStudio – world zone RAPID code is always millimeters.

---

<div class="post-metadata">

**Author:** ![graemepaulin](https://avatars.discourse-cdn.com/v4/letter/g/258eb7/32.png) [@graemepaulin](https://tech-community.robotics.abb.com/u/graemepaulin)\
**Post date:** [March 26, 2016, 6:15am UTC](https://tech-community.robotics.abb.com/t/world-zone-error/7071/14 "2016-03-26T06:15:28Z")

</div>

![image.jpg](https://europe1.discourse-cdn.com/flex005/uploads/robotics1/original/2X/6/6d42420d8187bd5ad1fedb9a69a96c7b454db418.jpeg)

I have changed only the values for the corners of the box (as shown below) to the code you posted earlier.

_PROC zone\_output()_

_VAR shapedata volume;_

_CONST pos corner1:=[1000,-500,0];_

_CONST pos corner2:=[1500,0,500];_

_WZBoxDef\inside,volume,corner1,corner2;_

_WZLimSup\Stat,object,volume;_

_RETURN ;_

_ENDPROC_

This allows the robot to run outside the box but as soon as it tries enter the box it stops and gives the 50183 error.

It does not stop when jogging using the virtual FlexPendant.

I tried using outside instead of inside and I get the inverse situation where the robot can only move inside the box - again stopping at the edge of the box.

 ![image.jpg](https://europe1.discourse-cdn.com/flex005/uploads/robotics1/original/2X/6/6d42420d8187bd5ad1fedb9a69a96c7b454db418.jpeg)

---

<div class="post-metadata">

**Author:** ![SteveMob](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/stevemob/32/1600_2.png) [@SteveMob](https://tech-community.robotics.abb.com/u/SteveMob)\
**Post date:** [March 28, 2016, 5:45pm UTC](https://tech-community.robotics.abb.com/t/world-zone-error/7071/15 "2016-03-28T17:45:45Z")

</div>

Thanks alot for the help, and I feel I am getting closer, but for some reason it still throws up the error when I try to start my program, no matter where the TCP is. I set better corners per soup’s suggestion (I was assuming RAPID was in inches like RS). I was hoping that was what was wrong but it still is putting out the 50183 error. So I started from scratch, again. Same error.

Maybe it is something in my Event Routine? Attached is what I currently have for my Event Routine. Am I supposed to say yes to the Tasks or choose something from “Task”? (my only options are “blank” or TROB1)  
Thanks  
sm

---

<div class="post-metadata">

**Author:** ![graemepaulin](https://avatars.discourse-cdn.com/v4/letter/g/258eb7/32.png) [@graemepaulin](https://tech-community.robotics.abb.com/u/graemepaulin)\
**Post date:** [March 28, 2016, 7:14pm UTC](https://tech-community.robotics.abb.com/t/world-zone-error/7071/16 "2016-03-28T19:14:11Z")

</div>

Above is the Event Routine I used in my test which was working.

---

<div class="post-metadata">

**Author:** ![SteveMob](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/stevemob/32/1600_2.png) [@SteveMob](https://tech-community.robotics.abb.com/u/SteveMob)\
**Post date:** [March 29, 2016, 7:51pm UTC](https://tech-community.robotics.abb.com/t/world-zone-error/7071/17 "2016-03-29T19:51:06Z")

</div>

Still not working lol… Could it have anything to do with that this is a brand new controller and robot? Meaning is there some other stuff I needed to do first before I try to do a WZ?

So let me go step by step to check and make sure I have everything…

1. Start a station with backup of real controller, or connect directly to real controller (in my case IRC5 Compact)

2. Create an Event Routine linked to POWER\_ON and choose a routine that will be called out in the code:  
-

3. Define a World Zone (name the routine the same as what was called out in the Event Routine):  

4. Define some random points that cause the robots TCP path to enter that world zone:  
MODULE MainModule  
CONST robtarget p10:=[[461.29,144.16,221.59],[0.29728,-0.143906,0.942789,0.0454265],[0,0,-1,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];  
CONST robtarget p20:=[[422.52,-233.55,218.06],[0.287825,0.238498,0.924538,-0.0741974],[-1,0,-1,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];  
CONST robtarget p30:=[[422.52,-233.55,538.15],[0.287814,0.238489,0.924544,-0.0741978],[-1,0,-1,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];  
CONST robtarget p40:=[[433.25,226.30,534.73],[0.289204,-0.227574,0.927106,0.0710358],[0,0,-1,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];  
!CONST robtarget p50:=[[373.93,0.03,630.05],[0.707179,-3.9492E-05,0.707034,9.98114E-06],[0,0,-1,1],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];  
CONST robtarget Home:=[[373.93,0.03,630.05],[0.707179,-3.9492E-05,0.707034,9.98114E-06],[0,0,-1,1],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];  
!CONST robtarget p60:=[[373.93,0.03,630.05],[0.707179,-3.9492E-05,0.707034,9.98114E-06],[0,0,-1,1],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];

VAR wzstationary object;

PROC zone\_output()  
VAR shapedata volume;  
CONST pos corner1:=[279.74,353.08,101.45];  
CONST pos corner2:=[368.5,-355.72,533.53];  
WZBoxDef\Inside,volume,corner1,corner2;  
WZLimSup\Stat,object,volume;  
RETURN ;  
ENDPROC

PROC main()  
Path\_10;  
ENDPROC

PROC Path\_10()  
MoveJ Home,v200,z5,tool0;  
MoveJ p10,v200,z5,tool0;  
MoveJ p20,v200,z5,tool0;  
MoveJ p30,v200,z5,tool0;  
MoveJ p40,v200,z5,tool0;  
MoveJ Home,v200,z5,tool0;  
ENDPROC  
ENDMODULE

1. Apply and synchronize to station, or just apply and release write access to the controller and test and the robot should stop once it reaches that zone.

However, this is not the case. The virtual robot is not picking up the WZ.

**Graemepaulin, in regards to your previous post** , I got an error saying: "RAPID symbol ‘main’ in ‘T\_ROB1’ was not found. What does that mean?

Thanks for all the help and patience with me,  
SM

 ![image.jpg](https://europe1.discourse-cdn.com/flex005/uploads/robotics1/original/2X/0/0d561975ebce1b59f22113455dae4d1e14ea2be8.jpeg)  
 ![image.jpg](https://europe1.discourse-cdn.com/flex005/uploads/robotics1/original/2X/3/31eebd48a0b44dc6be003269e047c8c78b34acfb.jpeg)

---

<div class="post-metadata">

**Author:** ![SteveMob](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/stevemob/32/1600_2.png) [@SteveMob](https://tech-community.robotics.abb.com/u/SteveMob)\
**Post date:** [March 29, 2016, 8:21pm UTC](https://tech-community.robotics.abb.com/t/world-zone-error/7071/18 "2016-03-29T20:21:24Z")

</div>

Also does it matter if I am in Manual mode for the real controller rather than Auto?  
Thanks,  
SM

---

<div class="post-metadata">

**Author:** ![soup](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/soup/32/1592_2.png) [@soup](https://tech-community.robotics.abb.com/u/soup)\
**Post date:** [March 29, 2016, 8:25pm UTC](https://tech-community.robotics.abb.com/t/world-zone-error/7071/19 "2016-03-29T20:25:28Z")

</div>

1. Cycle power on the controller so the POWER\_ON event routine is called.

---

<div class="post-metadata">

**Author:** ![SteveMob](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/stevemob/32/1600_2.png) [@SteveMob](https://tech-community.robotics.abb.com/u/SteveMob)\
**Post date:** [March 29, 2016, 8:31pm UTC](https://tech-community.robotics.abb.com/t/world-zone-error/7071/20 "2016-03-29T20:31:41Z")

</div>

How do I do that?  
Thanks,  
SM

[Next page](https://tech-community.robotics.abb.com/t/world-zone-error/7071.md?page=2)
