RobotStudio event

World Zone Already In Use error

So I am receiving this error when I am running through my world zone section of program. The exact message is "It is not possible to add the world zone wzHomePos. Another world zone with the same name is already defined in the system." 

When I do find all references it is only used in two places, where it is declared at the top of the module, and where it is used for WZDOSet in the process. I stepped through this process once and didn't receive any error messages, then when stepping through to test again I started receiving this error message. I did change all of the DO's to read only, not sure if that makes a difference or not.

I am fairly inept in my ABB programming skills and am working with an overly complicated template on a tight deadline. I was wondering if anyone could check over the code and spot the issue. Any help is greatly appreciated, thank you.

From Module:
    !**********************************************************
    !*       World zones variables                            *
    !**********************************************************
    VAR shapedata shHomePos;
    VAR wzstationary wzHomePos:=[0];
    !World zone SerPPosition
    VAR shapedata shSerPPos;
    VAR wzstationary wzSerPPos:=[1];
    ! 10
    !World zone Incoming
    PERS wzstationary wzRobInIN:=[2];
    PERS pos pRobInIN_1:=[-500,1050,950];
    PERS pos pRobInIN_2:=[250,2000,0];
    VAR shapedata shRobInIN;
    ! 20
    !World zone Outgoing
    PERS wzstationary wzRobInOUT:=[3];
    PERS pos pRobInOUT_1:=[538,1344,560];
    PERS pos pRobInOUT_2:=[1160,730,150];
    VAR shapedata shRobInOUT;
    ! 30
    !World zone Debur
    PERS wzstationary wzRobInDB;
    PERS pos RobInDB_1:=[1000,500,1500];
    PERS pos RobInDB_2:=[1500,-200,900];
    VAR shapedata shRobInDB;
    ! 40
    !World zone Drawer
    PERS wzstationary wzRobInDW;
    PERS pos pRobInDW_1:=[900,-600,800];
    PERS pos pRobInDW_2:=[1500,-1150,0];
    VAR shapedata shRobInDW;

From PROC:
    !**********************************************************
    !*       World zones positions                            *
    !**********************************************************
        !Determining for controlling the homeposition
        WZSphDef\Inside,shHomePos,pHome.trans,50;
        WZDOSet\Stat,wzHomePos\Inside,shHomePos,doIRBinHome,1;
        !
        !Determining for controlling the Serviceposition
        WZSphDef\Inside,shSerPPos,pServ.trans,50;
        WZDOSet\Stat,wzSerPPos\Inside,shSerPPos,doIRBInServPos,1;
        ! 10
        !Determining for controlling Incoming
        WZBoxDef\Outside,shRobInIN,pRobInIN_2,pRobInIN_1;
        WZDOSet\Stat,wzRobInIN\Inside,shRobInIN,doINRobClr,1;
        ! 20
        !Determining for controlling Outcoming
        WZBoxDef\Outside,shRobInOUT,pRobInOUT_2,pRobInOUT_1;
        WZDOSet\Stat,wzRobInOUT\Inside,shRobInOUT,doOUTRobClr,1;
        ! 30
        !Determining for controlling Debur
        WZBoxDef\Outside,shRobInDB,RobInDB_2,RobInDB_1;
        WZDOSet\Stat,wzRobInDB\Inside,shRobInDB,doDBRobClr,1;
        ! 40
        !!Determining for controlling Drawer
        WZBoxDef\Outside,shRobInDW,pRobInDW_2,pRobInDW_1;
        WZDOSet\Stat,wzRobInDW\Inside,shRobInDW,doDWRobClr,1;

Comments

  • You should put stationary world zones in an event routine connected to the power on event.  It will be in a procedure just like you have it, but only run once when the robot powers on.
    Lee Justice
  • Yes, and make sure that the power on event is not called twice :) that happened to me and lead to the same error
  • Good point @EricH
    Lee Justice