Avoiding temporary world zones reset.
Kami
✭
Hello,
I am in a situation that I have to set up and free different temporary world zones dynamically.
I am encountering a problem that the temporary world zones are automatically erased after pptomain or pp leaves the routine where the world zones are set.
Is there a method that can keep those temporary world zones activated until they are freed?
Thanks
I am in a situation that I have to set up and free different temporary world zones dynamically.
I am encountering a problem that the temporary world zones are automatically erased after pptomain or pp leaves the routine where the world zones are set.
Is there a method that can keep those temporary world zones activated until they are freed?
Thanks
Tagged:
0
Best Answers
-
And, even if PPtoMain in the motion task does reset the zones which were enabled in the background task, you could keep track of which zones should be enabled with a shared PERS bool or signal and quickly re-enable them after the PPtoMain.
5 -
I still don't know why you need so many world zones, but maybe this can help you out. You can call these functions as needed to check temp wz's in given positions.MODULE WZ_CheckLOCAL PERS tooldata tool2:=[TRUE,[[0,270,186.3],[0,0,0,1]],[20,[1.3,38.9,92.4],[1,0,0,0],0,0,0.777]];LOCAL PERS wobjdata wobj1:=[FALSE,TRUE,"",[[0,0,0],[1,0,0,0]],[[0,0,0],[1,0,0,0]]];LOCAL VAR shapedata shCheck;LOCAL VAR wztemporary wzTempCheck;PERS num nCylRadius:=50;PERS num nCylHeight:=150;PERS pos posBox1C1:=[1299,-110,1350];PERS pos posBox1C2:=[1299,-110,1350];PERS pos posCyl1:=[1299,-110,1350];! This function will return a TRUE value if the robot TCP is! inside a temporary world zone box.FUNC bool fCheckBoxWZ(pos posLow, pos posHigh, tooldata tCheck \wobjdata wobjCheckWZBox)VAR robtarget pCheckPos;tool2 := tCheck;IF Present(wobjCheckWZBox) THENwobj1 := wobjCheckWZBox;ELSEwobj1 := wobj0;ENDIFWZBoxDef \Inside, shCheck, posLow, posHigh;WZFree wzTempCheck;WZDoSet \Temp, wzTempCheck \Inside, shCheck, vdoTempPos1, high;! Make pCheckPos equal to where the robot is at the moment.pCheckPos := CRobT(\Tool:=tool2\WObj:=wobj1);! Move robot to where it already is to make the necessary TCP activeMoveJ pCheckPos, v500, fine, tool2\WObj:=wobj1;IF DOutput(vdoTempPos1) = 1 THENRETURN TRUE;ELSERETURN FALSE;ENDIFENDFUNC! This function will return a TRUE value if the robot TCP is! inside a temporary world zone cylinder.FUNC bool fCheckCylWZ(pos posOrigin, num nRadius, num nHeight, tooldata tCheck \wobjdata wobjCheckWZBox)VAR robtarget pCheckPos;tool2 := tCheck;IF Present(wobjCheckWZBox) THENwobj1 := wobjCheckWZBox;ELSEwobj1 := wobj0;ENDIFWZCylDef \Inside, shCheck, posOrigin, nRadius, nHeight;WZFree wzTempCheck;WZDoSet \Temp, wzTempCheck \Inside, shCheck, vdoTempPos1, high;! Make pCheckPos equal to where the robot is at the moment.pCheckPos := CRobT(\Tool:=tool2\WObj:=wobj1);! Move robot to where it already is to make the necessary TCP activeMoveJ pCheckPos, v500, fine, tool2\WObj:=wobj1;IF DOutput(vdoTempPos1) = 1 THENRETURN TRUE;ELSERETURN FALSE;ENDIFENDFUNCENDMODULELee Justice5
Answers
-
Why not use stationary then?Lee Justice0
-
You can enable and disable from a background task -- might help with having more control -- mentioned in the Rapid manual under wztemporary.
0 -
Hi @lemster68
Thank you for your suggestion. However, I need to free and reactivate world zones when needed, but I can not free a stationary one. Is there way I can modify a stationary wz after it is activated?0 -
If anyone knows a way to detect pptomain event, I can then call my redefine procedure to solve this problem.0
-
If you use a WHILE loop in the main routine you can call your world zone routine above this - thus only run when PP to main.
0 -
graemepaulin,
That will work nicely when I run the program, but if the operator pressed pp to main without running the program, and then use jogging mode, the world zones are not activated, so there comes the risk.0 -
So if program is not running and PP to main pressed the world zones are still reset?
0 -
@graemepaulin
Yep, It happens to me, at least on a virtual robot. I have not tried it on a real robot yet. My Robotstudio version is 6.08.0 -
Kami said:Hi, @soup
Thank you for your suggestion.
I forgot to mention that the reason I need to activate and deactivate world zones because the maximum number of world zones is 20 and I need more.
So I have to modify and redefine and them according to TCP.
With IRC5, there is a function PPMovedInManMode that you can use. You might also be able to use an UNDO handler in your routines. Both might still not help, because I don't know which will happen first. If the last thing that the controller decides to do is to delete the world zones, then you are boned.graemepaulin said:So if program is not running and PP to main pressed the world zones are still reset?
Yes, it is documented that this will occur. I think that I remember you addressing the number of WZ's before with someone else. Despite the documentation saying 20, it is actually 40?Lee Justice0 -
One other thing that you can try is the function IsStopStateEvent(\PPToMain), if you have not already come across that one yet.Lee Justice0
-
Something to test: if you WZEnable from the background task, does PPtoMain in the motion task reset the zones?
0 -
@lemster68 That's a good thought, but wouldn't protect on a PPtoMain then a manual jog.
0 -
@soup @lemster68
Thank you guys.
I had tried setting up more than 20 world zones. And the program stopped on the 21st one.
I will take WZEnable from the background task as a final try I guess0 -
Thank you very much. @soup @lemster68
The reason I need this is that my project is like carrying books into a grid like shelf. The project requires unprofessional operators to jog the robot.
And the ABB robot(760) is a four axis robot which does not support collision avoidance. So, I was trying to set up world zones only that are close to TCP.0 -
This is maybe a bit off topic, but: How can you avoid the reset of a stationary worldzone signal after a restart? Cross connect?
0 -
Yes, I also do that, but after a power loss and restart, you need to set motors on for once to initialize the stationary worldzone. I would like to initialize without motors on.
0 -
You could maybe set the IO configuration state to store.Lee Justice0
-
I tried a custom signal safe level with all options to "set last value", but it's not working.
0
Categories
- All Categories
- 5.5K RobotStudio
- 395 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