Write Rapid Data (boolean)
Dear all,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
I have problem to set a rapid boolean.
To get the actual value of the rapid boolean is working, but I can't write a new value.
Should this working with the FillFromBool() Methode?
Can anyone send a code example?
Thanks
Best regards
Roland
0
Comments
-
Hi Roland
This works for me
private void WriteBool(string task,string module,string variable,bool WriteValue)
{
RapidData GTPUAppRunning=null;
try
{
//Write true to RAPID variable bGTPUAppRun
GTPUAppRunning=abbCtrl.Rapid.GetTask(task).GetModule(module).GetRapidData(variable);
IRapidData Value;
Value=GTPUAppRunning.Value;
Bool retValue=(Bool) Value;
retValue.FillFromString(WriteValue.ToString());
GTPUAppRunning.Value=retValue;
}
catch(Exception ex)
{
//Do exception handling
GTPUMessageBox.Show(this,null,ex.Message);
}
}
}
Per Svensson
Company Specialist
ABB Automation Technology Products0 -
Is there any reasons to cast the bool to a string and parse it to Bool via the FillFromString method?
Shouldn't :
GTPUAppRunning.Value = new Bool(WriteValue);
bee enough?
Please bear with mee - i'm new to this API.Best regards
JJ0
Categories
- All Categories
- 5.5K RobotStudio
- 396 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 316 IRC5
- 61 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 798 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings