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?

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:
link to DevCenter topic

[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, 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.

I have posten how to read cfgdata in rapid in this post http://forums.robotstudio.com/forum_posts.asp?TID=7773
Maybe that will help you

[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 THEN
WriteCfgData “MOC/MOTION_SUP/rob1”,“path_col_detect_on”,TRUE;
ENDIF
ENDPROC[/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.

Thank you!