Worldzone configs
B_Baan
✭
in RobotStudio
Hello,
I'm trying to create a program for a robot which involves using worldzones. I was wondering if there was a way to let the robot calculate whether its destination or route crosses a worldzone. If it does, the robot has to change directions and calculate a new path or just stop and popup an error message.
Also, I would like to know if i'm able to catch the worldzone interrupt that is generated after the robot hits the worldzone that it's not allowed to enter. I want to let the robot move in the opposite direction at the point he entered the worldzone, and afterwards stop and popup an error message to the teach pendant OR let the robot calculate a new path and follow that one.
Are these two things possible?
0
Comments
-
I would also like to ask how I can teach a worldzone to my robot? I have written a code which lets me pick two points (high / low) and creates a box world zone from those points. The problem is, when I move my program pointer to main and start the program, the worldzone gets emptied. The worldzone is defined as a persistent, so I dont know what the problem is or what the cause is.0
-
you need a few things for the world zones:
CONST pos CellLimit1a := [5000,5000,5000];
CONST pos CellLimit2b :=[-5000,-5000,-5000]:
VAR wzstationary wzCellLimit1;
VAR shapedata shCellLimit1;
PROC WorldZones
! Robot cant go outside area
wzboxdef \Outside,shCellLimit1,CellLimit1a,CellLimit1b;
wzLimSup \stat,wzCellLimit1,shCellLimit1;
ENDPROCand call this routine in the controller config event tab at power on
for the interrupt use WZDOSet and and interrupt declarationfor the IO that u use note that these must be declared as INTERNAL
0 -
Hello Janno,Thank you for your response.I figured out that the things I needed to teach worldzones to a robot and make the robot do things after entering one.I still do not know how I can let the robot calculate whether its path lies within the worldzone or not, though I am able (with Janno's help) to let the robot move back and calculate a different path to avoid the worldzone. This can be done with the WZDOSet function. It lets you set a digital output whenever the robot goed past the edge of a world zone. Looking at this digital output i can check if the robot needs to stop or not. Thank you for that, Janno. the teaching of the worldzone, however, is a different case.For the stationary worldzone to work properly it needs to be defined and activated if the robot is started, so this routine should be added to the powerup event. The problem here is that I wish to teach world zones to the robot, meaning they can be defined newly when needed. This is not the case with stationary world zones, which means I am forced to pick temporary world zones.I am now creating a temporary world zone without data and teaching the points needed to create the actual world zone. When the program starts I initiate the robot by activating all its known world zones. So far this worked for me and didn't bring me unnecessary problems.The fact that the teaching didnt work before is that the volume was declared within the 'teach' function, meaning it would lose its 'value' (weird, since it's a value-less variable). Now I just pick the two points needed to create a box world zone within the teach function, and define / activate the world zone in another (which is called in the main routine before any other action).I hope this information might help another programmer in the future.Cheers0
Categories
- All Categories
- 5.5K RobotStudio
- 396 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 249 ScreenMaker
- 2.7K Robot Controller
- 310 IRC5
- 59 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 785 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 4 Job listings