# Event routine not starting

**URL:** <https://tech-community.robotics.abb.com/t/event-routine-not-starting/9168>\
**Category:** RAPID Programming\
**Created:** [October 28, 2019, 8:52am UTC](https://tech-community.robotics.abb.com/t/event-routine-not-starting/9168 "2019-10-28T08:52:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jled](https://avatars.discourse-cdn.com/v4/letter/j/3d9bf3/32.png) [@jled](https://tech-community.robotics.abb.com/u/jled)\
**Post date:** [October 28, 2019, 8:52am UTC](https://tech-community.robotics.abb.com/t/event-routine-not-starting/9168/1 "2019-10-28T08:52:52Z")

</div>

Hello,

I am having some trouble with event routine. The routine itself is as follows:

MODULE user (SYSMODULE)

VAR wzstationary worldzone1;  
VAR wzstationary worldzone2;

VAR num testnum:=0;

PROC WZPos()  
VAR shapedata shape1;  
VAR shapedata shape2;

CONST pos corner1:=[455,200,650];  
CONST pos corner2:=[1050,-600,1100];  
CONST pos corner3:=[350,150,150];  
CONST pos corner4:=[1000,-150,600];

testnum:=5;

WZBoxDef \Inside,shape1,corner1,corner2;  
WZDOSet \stat,worldzone1 \Inside,shape1,doBusySlabi,0;  
WZBoxDef \Inside,shape2,corner3,corner4;  
WZDOSet \stat,worldzone2 \Inside,shape2,doBusyTrak,0;

ENDPROC  
ENDMODULE

The problem is that the routine WZPos doesn’t start. I think the worldzones are defined correctly, but the routine itself doesn’t execute. It is linked with a POWER\_ON event in controller configuration (see attachment) ![image.jpg](https://europe1.discourse-cdn.com/flex005/uploads/robotics1/original/2X/f/f0d61579fac9d9a0db12d4ede46f9732ed90d769.jpeg)  
.

Does someone know what could be the reason for this happening?

Thank you for all your help,  
Regards

---

<div class="post-metadata">

**Author:** ![lemster68](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/lemster68/32/1945_2.png) [@lemster68](https://tech-community.robotics.abb.com/u/lemster68)\
**Post date:** [October 28, 2019, 10:08am UTC](https://tech-community.robotics.abb.com/t/event-routine-not-starting/9168/2 "2019-10-28T10:08:04Z")

</div>

Try to call the routine after boot up. See if you get an error more or less like “world zone already in use or activated”.

---

<div class="post-metadata">

**Author:** ![jled](https://avatars.discourse-cdn.com/v4/letter/j/3d9bf3/32.png) [@jled](https://tech-community.robotics.abb.com/u/jled)\
**Post date:** [October 28, 2019, 10:26am UTC](https://tech-community.robotics.abb.com/t/event-routine-not-starting/9168/3 "2019-10-28T10:26:29Z")

</div>

I tried and that is exactly what happens.

---

<div class="post-metadata">

**Author:** ![lemster68](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/lemster68/32/1945_2.png) [@lemster68](https://tech-community.robotics.abb.com/u/lemster68)\
**Post date:** [October 28, 2019, 10:39am UTC](https://tech-community.robotics.abb.com/t/event-routine-not-starting/9168/4 "2019-10-28T10:39:16Z")

</div>

OK, so that tells us that it did run. You need to get motors on for the system to recognize the zones.

---

<div class="post-metadata">

**Author:** ![jled](https://avatars.discourse-cdn.com/v4/letter/j/3d9bf3/32.png) [@jled](https://tech-community.robotics.abb.com/u/jled)\
**Post date:** [November 4, 2019, 10:57am UTC](https://tech-community.robotics.abb.com/t/event-routine-not-starting/9168/5 "2019-11-04T10:57:41Z")

</div>

Thank you very much! 🙂
