RAPID: Fetch Gravity_Beta value
I'm looking for a way to check the current Gravity_Beta setting and print it to the TeachPendant, using RAPID.
Is there something similar to GetSysInfo that works for Gravity_Beta?
John Wiberg2013-02-21 16:58:59
0
Comments
-
Would have been easier if you had said what type of object Gravity_Beta is.I looked it up and it looks like its a configuration, if so then you read it just like any other configuration file data:
[code]Controller c = new Controller();
ConfigurationDatabase cfg = c.Configuration;
string data = cfg.Read("MOC", "ROBOT", "gravity_beta");[/code]Look in the file to get the exact location, the above is my guesstimate of where it should be.
John Wiberg2013-02-19 11:58:53John
Developer Center0 -
John, I tried what you suggested. The compiler has all kinds of trouble with that code snippet. Will this work within a RAPID module? If so, what am I doing wrong? The robot system doesn't seem to recognize those commands/data types.0
-
I have posten how to read cfgdata in rapid in this post http://forums.robotstudio.com/forum_posts.asp?TID=7773Maybe that will help youPer Svensson
Robotics and Vision Specialist
Consat Engineering0 -
[QUOTE=Alyssa Wells]John, I tried what you suggested. The compiler has all kinds of trouble with that code snippet. Will this work within a RAPID module? If so, what am I doing wrong? The robot system doesn't seem to recognize those commands/data types.[/QUOTE]Ah.You have posted in the RobotStudio>Developer Center forum, in here we mainly talk about Application Development using the SDK's.So I assumed you were using the FlexPendant SDK. So the code is C# using the FlexPendant SDK.Per Svensson's suggestion to use ReadCfgData will fit you much better. For clarity I will post it here as well.[code]VAR bool bPathCollision;PROC CheckPathCollision()ReadCfgData "MOC/MOTION_SUP/rob1","path_col_detect_on",bPathCollision;TPWrite "Path Collision On: "Bool:=bPathCollision;IF bPathCollision=FALSE THENWriteCfgData "MOC/MOTION_SUP/rob1","path_col_detect_on",TRUE;ENDIFENDPROC[/code]For RAPID questions etc you should head over to the RobotWare forum.I've taken the liberty to edit the header of your topic to reflect this.John
Developer Center0 -
Thank you!0
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)
- 786 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings