SpeedData
Hi.
How can i read/write Speeddata. Cant find the name space.
Best regards Klaus
Klaus Soenderhegn
www.cadalysator.dk
Comments
-
You use GetRapidData to get an instance of RapidData = to variable you want, then you cast it to the RapidType you want, in your case SpeedData, then you work with the elements of the SpeedData type, then write the new value back to the controller. Here is a sample from the help:
private void IncXOrientation(Conroller c)
{
try
{
// Create RapidData instance to Rapid array
RapidData rdRobtarget = c.Rapid.GetRapidData("T_ROB1","MyModule","rt_array");// Values are added in reverse order
for (int i = 5;i > 0;i--)
{
// Get value of item
RobTarget rtValue = (RobTarget) rdRobtarget.ReadItem(i);// Increase X
rtValue.Trans.X += 1;// Apply new value to Rapid data in controller
rdRobtarget.WriteItem(rtValue,i);
}
}
catch (GeneralException ee)
{
// TODO: Add error handling
}
catch (System.Exception ee)
{
// TODO: Add error handling
}
finally
{
if (rdRobtarget != null)
rdRobtarget.Dispose();
}
}Russell Drown0
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