World Zone Tutorial
SteveMob
✭
in RobotStudio
Hello All,
I am fairly new to RobotStudio and RAPID programming. I am trying to set up a cube World Zone, and I am getting several syntax errors. I have read the Technical Reference Manual and looked at the functions, etc. They weren't really of much help. So my question is, is there any sort of World Zone tutorial out there or is there some place I can get lots of examples for World Zone code?
Thanks in advance for any help!
SM
I am fairly new to RobotStudio and RAPID programming. I am trying to set up a cube World Zone, and I am getting several syntax errors. I have read the Technical Reference Manual and looked at the functions, etc. They weren't really of much help. So my question is, is there any sort of World Zone tutorial out there or is there some place I can get lots of examples for World Zone code?
Thanks in advance for any help!
SM
Tagged:
0
Best Answer
-
In RobotStudio go to Controller tab-> configuration->I/O system->right click signal->new signal-> then fill in the name and type of signal (as shown above )
For RW6.xx this is all you need to create a virtual signal.
You can then set this signal high (1) in your power on routine to check it is running).
5
Answers
-
-
Soup,
Thank you for your post. Although it was helpful, it still didn't really answer my question. Perhaps the attached screenshot will help clarify my question a little more:
Both syntax errors are saying "Wrong number of arguments." Any ideas on how to correct my syntax? Am I placing that snippet of code in the wrong place or something?
Essentially I am trying to create a "box" defined at corner1:=[28.50, -14.25, 0.00] and corner2:=[17.00, 28.50, 58.80]. I want the robot to stop everything when it comes into contact with that "box."
Also attached is the text file for my code snippet.
Any examples or help is greatly appreciated!
SM
0 -
Looks good. The only thing I see is that "object" is defined as temporary and then "\Stat" is used in the limit supervision instruction. Probably both need to be one or the other -- but not sure if that's what is causing your error.
0 -
I changed them both to the same for "temp" and "stat" and that still did not fix the problem. I did find out that line 15 ("WZBoxDef....") is the line that is causing the error.
Any other suggestions or examples of World Zone code?
Thanks,
SM
0 -
It looks good -- not seeing anything.
Things to try:- Press the "Format" button in the Rapid editor and see if any garbage characters are hiding somewhere.
- Save the module out, attach it here, and I'll try to run it.
0 -
Ok attached is the text file. The module method isn't really working, but the text file should be sufficient?
Thanks,
SM
0 -
Has a "-" after ENDMODULE -- looks good otherwise.
0 -
That was an accidental on my part when I was pasting it to notepad. The program in RS doesn't have that "-".
Were you getting "Wrong number of arguments" errors in the "WZBoxDef" or "WZLimSup" lines?
Could my PC not hooked up to the real controller have anything to do with it? Like my RS doesn't actually have WZ on it, but the real controller does. Is that unusual? Or is there an addin for RS that has WZ?
Also, what version of RS are you using? I am using 6.01.01.
Thanks,
Stephen
0 -
Nothing -- applied and got "No errors."
If the controller doesn't have the World Zone option it should error saying it doesn't have that option -- virtual or real controller.
I'm using a virtual controller with RW 5.15.8.
All this is very odd -- I'd Apply changes, close and restart RobotStudio. If still have an issue -- restart the PC. If still have an issue -- throw the computer out the window.
0 -
So I am looking at the output window, and it says "The instruction WZBoxDef requires option World." I think this may be the problem. Is there somewhere that I can download WZ to the virtual controller? Or is this something that has to be purchased when purchasing RS?
Thanks,
Stephen
0 -
No purchase necessary -- the virtual controller keystring has World Zones as an available option -- the World Zone box must be checked. Sounds like it was not checked when your virtual controller was created. After the fact, I don't think you can easily add the option to your virtual controller without remaking the system.
0 -
Ok. Thanks for all the help. I just hooked my PC up to the real controller (which has WZ on it) and I no longer received syntax errors.
However, I want the robot to stop everything when it enters the WZ "cube" defined above. Is my program not written for that case? I am still trying to understand what all the commands are for... What would I need to change in my program above to have the robot stop when it enters the WZ "cube?"
Thanks for all the help,
SM
0 -
The procedure is good but now you need to call it at a POWER_ON event. Look-up "Event Routine" in the manual to learn about it, add the POWER_ON event in the controller under Configuration > Controller > Event Routine in RobotStudio, cycle the power on the controller, and it should work. And every edit to the zone requires that you cycle power for it to take.
0 -
So I created a POWER_ON Event, but I am not really sure how to implement it in my code in order to get the WZ to work?
Thanks
SM
0 -
You choose the procedure you'd like to call in the POWER_ON event parameters and as the controller is powering on that procedure is called in the background -- in this case the procedure is defining the World Zones. If you think the event is not running the procedure, try pulsing an output (something you can see -- light, alarm, solenoid, etc.) in that procedure to confirm to yourself the event is working before digging into possible issues with the World Zone definitions.
0 -
Can you show me an example of this? I am having trouble creating inputs/outputs as I am new to this sort of thing.
Thanks,
SM
0
Categories
- All Categories
- 5.5K RobotStudio
- 390 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 249 ScreenMaker
- 2.7K Robot Controller
- 304 IRC5
- 59 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 3 RobotStudio AR Viewer
- 772 RAPID Programming
- 17 Wizard Easy Programming
- 105 Collaborative Robots
- 4 Job listings