FPSDK - How to write to Rapiddata
Hello,
I have been working with the flex pendant. Now, I created some buttons in my application, when these buttons are clicked, numbers are returned, I want to convert these numbers to rapidatas.So this is where my problems lie. How do I do this?
Thanks...
John Wiberg2011-10-04 14:19:10 0
Comments
-
You can do it in the following way:Declaration of a value in VS:
ABB.Robotics.Controllers.RapidDomain.Num nMyValueVS;Write that numerical value to the controlller:double newStatus = 0;Rd = AController.Rapid.GetRapidData("T_ROB1", "MyMod", "MyNumValue");
nMyValueVS= (ABB.Robotics.Controllers.RapidDomain.Num)Rd.Value;
nMyValueVS.FillFromNum(newStatus);
this.Rd.Value = this.nMyValueVS;
Good luck and BR
chaos0 -
Hey Chaos,Thank you very much. This really helped.SchA?nen Tag noch.- Jay0 -
Hi Chaos,
Have a little question about your example.
When I use the code you provided i get 2 errors on the last line of code. Here is the code I used:
[code]
RapidData rd;
ABB.Robotics.Controllers.RapidDomain.String sRecipeName;
string sNewRecipeName = "Teststring";
rd = aController.Rapid.GetRapidData("T_Recipe", "Recipe", "RecipeName");
sRecipeName = (ABB.Robotics.Controllers.RapidDomain.String)rd.Value;
sRecipeName.FillFromString(sNewRecipeName);
this.rd.Value = this.sRecipeName;
[/code]
on the last line I get the following errors:
1- Error 1 'TpsViewTestCSharp.view_test' does not contain a definition for 'rd' and no extension method 'rd' accepting a first argument of type 'TpsViewTestCSharp.view_test' could be found (are you missing a using directive or an assembly reference?) D:ABBHoliday IceRobotvb2008TpsViewTestCSharpTpsViewTestCSharpview_test.cs 149 18 TpsViewTestCSharp
2 - Error 2 'TpsViewTestCSharp.view_test' does not contain a definition for 'sRecipeName' and no extension method 'sRecipeName' accepting a first argument of type 'TpsViewTestCSharp.view_test' could be found (are you missing a using directive or an assembly reference?) D:ABBHoliday IceRobotvb2008TpsViewTestCSharpTpsViewTestCSharpview_test.cs 149 34 TpsViewTestCSharp
I don't know what I'm doing wrong. Looks like I'm missing a reference or something, but don't know which one.
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