RobotStudio event

World Zone Error

2»

Answers

  • Graemepaulin,

    I created a backup of my controller and I am trying to upload the file but it has several subfiles (BACKINFO, HOME, RAPID, SYSPAR) and each of these has more files. What do I actually need to attach?

    Thanks,
    SM



  • SteveMob
    SteveMob
    edited March 2016
     
  •  I am considering just starting over and trying to do it with temporary WZ's and just enable them and disable them. This is my code, and it still isn't really working. Did I need to link anything to POWER_ON still?

    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 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]];

        VAR wztemporary object2;

        PROC temp_zone()
            VAR shapedata volume;
            CONST pos corner1_1:=[275,353,101];
            CONST pos corner2_1:=[369,-353,534];
            wzboxdef\Inside,volume,corner1_1,corner2_1;
            WZLimSup \Temp, object2, volume;
            wzenable object2;
            Path_10;
            WZDisable object2;
        ENDPROC

        PROC main()
            temp_zone;
        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

    Thanks for any help,
    SM

  • zip the top level backup folder (so you include all sub folder) - it reduces the file size dramatically and attach that.
  • Graemepaulin,

    Attached is a backup of my controller. It may have had a different program on it, so you'll still have to upload my code in it I think...

    Thanks,
    SM
  • This is my code attempting to do Temporary WZ's:

    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 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]];

        VAR wztemporary object2;

        PROC temp_zone()
            VAR shapedata volume;
            CONST pos corner1_1:=[275,353,101];
            CONST pos corner2_1:=[369,-353,534];
            wzboxdef\Inside,volume,corner1_1,corner2_1;
            WZLimSup \Temp, object2, volume;
            !wzenable object2;
            Path_10;
            !WZDisable object2;
        RETURN;
        ENDPROC

        PROC main()
            !        Path_10;
            temp_zone;
            !WZEnable object2;
        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;
        RETURN;
        ENDPROC
    ENDMODULE


    However, it is not recognizing the WZ, and I keep getting an error after the first cycle: "Event Message 40664. Description: The 'object2' worldzone has already been defined and activated. A worldzone can only be defined once. Program Ref./MainModule/temp_zone/WZLimSup. Actions: Use a worldzone with another name."

    What does this mean, and what do I need to do in order to fix this?

    Thanks,
    SM
  • soup
    soup ✭✭✭
    I don't see a POWER_ON event defined in the SYS.cfg of your backup.
  • I may not have had it made when I made the backup, I thought I did. I know how to make a POWER_ON event though.
  • Graeme,

    Thanks a ton! You're my hero! I have a question though. Was mine not working because my targets were declared as CONST instead of PERS or what was the issue that I was having that you did differently?

    Thanks again,
    SM
  • Please can you attach your complete packed station ? I like to see it. Thank you so much !

  • I have changed the target declaration to CONST and the motion is still stopped on the boundary of the world zone.

    I tend to use PERS as I often assign values to the target s in RAPID you can not do this if they are declared as CONST.

  • Graeme,

    What else did you do differently than what I was doing to get it to work? I was looking through and it seems I did everything pretty much the same as you did, but mine didn't work...

    Thanks,
    SM
  • Hi Steve,


    You are right I simply created the station from your backup and then imported the RAPID code we had already used (and configured the poweron event)- so not sure why it was not working.

    Have you tried it in the real controller to see if it works there also?


    Regards

    Graeme

  • Graeme,

    I just tried it on the real controller and it works brilliantly! I just don't see why it wasn't working for me! Thank you so much for all your help Graeme and everyone!

    SM
  • However, is there a way to get it to where it will not ever enter the WZ, even while jogging? Like it works great when the path goes across the WZ, but I really need it to test for the WZ while it is jogging manually as well. Is this possible?

    Thanks,
    SM
  • World zones work both in Auto and manual/jogging.

    So if you try to jog the robot through the cube in the above configuration it should also stop on the boundary?

  • It will work for jogging in the simulation, but when I tried it with the real controller and robot, it would still run through it when jogging in manual. It worked great when the program was running (i.e. the path went right into the WZ), but for some reason it didn't carry over for the jogging... Any ideas?

    Thanks,
    SM